The windows build & how to build LISP programs that require libffi on windows
Operation "Operation" » Devlog
Mid-jam, we finally figured out how to make a windows build! Since you can't upload new builds mid-jam, it has only been uploaded now and it is somewhat of a pain to build for the first time, due to the fact that libffi isn't very good with windows, but after that it's just as any other platform. Here's a little step by step tutorial on building this game (or any libffi-related LISP thing) on windows:
- Download the normal version of your lisp compiler for windows (SBCL in this particular case) and install it
- Install MSYS2, a Unix-like environment for windows, that has the pacman package manage, which will be used to install needed dependencies
- Start MSYS via the mingw64 wrapper it has in the installation directory
- Install needed packages via pacman, libraries will likely have a mingw-w64-x86_64- prefix (it also has 32-bit versions of all those things, for that you'll need to run mingw32, but i have not tried it, should be mostly the same process). For this particular game, you'll need pacman -S gcc pkg-config libffi-devel mingw-w64-x86_64-{SDL2,SDL2_image,SDL2_ttf}. Note the gcc, pkg-config and libffi-devel packages, they are needed to compile LISP programs that use libffi, due to CFFI using pkg-config to find it and GCC to compile some kind of wrapper (don't quote me on the last one, I only know that it requires GCC to be there and compiles something)
- Download & Install quicklisp by running your LISP compiler using it's absolute system path (e.g. /c/Program\ Files/Steel\ Bank\ Common\ Lisp/1.4.14/sbcl.exe), loading the file you downloaded (with e.g. curl, into your home MSYS directory) and running (quicklisp-quickstart:install). This will install quicklisp into your MSYS home directory. You probably also want to run (ql:add-to-init-file) so it'd be loaded on start
- Download/Clone the git repository of your game and put it in ~/quicklisp/local-projects
- Start your LISP compiler again, run (ql:quickload :system-name) and then (asdf:perform :program-op :system-name) (or (asdf:make :system-name) if you have appropriate configuration for that). You now have an .exe file of the game
- To bundle the libraries, load your system and check (cffi:list-foreign-libraries), then look for those in /mingw64/bin/
Now all you have to do is just pack it up and upload, and every time you want a new build, just re-do the 7th step :)
Files
o2-win.zip 16 MB
May 03, 2019
Get Operation "Operation"
Operation "Operation"
2D shooter about war behind the enemy lines written in Common Lisp and SDL2.
Status | In development |
Authors | Pavel Kulyov, vaartis |
Genre | Shooter |
Tags | 2D, common-lisp, lisp-game-jam-2019 |
Leave a comment
Log in with itch.io to leave a comment.