Please make it portable

Started by Maurizio, May 25, 2012, 07:50:51 AM

Previous topic - Next topic

Maurizio

I'd like very very very much if newlisp were portable.

I mean :

it should not depends on any environment variable. (why newlispdir ?)

it should not have the need of a work directory (tmp directory in http mode)

or, if really needed, a subdir of the starting directory,

or, at least, a directory specified on the command line.

I'd like to have newlisp.exe and all my files in a directory (with subdirs) that i can

freely move aroud my disk, or zip and send to my friends, or copy in a stick and carry around.



Best regards.

Maurizio.

alex

#1
It can be only part of answer to your question, but problem with environment variable can be decided.

Place file MyNewLisp.cmd to the same directory, that newlisp.exe and run it.



MyNewLisp.cmd

@set NEWLISPDIR=%~dp0
@set NEWLISPDIR=%NEWLISPDIR:\=%
@%NEWLISPDIR%newlisp.exe

Lutz

#2
When specifying the path to module files and guiserver.lsp and guiserver.jar explicitely, then NEWLISPDIR is not required at all. It's main purpose is to find the directory where the modules/ directory can be found and the the two guiserver files. When no init.lsp (or .init.lsp) is found in the users home directory it will also look in NEWLISPDIR.



During startup newLISP will not touch the environment variable NEWLISPDIR, if already defined. If not defined, it will be set to either %PROGRAMFILES%/newlisp on Windows or to /usr/share/newlisp on UNIX systems including MAC OSX and Linux.



See also here: http://www.newlisp.org/downloads/newlisp_manual.html#environment">http://www.newlisp.org/downloads/newlis ... nvironment">http://www.newlisp.org/downloads/newlisp_manual.html#environment

alex

#3
2 Maurizio:

see http://newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=4135&p=20500#p20500">http://newlispfanclub.alh.net/forum/vie ... 500#p20500">http://newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=4135&p=20500#p20500

Is it enough?