3 # This sciprt builds a version of sbcl pre loaded with libraries that can run on windows.
4 # You can use ./winsbcl.exe to run it
6 # It is meant to be run from cygwin
8 if ! type sbcl &> /dev/null ; then
9 echo "Please install sbcl. A version has been included in deps/windows for your convenience"
13 sbcl_exec=$(which sbcl)
14 sbcl_dir=${sbcl_exec%sbcl}
16 if [ ! -e "$sbcl_dir/freeglut.dll" ] ; then
17 echo "Please copy deps/windows/freeglut.dll into $sbcl_dir"
21 if [ ! -e "$sbcl_dir/pdcurses.dll" ] ; then
22 echo "Please copy deps/windows/pdcurses.dll into $sbcl_dir"
29 tar zxf ../../deps/common-lisp/3b-cl-opengl-993d627.tar.gz &&
30 tar zxf ../../deps/common-lisp/alexandria-b1c6ee0.tar.gz &&
31 tar zxf ../../deps/common-lisp/babel_0.5.0.tar.gz &&
32 tar zxf ../../deps/common-lisp/cffi_0.15.0.tar.gz &&
33 tar zxf ../../deps/common-lisp/cl-ppcre.tar.gz &&
34 tar zxf ../../deps/common-lisp/ironclad.tar.gz &&
35 tar zxf ../../deps/common-lisp/mt19937-latest.tar.gz &&
36 tar zxf ../../deps/common-lisp/nibbles-v0.12.tar.gz &&
37 tar zxf ../../deps/common-lisp/trivial-features_0.8.tar.gz &&
38 tar zxf ../../deps/common-lisp/cl-charms-9bb94ef.tar.gz
41 cur_dir=$(cygpath -d $PWD)
42 escaped_cur_dir=${cur_dir//\\/\\\\}
44 sbcl --no-sysinit --no-userinit \
45 --eval "(require 'asdf)" \
46 --eval "(asdf:initialize-source-registry '(:source-registry (:tree \"${escaped_cur_dir}\\\\tmp\\\\deps\") (:directory \"${escaped_cur_dir}\\\\src\\\\main\") :IGNORE-INHERITED-CONFIGURATION))" \
47 --eval "(asdf:load-system :clnl)" \
48 --eval "(asdf:clear-output-translations)" \
49 --eval '(sb-ext:save-lisp-and-die "windowssbcl.exe" :executable t :toplevel (function clnl:run))'
53 echo "Executable is windowssbcl.exe"