link questions

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

link questions

Post by cormullion »

If I want to make an executable file that works on both flavours of MacOS X (Intel and PowerPC), do I need to make to different executable files, or can I make one 'universal' one?

With the instructions in the manual:
(1) Put the following files into the same directory: (a) a copy of the newLISP executable; (b) newlisp (or newlisp.exe on Win32); (c) link.lsp; and (d) the program to link with (uppercase.lsp in this example).
Are steps (a) and (b) the same? And can I use path names to files or do I really have to make copies of the newlisp and link files and put them in a folder...?

I'm a bit out of my depth in this unexplored terrain... :-)

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

The link mechanism as described in the manual only works with dedicated executables for either PPC or INTEL, and I don't have plans to ship universal executables of newLISP. They are double the size and have a slower startup too.
Are steps (a) and (b) the same? And can I use path names to files or do I really have to make copies of the newlisp and link files and put them in a folder...?
you probably can do

Code: Select all

link /usr/bin/newlisp mynewprog mynewprog.lsp.
I am not sure at the moment why I gave the instructions to copy the file into the current directory. This was written several years ago. A quick look at the source for link.lsp shows me it should be possible.

The whole feature is really only necessary on Windows machines. On the Mac and UNIX you can just distribute script files with '#!/usr/bin/newlisp' in the header.

The next development release with installers for the Mac and Windows will also show how it is possible to put an Applications Icon for a newLISP GUI-server app in to the Applications folder. When you do this the application will also behave like a 'real' Mac application, where the menu is on the top of the screen and not inside the app. See here:

http://newlisp.org/downloads/developmen ... p-edit.png

note also the icon in the launch bar

Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Hi Lutz. Thanks for this.

No worries about ppc/intel - if I can specify the files in full I can do it across the network... (perhaps :-)

You say it's only necessary on Windows. But I thought that the main point was that you could distribute an executable binary file so that even if people don't have newlisp installed, the executable file will run OK? Does a linked file still need a newlisp installation?

Anyway, thanks.

(I'm writing a Dashboard widget and I wanted to do some logic in newlisp rather than javascript/applescript. It might be possible...)

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Does a linked file still need a newlisp installation?
no, it does not, a linked file should run without a problem on a machine which never saw newLISP. Just make sure you label your files as either for PPC or Intel.

Lutz

Locked