The latest snapshot build at

 http://pre.racket-lang.org/

adds an `--embed-dlls` option for `raco setup` for use on Windows. The
new flag causes the generated ".exe" file to contain a copy of ".dll"
files that would otherwise need to be packaged with the ".exe".

If there are no other files needed by the executable --- if the program
contains no `define-runtime-path`s for files other than DLLs, and so on
--- then an ".exe" with embedded DLLs can run all by itself on another
machine.


The `--embed-dlls` flag should work for most DLLs, including all of the
DLLs in the main Racket distribution, but it won't work for everything.
Embedded DLLs are linked using the technique described at

 https://www.joachim-bauch.de/tutorials/loading-a-dll-from-memory/

and using Joachim Bauch's MemoryModule library. It won't work, for
example, with DLLs that use thread-local variables (but many DLLs avoid
those, since the system `LoadLibrary` function also didn't work for
them prior to Windows Vista).


DrRacket's "Create Executables" doesn't yet include an option like
`--embed-dlls`, but it will soon. If it works as expected, we'll also
make `--embed-dlls` automatic for "Create Executables" for the teaching
languages.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to