link questions

Started by cormullion, July 11, 2007, 07:57:04 AM

Previous topic - Next topic

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:


Quote(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

#1
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.


QuoteAre 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


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/development/newlisp-edit.png">http://newlisp.org/downloads/developmen ... p-edit.png">http://newlisp.org/downloads/development/newlisp-edit.png



note also the icon in the launch bar



Lutz

cormullion

#2
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

#3
QuoteDoes 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