msteveb / jimtcl

Official repository of Jim Tcl, an open-source, small footprint implementation of Tcl
http://jim.tcl.tk/
Other
432 stars 123 forks source link

Converting script into a standalone executable #289

Open misha-franz opened 8 months ago

misha-franz commented 8 months ago

I hope it is already supported, but if not maybe it makes sense to add a way to combine jimsh with a script to create a standalone executable. Maybe something really simple like attaching the script to the end of the interpreter and read on boot. Thanks!

msteveb commented 7 months ago

It is already relatively easy to just build an executable that does Jim_Eval() of some embedded code, but perhaps you want some way of doing this without a compiler. It's going to be platform specific, so I'll leave this up for someone else to tackle if they want (presumably there is prior art for many interpreters that can be used)

misha-franz commented 7 months ago

Thanks for your reply. Indeed I am looking for a very simple way to send scripts to customers who have no idea about jim, tcl, etc. It is likely relevant for Windows only as Unix like OSes have mechanisms to make scripts executable and users are much more skilled.

The idea to be able to do something like:

copy /b jimsh + script app.exe

Jimsh would check on boot it's name. If jimsh, it will work as usual. If different, it will look after the end of the jimsh file for a script and run it.

Maybe someday I will implement it, though did not program in C for years...

On Wed, Feb 14, 2024, 2:55 PM Steve Bennett @.***> wrote:

It is already relatively easy to just build an executable that does Jim_Eval() of some embedded code, but perhaps you want some way of doing this without a compiler. It's going to be platform specific, so I'll leave this up for someone else to tackle if they want (presumably there is prior art for many interpreters that can be used)

— Reply to this email directly, view it on GitHub https://github.com/msteveb/jimtcl/issues/289#issuecomment-1944914260, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTAWJL3HRIKAN3UDO4FWQLYTU6GBAVCNFSM6AAAAABCNCIQ6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUHEYTIMRWGA . You are receiving this because you authored the thread.Message ID: @.***>