I tried the following:
- installed gregor using
raco pkg install gregor
- wrote the following program and saved it to a file named "time.rkt":
#lang racket
(require gregor)
(displayln (~t (today) "E, d MMMM y"))
- created an executable by running
raco exe time.rkt
. This produced a file named "time.exe" about 16Mb in size - created a distribution by running
raco dist time-dist time.exe
. This produced a folder named "time-dist" containing the time.exe file plus a lib folder. The entire folder size is 48 Mb, since gregor adds in time zone and locale formatting data for all possible time zones and locales. - zipped up the entire
time-dist
folder and moved it to a machine which had no Racket installed - ran the time.exe program in a console window and it printed the current date as expected.
So, creating standalone distributions with external packages is certainly possible and it is also possible with the gregor library.
Alex.