mkapp script

Difference between version 0 and 1 - Previous - Next
I created this toy program as a platform to experiment creating stand-alone applications using 8.7+zipfs.  

The https://chiselapp.com/user/griffin/repository/WordBuster/file?name=makeapp.tcl%|%makeapp.tcl%|% script creates the application from a base wish (can be used with tclsh also).  The assumption is that wish or tclsh is built as a static standalone kit.  Creation of the application executable is done with the https://www.tcl.tk/man/tcl8.7/TclCmd/zipfs.html#M15%|%zipfs mkimg%|% command.

The overview of steps for construction are:

   1. Define list of required packages for the application.

   1. Define list of application source files and/or directories.

   1. Find and copy out all the required packages from the current zipfs:// (or auto_path) to a local lib directory.  

   1. Copy the application source files and resource files to the local lib directory.

   1. execute `[[zipfs mkimg]]` command that does the work to copy wish, strip out the existing attached zipfs, and zip up the local lib directory, attaching it to the new application.


The beauty of this approach is that the "wish" used during development ("wish app.tcl ..."), is the same .exe bits used in the final app.exe.

The current script works for Linux, Windows, and MacOS, except the Mac version is still not complete.  Also, signing the application is not included for any platform, yet.

I included steps at the end of the makeapp script that dumps the programs external dependencies so I could confirm that it is truly as "stand alone" as it could be.

This is still experimental.  The code needs to be reorganized into a general purpose application.  For now, it is a working proof of concept.

A word about https://chiselapp.com/user/griffin/repository/WordBuster/file?name=README.md%|%wordbuster%|%.  I wrote this when our family started playing the popular "https://www.nytimes.com/games/wordle/index.html%|%wordle%|%" game online.  It started as a tool to compute statistics of letter frequency in five-letter words.  Then I added the full "wordle" game, with most of the bells and whistles.
The "game" play state machine is written in a single coroutine that also handles all GUI events, just because.  

-Brian