This page is for tips about deploying standalone applications with [Freewrap]. I ([EKB]) have decided to stick with Freewrap, in spite of the excitement over Starkits, partly because it's got BLT already packaged and ready to go, and partly because it works just fine and I'm used to it. ---- '''Some deployment tips''' I develop on Windows, and create build scripts that are a mix of batch files and tcl scripts. One quick-and-dirty small project looks like this: [http://www.kb-creative.net/screenshots/smallproject.gif] The batch file ''_BuildAll.bat'' has contents call replaceSnippets.bat call wrapDrivingForce.bat (In larger projects, ''_BuildAll.bat'' checks out all the files from a [CVS] or [Subversion] replaceSnippets.bat'' tclsh ReplaceSnippets.script "drivingforce.tcl" snippets.txt del "drivingforce.tcl" ren "drivingforce_snipped.tcl" "drivingforce.tcl" ''wrapDrivingForce.bat'' freewrap drivingforce.tcl drivingforce.ico The ''wrapDrivingForce.bat'' batch file is standard for calling freewrap. The "replaceSnippets.bat" file calls a utility that I use to convert from a development version of a script to a freewrap-ready release version. It goes through and replaces anything between "## SNIP" and "## PINS" with corresponding code in a "snippets.txt" file. For example, in this file, it replaces ## SNIP set appdir [file dirname [info script]] ## PINS and ## SNIP wm iconbitmap . -default drivingforce.ico ## PINS with ## SNIP set appdir [file dirname [info nameofexecutable]] ## PINS and ## SNIP wm iconbitmap . -default "/development/DrivingForce/drivingforce.ico" ## PINS The ''ReplaceSnippets.script'' code is: # Look for sections bracketed by "## SNIP" & "## PINS" and from # second arg into first arg. Put into "firstarg_snipped.tcl" # This is called from a batch file or other automatic process, so # checking is minimal! set initfile [lindex $argv 0] set snipfile [lindex $argv 1] set outfile "[file rootname $initfile]_snipped.tcl" set infp [open $initfile r] set snfp [open $snipfile r] set outfp [open $outfile w] set insnip_in false set insnip_snip false while {[gets $infp currline] != -1} { if {$insnip_in} { if {[regexp -- {##\s*PINS} $currline] == 1} { set insnip_in false } continue } if {[regexp -- {##\s*SNIP} $currline] == 1} { set insnip_in true # Read from snip file while {[gets $snfp snipline] != -1} { if {$insnip_snip} { if {[regexp -- {##\s*PINS} $snipline] == 1} { set insnip_snip false break } puts $outfp $snipline } elseif {[regexp -- {##\s*SNIP} $snipline] == 1} { set insnip_snip true } } continue } puts $outfp $currline } close $infp close $snfp close $outfp ---- [Category Deployment]