CCL save-application from command line

Whatever is on your mind, whether Lisp related or not.
Post Reply
gekkonier
Posts: 19
Joined: Tue Jan 17, 2017 6:57 am

CCL save-application from command line

Post by gekkonier » Tue Jan 24, 2017 6:24 am

I would like to distribute binaries from my programs. Actually I know how I can do this.

A small example:
I have here a Windows Workstation and use CCL 64bit, version 1.11., and I use emacs with slime to develop with it.

Lets assume I have the following simple helloworld.lisp:

Code: Select all

(defun main ()
  (format t "hello world.~%"))
Now I can make a self contained binary out of my "program". For this I start the ccl repl (wx86cl64.exe)
Inside the repl i do

Code: Select all

> (load "helloworld.lisp")
> (save-application "helloworld.exe" :toplevel-function #'main :prepend-kernel t)
The result is an helloworld.exe, that prints "hello world."

Thats the way I did it all the time, and it works flawless.
How can I do this from a shell script or the command line, so that I don't have to start the repl for this - so to say - make this faster?

David Mullen
Posts: 78
Joined: Mon Dec 01, 2014 12:29 pm
Contact:

Re: CCL save-application from command line

Post by David Mullen » Tue Jan 24, 2017 7:47 pm

You could specify the same operations from the command line:

Code: Select all

ccl -l helloworld.lisp -e "(save-application \"helloworld.exe\" :toplevel-function #'main :prepend-kernel t)"

gekkonier
Posts: 19
Joined: Tue Jan 17, 2017 6:57 am

Re: CCL save-application from command line

Post by gekkonier » Wed Jan 25, 2017 1:40 am

I never thought about command line arguments, but it's obvious.
Thank you!

Post Reply