Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Artifact ID: | ff14c05dd823b06ceb3a98dc582b68a9510099fa |
---|---|
Page Name: | howto |
Date: | 2017-03-20 00:22:33 |
Original User: | aspect |
Mimetype: | text/x-markdown |
Parent: | 4d4fc1c576d6cc0c60622985f18c564a690442bd (diff) |
Next | 04794b95fcd36c4187f86bee7870416505edafaa |
Content
Customising a Tclkit
You will need sdx.kit from the front page of this repo. See tclkits for sources of pre-built kits
# grab a tclkit curl -O http://www.rkeene.org/devel/kitcreator/kitbuild/nightly/tclkit-fossil_trunk-linux-amd64 # make a copy of tclkit to run sdx with cp tclkit-fossil_trunk-linux-amd64 tclkit chmod +x tclkit # extract the vfs ./tclkit sdx.kit extract tclkit-fossil_trunk-linux-amd64 # add some code echo 'puts "Hello, Tclkit"' >> tclkit-fossil_trunk-linux-amd64.vfs/boot.tcl # sync changes back to tclkit ./tclkit sdx.kit sync tclkit-fossil_trunk-linux-amd64 tclkit-fossil_trunk-linux-amd64.vfs
boot.tcl is run on tclkit startup. Since there is no main.tcl, the tclkit will give you a Tcl shell.
Wrapping an Application
Tclkits look for main.tcl to launch an application on startup.
# grab a tclkit curl -O http://www.rkeene.org/devel/kitcreator/kitbuild/nightly/tclkit-fossil_trunk-linux-amd64 # make a copy of tclkit to run sdx with cp tclkit-fossil_trunk-linux-amd64 tclkit chmod +x tclkit # create your application mkdir myapp.vfs echo 'puts "Hello, Starkit!"' > myapp/main.tcl # wrap it! ./tclkit sdx.kit wrap myapp -runtime tclkit-fossil_trunk-linux-amd64
Share the new executable myapp with your friends!
More!
The above steps are easily elaborated to ...
- wrap for different architectures
- add further libraries (including native ones) (protip: use teapot-client to fetch them)
- include custom assets in your kits
- wrap sdx.kit to make it a standalone executable
- put tclkit and sdx in your $PATH
- .. (almost) anything you can imagine!