Started adding cross build racket

This commit is contained in:
retropikzel 2024-12-24 10:09:39 +02:00
parent ad94262a16
commit 611f23b9da
2 changed files with 31 additions and 0 deletions

View File

@ -36,6 +36,8 @@ The environment variable SCC must be set to the same value as the implementation
The command is the first word on the list. So for example guile for Guile, csi for Chicken
interpreter, csc for Chicken compiler.
If the command has .exe at it's end cross compilation from Linux to .exe with Wine is assumed.
## Outputs
### Self contained, self extracting and runnable shell script
@ -69,6 +71,10 @@ Only requires Java to be installed to run.
- kawa
- The build folder needs to contain kawa.jar
### .exe
- racket.exe
## How it works
The scripts searches for .sld files in given paths, compiles them if needed and combines them with

View File

@ -165,6 +165,31 @@ case ${SCC} in
PLTCOLLECTS="$paths" raco exe --orig-exe -o $output ++lang r7rs "${main%.scm}.rkt"
exit
;;
racket.exe)
paths="${PWD}"
for dir in $libdirs
do
paths="$paths;$(winepath ${PWD}/${dir#./})"
for lib in $(find "$dir" -name "*.sld")
do
{
echo "#lang r7rs"
echo "(import (scheme base))"
echo "(include \"$(basename $lib)\")"
} > "${lib%.sld}.rkt"
done
done
{
echo "#lang r7rs"
cat "$main"
} > "${main%.scm}.rkt"
set -x
WINEPATH="${HOME}/.wine/drive_c/Program Files/Racket" \
PLTCOLLECTS="$paths" \
wine raco.exe exe --orig-exe --embed-dlls -o "${output}.exe" ++lang r7rs "${main%.scm}.rkt"
exit
;;
sash)
paths="-L $tmpdir"
for dir in $libdirs