At Thu, 28 Jun 2018 13:56:43 -0700 (PDT) Mike Griffiths <
mi...@keyboardzombie.com> wrote:
>
> On Thursday, 28 June 2018 02:27:22 UTC+1, Robert Heller wrote:
> > At Wed, 27 Jun 2018 18:56:31 -0500 Dave <
nor...@nohost.com> wrote:
> >=20
> > >=20
> > > I thought I'd again look into starkits, starpacks, etc. whatever they=
> =20
> > > are called now. Every time I do this I wind up on pages telling me to=
> =20
> > > download an existing sdx, kit, etc. Most of these are ancient versions=
> =20
> > > of Tcl/Tk. None of them have the IMG extension.
> > >=20
> > > I want to wrap an app of mine that uses the IMG extension. I can build=
> =20
> > > Tcl/Tk successfully on windows. I want to start from scratch and build=
> =20
> > > the sdx.exe and whatever I need.
> > >=20
> > > I don't want a pre-built thing, I want to build it myself. Is there a=
> =20
> > > reference >anywhere< that describes just how to build this stuff from=
> =20
> > > scratch? Thanks.
> >=20
> > What you want to build is a tclkit.exe. You don't actually need to build =
> a
> > sdx.exe (actually you don't really want that). You can get a sdx.kit fil=
> e (OS=20
> > & arch agnostic). You *can* convert the sdx.kit to sdx.exe as a convienc=
> ence=20
> > -- I guess that might be necessary, given MS-Windows "primitive" shell/CL=
> I=20
> > system (compared to Linux).
> >=20
> > *I* don't know about building tclkit *under MS-Windows*, since I don't us=
> e=20
> > MS-Windows (I cross-build under Linux using the MXE mingw32 distro under=
> =20
> > Ubuntu 14.04), but I have built tclkits under Linux.
> >=20
> > What you want is called "kitgen" -- do a web search for it.
> >=20
> > Oh, you don't actually need a tclkit with any extensions beyond the core =
> and=20
> > what is minimually needed for the tclkit. You can *add* extensions durin=
> g the=20
> > wrapping process: wrap the main program with qwrap, then unwrap it. This=
> =20
> > gives you a .vfs dir tree that you can add additional files to, include s=
> hared=20
> > libraries (binary extensions) and then wrap all of that together with a=
> =20
> > runtime. Visit
https://github.com/RobertPHeller/ModelRRSystem and look a=
> t the=20
> > build infrastucture (specificly the Makefile.am files under the Scripts=
> =20
> > directory) for hints on how to do this.
> >=20
> > >=20
> >=20
> > --=20
> You shouldn't need to actually *compile* anything. You can download an exis=
> ting Tclkit (or an ActiveTcl basekit), use sdx.kit to wrap up your applicat=
> ion (including your extensions like Img, if they aren't part of the Tclkit =
> you're using) into a starkit (Tcl bundle) or a starpack executable (tclkit =
> + starkit). See
http://wiki.tcl.tk/8900 for instructions, but what I genera=
> lly do:
Right. There are up-to-date Tclkits (and the Img library, and a few other key
libraries) on ActiveState in the ActiveTcl builds.
>
> * Copy your Tclkit to c:\tclkit.exe *and* c:\tclkit2.exe (on Windows you ne=
> ed one to run and one to combine into the starpack at the end, because Wind=
> ows is dumb sometimes)
> * Download sdx.kit to c:\sdx.kit
> * Place the main Tcl script for your app at c:\MyApp.tcl
> *** For all sdx commands that follow, do Start -> Run and enter c:\tclkit.e=
> xe sdx.kit <command>
> * c:\tclkit.exe sdx.kit qwrap MyApp.tcl
> ** This creates an initial MyApp.kit from your Tcl file
> * c:\tclkit.exe sdx.kit unwrap MyApp.kit
> ** This extracts the MyApp.vfs directory structure from the MyApp.kit. You =
> can now remove c:\MyApp.kit and c:\MyApp.tcl, as MyApp.tcl is now in the vf=
> s directory (as MyApp.vfs/lib/app-MyApp/MyApp.tcl)
> * Throw any other binary extensions you need (like Img) in MyApp.vfs/lib/
> * Copy any other Tcl scripts, images, and any other files your app uses int=
> o the MyApp.vfs (where you want to put them is up to you - possibly in lib/=
> app-MyApp, particularly if MyApp.tcl is referencing them by path)
> * The main entry point to your application when it runs from a bundle is My=
> App.vfs/main.tcl - you can also run this script to test things before you r=
> e-bundle it up.
> * When you're ready, either run:
> ** c:\tclkit.exe wrap MyApp.kit
> ** This creates a new Starkit. (It may also create a MyApp.bat batch file, =
> which you can ignore/delete).
> * And/or, to create a single-file executable:
> ** c:\tclkit.exe wrap MyApp.exe -runtime tclkit2.exe
>
The above process is codified in the Makefile.am files I use with my Model RR
system. Feel free to grab those Makefile.am files and adapt them or use them
as the basis of .bat or .sh files.
> You can then edit the icons and file information for MyApp.exe in a number =
> of ways - personally, I use Resource Hacker, but there are some Tcl tools f=
> or it (some of which are bundled in sdx.kit).
>