Page 1 of 1

CCL save-application from command line

Posted: Tue Jan 24, 2017 6:24 am
by gekkonier
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?

Re: CCL save-application from command line

Posted: Tue Jan 24, 2017 7:47 pm
by David Mullen
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)"

Re: CCL save-application from command line

Posted: Wed Jan 25, 2017 1:40 am
by gekkonier
I never thought about command line arguments, but it's obvious.
Thank you!