Double-click to run...?
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Double-click to run...?
is there a way to get these newLISP-GS 'applications' to be double-clickable...? I notice that the newLISP-GS editor in /Applications is, but I don't see how to use a similar idea to launch a text file...
In OSX, add a hash-bang path at the top of the main application:
And make sure that it has (exit) at the end. Then, make the program executable by running "chmod +x /path/to/foo.lsp" in your terminal.
In Windows, make sure .lsp files are associated with the newlisp interpreter (c:\program files\newlisp\newlisp.exe I think).
In Linux, it depends entirely on the desktop environment you are using. If it is Gnome, there is some hugely arcane procedure involving fifteen apps that edit different aspects of your gconf database. Then you have to restart Gnome, log in as root, play a game of tetris, recompile your kernel including the "Run newlisp files using newlisp interpreter" option as a loadable module, then rebooting to your new kernel. If there are any problems, be sure to search Usenet and IRC logs before asking for help, or expect to be told to RTFM.
;)
Code: Select all
#!/usr/bin/newlisp
In Windows, make sure .lsp files are associated with the newlisp interpreter (c:\program files\newlisp\newlisp.exe I think).
In Linux, it depends entirely on the desktop environment you are using. If it is Gnome, there is some hugely arcane procedure involving fifteen apps that edit different aspects of your gconf database. Then you have to restart Gnome, log in as root, play a game of tetris, recompile your kernel including the "Run newlisp files using newlisp interpreter" option as a loadable module, then rebooting to your new kernel. If there are any problems, be sure to search Usenet and IRC logs before asking for help, or expect to be told to RTFM.
;)
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
There is a preference pane you can download called "Default Apps" that will let you assign by protocol or extension. However, if you control-click or right-click a file and choose open with, you can select on a per-file basis (but that doesn't affect other files of the same extension). If you can't get it to open directly to the newlisp executable, point it to the terminal app and it will launch as a shell process in terminal.app.
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Thanks Jeff! Good idea.
And after a bit of googling, I found another possible solution - Platypus. http://www.sveinbjorn.org/platypus (MacOS X only). It converts shell scripts to Finder-friendly double-clickable applications.
And after a bit of googling, I found another possible solution - Platypus. http://www.sveinbjorn.org/platypus (MacOS X only). It converts shell scripts to Finder-friendly double-clickable applications.