Lisp HUG Maillist Archive

Save an image with the IDE


How do I save an image that still retains the LispWorks IDE/GUI ?  

(I think this is a FAQ and one I might even have asked before, but I
was unable to find the answer).

My normal pattern is to save a console only image and use SLIME for
development.  This works great and I can preload some packages in the
image to make my life easier.

Now, I would like to create an image that when it starts opens the
LispWorks IDE with all the normal menus, windows, etc.  How do I do
that?  Can someone point me to a good example?

I'm running on Linux and Mac OS.

Thanks!

Regards,
Chris Dean


Re: Save an image with the IDE

Hi,

The example below is from the Lispworks Reference Manual entry for 
save-image. The only change is that I added ':environment t' to ensure that 
the IDE is launched when the saved image is started.

---8<---
Here is an example initialization script. Save this to a file such as 
my-file.lisp , then run LispWorks with the command line argument -init 
c:/my-file.lisp to build the image my-image.exe .

(load-all-patches)

(load "my-application")

(save-image "my-image" :environment t)

(quit)
---8<---

cheers

paulm

At 21:39 18/03/2006, Chris Dean wrote:


>How do I save an image that still retains the LispWorks IDE/GUI ?
>
>(I think this is a FAQ and one I might even have asked before, but I
>was unable to find the answer).
>
>My normal pattern is to save a console only image and use SLIME for
>development.  This works great and I can preload some packages in the
>image to make my life easier.
>
>Now, I would like to create an image that when it starts opens the
>LispWorks IDE with all the normal menus, windows, etc.  How do I do
>that?  Can someone point me to a good example?
>
>I'm running on Linux and Mac OS.
>
>Thanks!
>
>Regards,
>Chris Dean



Re: Save an image with the IDE


Paul Miller <paulm@xanalys.com> writes:
> The example below is from the Lispworks Reference Manual entry for
> save-image. The only change is that I added ':environment t' to ensure
> that the IDE is launched when the saved image is started.

Thanks!  I tried that and it doesn't work on my Mac.  What it does is
create an image that when launched has a listener window, but no
menubar or anything else.  I can even load the Mac specific
macos-application-bundle.lisp and that doesn't help.

Below is my deliver script.

Regards,
Chris Dean



(load-all-patches)

#+:cocoa 
(compile-file-if-needed 
 (sys:example-file "/Applications/LispWorks 4.4.5/Library/lib/4-4-0-0/examples/configuration/macos-application-bundle.lisp")
 :load t) 

(save-image "my-image" :environment t)

(quit)


Re: Save an image with the IDE


Ah.

What happens if you do (env:start-environment) in the listener that you get ?
If this works maybe you could specify this as the :restart-function.

Maybe it is related to multiprocessing - you could try adding 
:multiprocessing t to your save-image.

(Just a couple of guesses - I don't  have a Mac version)

cheers

paulm


At 16:57 19/03/2006, Chris Dean wrote:


>Paul Miller <paulm@xanalys.com> writes:
> > The example below is from the Lispworks Reference Manual entry for
> > save-image. The only change is that I added ':environment t' to ensure
> > that the IDE is launched when the saved image is started.
>
>Thanks!  I tried that and it doesn't work on my Mac.  What it does is
>create an image that when launched has a listener window, but no
>menubar or anything else.  I can even load the Mac specific
>macos-application-bundle.lisp and that doesn't help.
>
>Below is my deliver script.
>
>Regards,
>Chris Dean
>
>
>
>(load-all-patches)
>
>#+:cocoa
>(compile-file-if-needed
>  (sys:example-file "/Applications/LispWorks 
> 4.4.5/Library/lib/4-4-0-0/examples/configuration/macos-application-bundle.lisp")
>  :load t)
>
>(save-image "my-image" :environment t)
>
>(quit)



Re: Save an image with the IDE


Thanks again for your help.  I've tried various combinations of:

  (save-image "my-image" 
              :environment t :multiprocessing t
              :restart-function 'env:start-environment)

With no new result.  I'll try it on my linux version when I have a chance.

The Listener window on the Mac is also not behaving normally, I can't
seem to get focus on the window for example. 

Regards,
Chris Dean


Re: Save an image with the IDE


> Thanks again for your help.  I've tried various combinations of:
>
>   (save-image "my-image" 
>               :environment t :multiprocessing t
>               :restart-function 'env:start-environment)
>
> With no new result.  I'll try it on my linux version when I have a
> chance.

On Linux it works much better.  I get many X11 errors and I might need
to rebind *stanard-output*, but at least the windows come up.

If someone has an example delivery script that they use to create an
IDE image, I would appreciate a copy.

Thanks!

Regards,
Chris Dean


Re: Save an image with the IDE

Unable to parse email body. Email id is 5425

Re: Save an image with the IDE

Unable to parse email body. Email id is 5426

Re: Save an image with the IDE


> BTW it's not a delivery script, as it calls SAVE-IMAGE rather than
> DELIVER. You can't deliver the IDE.

Ah yes, of course.  Thanks for the clarification.

Regards,
Chris Dean


Re: Save an image with the IDE


Thanks everyone.   Following the documentation in 

  ftp://ftp.lispworks.com/pub/software_tools/reference/lw445/readme-4-4-5.pdf

worked great.

I did end up using a restart-function as shown here:

    (save-image
     #+:cocoa 
     (write-macos-application-bundle
      (merge-pathnames "lispworks-gui-dev" (hcl:get-working-directory)))

     #-:cocoa "lispworks-gui-dev"

     :environment t :multiprocessing t
     :restart-function 'env:start-environment)

Regards,
Chris Dean


Re: Starting Lispworks with files open in editor

At 27/03/2006 01:53, Mitch Berkson wrote:

>I would like Lispworks to start with some files open in the 
>editor.  I've tried putting the following line in my ~/.lispworks file:
>(ed "c:/path/foo.lisp")

Maybe you should check (ed "c:/path/foo.lisp") in the listener and see what happens.

Francis


>But that doesn't appear to do the job.  I've also tried adding 
>the line to my-configuration.lisp and following the instructions 
>to save a new image. That also doesn't work.
>
>Thanks for any help.
>
>As an aside - a useful feature, common in other programs, would 
>be a most recent files list in the "File" menu.
>
>Mitch
>


Re: Starting Lispworks with files open in editor

At 27/03/2006 14:28, Mitch Berkson wrote:

>Francis Leboutte wrote:
>>At 27/03/2006 01:53, Mitch Berkson wrote:
>>
>>>I would like Lispworks to start with some files open in the
>>>editor.  I've tried putting the following line in my ~/.lispworks
>>>file: (ed "c:/path/foo.lisp")
>>Maybe you should check (ed "c:/path/foo.lisp") in the listener and
>>see what happens.
>
>I did.  It works fine.

Conclusion: the file with (ed "c:/path/foo.lisp") is not loaded 
at startup time or this form is not evaluated. BTW which 
LispWorks are you using ? I think you can't use an init file in the Personal Edition.

Francis

>Mitch
>
>


Updated at: 2020-12-10 08:48 UTC