Please make it portable

Q&A's, tips, howto's
Locked
Maurizio
Posts: 52
Joined: Mon Jul 28, 2003 3:06 pm
Location: Italy

Please make it portable

Post by 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
Posts: 100
Joined: Thu Mar 10, 2005 2:27 pm
Location: Russia

Re: Please make it portable

Post by alex »

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

Code: Select all

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

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

Re: Please make it portable

Post by Lutz »

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/newlis ... nvironment

alex
Posts: 100
Joined: Thu Mar 10, 2005 2:27 pm
Location: Russia

Re: Please make it portable

Post by alex »


Locked