12 Feb 2008 11:44
Re: Portable Execution
Robert Manning <robert.m.manning <at> gmail.com>
2008-02-12 10:44:38 GMT
2008-02-12 10:44:38 GMT
On Feb 12, 2008 1:53 AM, Trevor Torrez <jackdimm <at> gmail.com> wrote:
> First off let me say that I love the SQuirreL client. It has been my
> favorite database explorer for a long time now. A lot of great work
> has gone into this fine utility, and I am wondering how much effort
> would be needed to turn it into a portable application capable of
> running from entirely on a USB / CD drive.
> Some things that would need to be modified when 'portable' mode is on:
> * The application should not attempt to write or read from the user's
> folders, only the install directory
> * The location of the jdbc jars should be relative to the install directory
> * Alternate batch/sh startup scripts should use a JRE installed to a
> location relative to the install directory
>
> Is this something that is easily achievable?
I haven't tried this myself, so it's possible I could have overlooked
something.
> * The application should not attempt to write or read from the user's folders, only the install directory
-userdir=[path on thumb drive to .squirrel-sql directory copied from
user home dir]
> * The location of the jdbc jars should be relative to the install directory
copy jdbc driver jar files into the lib directory in the squirrel
install directory on the thumb drive.
> * Alternate batch/sh startup scripts should use a JRE installed to a location relative to the install directory
set JAVA_HOME at the top of the script to point to a relative path
where the JRE is contained on the thumb drive.
Additionally, 2.6.5 will change the squirrel-sql.bat file slightly to
work better on vista in the default install location.
This involves writing a temp file in the directory defined by %TEMP%
env variable. In 2.6.4, a local file (temp.tmp) is used instead. You
could simply ignore this, since it is overwritten each time you
launch, so it doesn't need to be portable. However, if you wanted to
ensure that the local host was not modified at all, then in 2.6.5 you
could revert back to the older behavior:
dir /b "%SQUIRREL_SQL_HOME%\lib\*.*" > "%TEMP%\squirrel-lib.tmp"
FOR /F %%I IN ("%TEMP%\squirrel-lib.tmp") DO CALL
"%SQUIRREL_SQL_HOME%\addpath.bat" "%SQUIRREL_SQL_HOME%\lib\%%I"
becomes:
dir /b "%SQUIRREL_SQL_HOME%\lib\*.*" > temp.tmp
FOR /F %%I IN (temp.tmp) DO CALL "%SQUIRREL_SQL_HOME%\addpath.bat"
"%SQUIRREL_SQL_HOME%\lib\%%I"
Rob
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
RSS Feed