Skip to content

Instantly share code, notes, and snippets.

@bigos
Created April 23, 2019 21:55
Show Gist options
  • Save bigos/498831fcb1aa78224b18091247358500 to your computer and use it in GitHub Desktop.
Save bigos/498831fcb1aa78224b18091247358500 to your computer and use it in GitHub Desktop.
Notes for creating gtk executable on windows 10

Prequisites

Msys2

Emacs

quicklisp

local-projects

We are going to use version that is not part of quicklisp. In local project place neccesary code executing the below example in a Msys2 terminal.

cd c:/Users/IEUser/quicklisp/local-projects/
git clone https://github.com/Ferada/cl-cffi-gtk.git

Example project

cd c:/Users/IEUser/
git clone https://github.com/bigos/Pyrulis.git

build script

touch ./lisp-starter.lisp
(push #p "c:/Users/IEUser/Pyrulis/Lisp/cairo-snake/" asdf:*central-registry*)
(ql:quickload :cairo-snake)
(cairo-snake::main

libraries

In power shell run

PS C:\Users\IEUser> sbcl --load .\lisp-starter.lisp

And you will see missing dll errors. So run pacman to install the relevant libraries, copy the dll files from c:/msys64/mingw32/bin to the folder where sbcl executable resides and try again until you see the program working

Creating executable

touch lisp-builder.lisp

and edit it

(push #p "c:/Users/IEUser/Pyrulis/Lisp/cairo-snake/" asdf:*central-registry*)
(ql:quickload :cairo-snake)
(sb-ext:save-lisp-and-die "c:/Users/IEUser/snake/snake.exe" :toplevel #'cairo-snake::main :executable t)

generating executable

In pwershell run

PS C:\Users\IEUser> sbcl --load .\lisp-builder.lisp

You will get an error because we do not have the snake folder yet. Create it and try again.

Now you have executable created. Run it and enjoy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment