newLISP Fan Club

Forum => newLISP in the real world => Topic started by: Maurizio on May 25, 2012, 07:50:51 AM

Title: Please make it portable
Post by: Maurizio on May 25, 2012, 07:50:51 AM
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.
Title: Re: Please make it portable
Post by: alex on June 01, 2012, 10:05:33 PM
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
Title: Re: Please make it portable
Post by: Lutz on June 05, 2012, 12:16:09 AM
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
Title: Re: Please make it portable
Post by: alex on June 14, 2012, 09:15:54 AM
2 Maurizio:

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

Is it enough?