Revision: 5826
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5826&view=rev
Author: manningr
Date: 2010-08-21 18:12:23 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Initial changes to convert from Ant build to Maven build
Added Paths:
-----------
trunk/sql12/installer/squirrelsql-launcher/src/main/resources/addpath.bat
trunk/sql12/installer/squirrelsql-launcher/src/main/resources/log4j.properties
trunk/sql12/installer/squirrelsql-launcher/src/main/resources/restore.sh
trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.bat
trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.sh
trunk/sql12/installer/squirrelsql-launcher/src/main/resources/update-log4j.properties
trunk/sql12/installer/squirrelsql-macosx-installer/src/main/resources/Info.plist
trunk/sql12/installer/squirrelsql-macosx-installer/src/main/resources/acorn.icns
Copied: trunk/sql12/installer/squirrelsql-launcher/src/main/resources/addpath.bat (from rev 5805, trunk/sql12/app/cmd/addpath.bat)
===================================================================
--- trunk/sql12/installer/squirrelsql-launcher/src/main/resources/addpath.bat (rev 0)
+++ trunk/sql12/installer/squirrelsql-launcher/src/main/resources/addpath.bat 2010-08-21 18:12:23 UTC (rev 5826)
@@ -0,0 +1 @@
+set TMP_CP=%TMP_CP%;%1
Copied: trunk/sql12/installer/squirrelsql-launcher/src/main/resources/log4j.properties (from rev 5805, trunk/sql12/app/cmd/log4j.properties)
===================================================================
--- trunk/sql12/installer/squirrelsql-launcher/src/main/resources/log4j.properties (rev 0)
+++ trunk/sql12/installer/squirrelsql-launcher/src/main/resources/log4j.properties 2010-08-21 18:12:23 UTC (rev 5826)
@@ -0,0 +1,10 @@
+log4j.rootLogger=info, SquirrelAppender
+log4j.appender.SquirrelAppender=net.sourceforge.squirrel_sql.client.SquirrelFileSizeRollingAppender
+log4j.appender.SquirrelAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.SquirrelAppender.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c %x - %m%n
+
+
+
+
+
+
Copied: trunk/sql12/installer/squirrelsql-launcher/src/main/resources/restore.sh (from rev 5805, trunk/sql12/app/cmd/restore.sh)
===================================================================
--- trunk/sql12/installer/squirrelsql-launcher/src/main/resources/restore.sh (rev 0)
+++ trunk/sql12/installer/squirrelsql-launcher/src/main/resources/restore.sh 2010-08-21 18:12:23 UTC (rev 5826)
@@ -0,0 +1,40 @@
+#! /bin/sh
+
+[ ${JAVA_HOME} ] && JAVA=${JAVA_HOME}/bin/java || [ %JAVA_HOME ] && JAVA=%JAVA_HOME/bin/java || JAVA=java
+
+# Are we running within Cygwin on some version of Windows?
+cygwin=false;
+case "`uname -s`" in
+ CYGWIN*) cygwin=true ;;
+esac
+
+# Squirrel home.
+SQUIRREL_SQL_HOME='%INSTALL_PATH'
+
+# SQuirreL home in Unix format.
+if $cygwin ; then
+ UNIX_STYLE_HOME=`cygpath "$SQUIRREL_SQL_HOME"`
+else
+ UNIX_STYLE_HOME=$SQUIRREL_SQL_HOME
+fi
+
+
+set basedir=%~f0
+:strip
+set removed=%basedir:~-1%
+set basedir=%basedir:~0,-1%
+if NOT "%removed%"=="\" goto strip
+set SQUIRREL_SQL_HOME=%basedir%
+
+@rem build Updater's classpath and parameters
+SET TMP_CP="%SQUIRREL_SQL_HOME%\update\downloads\core\squirrel-sql.jar"
+dir /b "%SQUIRREL_SQL_HOME%\update\downloads\core\*.*" > %TEMP%\update-lib.tmp
+FOR /F %%I IN (%TEMP%\update-lib.tmp) DO CALL "%SQUIRREL_SQL_HOME%\addpath.bat" "%SQUIRREL_SQL_HOME%\update\downloads\core\%%I"
+SET UPDATE_CP=%TMP_CP%
+echo "UPDATE_CP=%UPDATE_CP%"
+
+@rem launch updater in "restore" mode
+SET UPDATE_PARMS=--log-config-file "%SQUIRREL_SQL_HOME%\update-log4j.properties" --squirrel-home "%SQUIRREL_SQL_HOME%"
+"%LOCAL_JAVA%w" -cp %UPDATE_CP% -Dlog4j.defaultInitOverride=true -Drestore=true net.sourceforge.squirrel_sql.client.update.gui.installer.PreLaunchUpdateApplication %UPDATE_PARAMS%
+
+
Copied: trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.bat (from rev 5805, trunk/sql12/app/cmd/squirrel-sql.bat)
===================================================================
--- trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.bat (rev 0)
+++ trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.bat 2010-08-21 18:12:23 UTC (rev 5826)
@@ -0,0 +1,63 @@
+@echo off
+
+@rem IZPACK_JAVA is filtered in by the IzPack installer when this script is installed
+set IZPACK_JAVA=%JAVA_HOME
+
+@rem We detect the java executable to use according to the following algorithm:
+@rem
+@rem 1. If the one used by the IzPack installer is available then use that; otherwise
+@rem 2. Use the java that is in the command path.
+@rem
+
+if exist "%IZPACK_JAVA%\bin\javaw.exe" (
+ set LOCAL_JAVA=%IZPACK_JAVA%\bin\javaw.exe
+) else (
+ set LOCAL_JAVA=javaw.exe
+)
+
+echo Using java: %LOCAL_JAVA%
+
+set basedir=%~f0
+:strip
+set removed=%basedir:~-1%
+set basedir=%basedir:~0,-1%
+if NOT "%removed%"=="\" goto strip
+set SQUIRREL_SQL_HOME=%basedir%
+
+@rem Check to see if we are running in a 1.6/1.7 JVM and inform the user if not and skip launch. versioncheck.jar
+@rem is a special jar file which has been compiled with javac version 1.2.2, which should be able to be run by
+@rem that version of higher. The arguments to JavaVersionChecker below specify the minimum acceptable version
+@rem (first arg) and any other acceptable subsequent versions. <MAJOR>.<MINOR> should be all that is
+@rem necessary for the version form.
+"%LOCAL_JAVA%" -cp "%SQUIRREL_SQL_HOME%\lib\versioncheck.jar" JavaVersionChecker 1.6 1.7
+if ErrorLevel 1 goto ExitForWrongJavaVersion
+
+@rem If the changelist.xml file isn't present or the downloaded update jars don't exist, skip launching the updater - these files are created by the
+@rem software update feature inside of SQuirreL. So their absence, simply means the software update feature hasn't been accessed.
+if not exist "%SQUIRREL_SQL_HOME%\update\changeList.xml" goto launchsquirrel
+SET TMP_CP="%SQUIRREL_SQL_HOME%\update\downloads\core\squirrel-sql.jar"
+if not exist %TMP_CP% goto launchsquirrel
+dir /b "%SQUIRREL_SQL_HOME%\update\downloads\core\*.*" > %TEMP%\update-lib.tmp
+FOR /F %%I IN (%TEMP%\update-lib.tmp) DO CALL "%SQUIRREL_SQL_HOME%\addpath.bat" "%SQUIRREL_SQL_HOME%\update\downloads\core\%%I"
+SET UPDATE_CP=%TMP_CP%
+SET UPDATE_PARMS=--log-config-file "%SQUIRREL_SQL_HOME%\update-log4j.properties" --squirrel-home "%SQUIRREL_SQL_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
+"%LOCAL_JAVA%" -cp %UPDATE_CP% -Dlog4j.defaultInitOverride=true -Dprompt=true net.sourceforge.squirrel_sql.client.update.gui.installer.PreLaunchUpdateApplication %UPDATE_PARAMS%
+
+:launchsquirrel
+@rem build SQuirreL's classpath
+set TMP_CP="%SQUIRREL_SQL_HOME%\squirrel-sql.jar"
+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"
+SET SQUIRREL_CP=%TMP_CP%
+echo "SQUIRREL_CP=%SQUIRREL_CP%"
+
+SET TMP_PARMS=--log-config-file "%SQUIRREL_SQL_HOME%\log4j.properties" --squirrel-home "%SQUIRREL_SQL_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
+
+@rem -Dsun.java2d.noddraw=true prevents performance problems on Win32 systems.
+
+@rem Run with no command window. This may not work with versions of Windows prior to XP.
+@rem Remove 'start "SQuirreL SQL Client" /B' for compatibility only if necessary
+start "SQuirreL SQL Client" /B "%LOCAL_JAVA%" -Xmx256m -Dsun.java2d.noddraw=true -cp %SQUIRREL_CP% net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%
+
+:ExitForWrongJavaVersion
+
Copied: trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.sh (from rev 5805, trunk/sql12/app/cmd/squirrel-sql.sh)
===================================================================
--- trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.sh (rev 0)
+++ trunk/sql12/installer/squirrelsql-launcher/src/main/resources/squirrel-sql.sh 2010-08-21 18:12:23 UTC (rev 5826)
@@ -0,0 +1,123 @@
+#! /bin/sh
+
+# This function sets a global variable named "CP" to a command-path separated list of jars located beneath the
+# specified folder. If the specified folder contains a lib directory, then jars beneath the lib folder are
+# @ added as well as the squirrel-sql.jar file located in the directory specified as the first argument to
+# this function.
+buildCPFromDir()
+{
+ if [ -d "$1"/lib ]; then
+ # First entry in classpath is the Squirrel application.
+ CP="$1/squirrel-sql.jar"
+
+ # Then add all library jars to the classpath.
+ for a in "$1"/lib/*; do
+ CP="$CP":"$a"
+ done
+ else
+ for a in "$1"/*; do
+ CP="$CP":"$a"
+ done
+ fi
+}
+
+# IZPACK_JAVA_HOME is filtered in by the IzPack installer when this script is installed
+IZPACK_JAVA_HOME=%JAVA_HOME
+
+# We detect the java executable to use according to the following algorithm:
+#
+# 1. If it is located in JAVA_HOME, then we use that; or
+# 2. If the one used by the IzPack installer is available then use that, otherwise
+# 3. Use the java that is in the command path.
+#
+if [ -d "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
+ JAVACMD="$JAVA_HOME/bin/java"
+elif [ -d "$IZPACK_JAVA_HOME" -a -x "$IZPACK_JAVA_HOME/bin/java" ]; then
+ JAVACMD="$IZPACK_JAVA_HOME/bin/java"
+else
+ JAVACMD=java
+fi
+
+# Are we running within Cygwin on some version of Windows or on Mac OS X?
+cygwin=false;
+macosx=false;
+case "`uname -s`" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+ Darwin*)
+ macosx=true
+ ;;
+esac
+
+# SQuirreL home.
+if $macosx ; then
+ SQUIRREL_SQL_HOME='%INSTALL_PATH/Contents/Resources/Java'
+else
+ SQUIRREL_SQL_HOME='%INSTALL_PATH'
+fi
+
+# SQuirreL home in Unix format.
+if $cygwin ; then
+ UNIX_STYLE_HOME=`cygpath "$SQUIRREL_SQL_HOME"`
+else
+ UNIX_STYLE_HOME="$SQUIRREL_SQL_HOME"
+fi
+
+cd "$UNIX_STYLE_HOME"
+
+# Check to see if the JVM meets the minimum required to run SQuirreL and inform the user if not and skip
+# launch. versioncheck.jar is a special jar file which has been compiled with javac version 1.2.2, which
+# should be able to be run by that version or higher. The arguments to JavaVersionChecker below specify the
+# minimum acceptable version (first arg) and any other acceptable subsequent versions. <MAJOR>.<MINOR> should
+# be all that is necessary for the version form.
+$JAVACMD -cp "$UNIX_STYLE_HOME/lib/versioncheck.jar" JavaVersionChecker 1.6 1.7
+if [ "$?" = "1" ]; then
+ exit
+fi
+
+# Build a command-path separated list of installed jars from the lib folder and squirrel-sql.jar
+buildCPFromDir "$UNIX_STYLE_HOME"
+TMP_CP=$CP
+
+# Set the update app's classpath to use jars in download area first, then the installed jars
+buildCPFromDir "$UNIX_STYLE_HOME/update/downloads/core"
+UPDATE_CP=$CP:$TMP_CP
+
+# Now add the system classpath to the classpath. If running
+# Cygwin we also need to change the classpath to Windows format.
+if $cygwin ; then
+ TMP_CP=`cygpath -w -p $TMP_CP`
+ UPDATE_CP=`cygpath -w -p $UPDATE_CP`
+ TMP_CP=$TMP_CP';'$CLASSPATH
+ UPDATE_CP=$UPDATE_CP';'$CLASSPATH
+else
+ TMP_CP=$TMP_CP:$CLASSPATH
+ UPDATE_CP=$UPDATE_CP:$CLASSPATH
+fi
+
+if $macosx ; then
+ # Define mac-specific system properties if running on Mac OS X
+ MACOSX_UPDATER_PROPS="-Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=SQuirreLSQLUpdater"
+ MACOSX_SQUIRREL_PROPS="-Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=SQuirreLSQL"
+ NATIVE_LAF_PROP="--native-laf"
+fi
+
+# Check for updates and prompt to apply if any are available
+if [ -f "$UNIX_STYLE_HOME/update/downloads/core/squirrel-sql.jar" -a -f "$UNIX_STYLE_HOME/update/changeList.xml" ]; then
+ $JAVACMD -cp "$UPDATE_CP" $MACOSX_UPDATER_PROPS -Dlog4j.defaultInitOverride=true -Dprompt=true net.sourceforge.squirrel_sql.client.update.gui.installer.PreLaunchUpdateApplication -l "$UNIX_STYLE_HOME/update-log4j.properties"
+fi
+
+if $macosx ; then
+ # macosx provides unknown args to the script, causing SQuirreL to bail..
+ SCRIPT_ARGS=""
+else
+ SCRIPT_ARGS="$1 $2 $3 $4 $5 $6 $7 $8 $9"
+fi
+
+# Now, pickup all jars once again from the installation and lib directories in case any new jars were
+# downloaded during the update process. The variable "CP" is assigned this value.
+buildCPFromDir "$UNIX_STYLE_HOME"
+
+# Launch SQuirreL application
+$JAVACMD -Xmx256m -cp "$CP" $MACOSX_SQUIRREL_PROPS net.sourceforge.squirrel_sql.client.Main --log-config-file "$UNIX_STYLE_HOME"/log4j.properties --squirrel-home "$UNIX_STYLE_HOME" $NATIVE_LAF_PROP $SCRIPT_ARGS
Copied: trunk/sql12/installer/squirrelsql-launcher/src/main/resources/update-log4j.properties (from rev 5805, trunk/sql12/app/cmd/update-log4j.properties)
===================================================================
--- trunk/sql12/installer/squirrelsql-launcher/src/main/resources/update-log4j.properties (rev 0)
+++ trunk/sql12/installer/squirrelsql-launcher/src/main/resources/update-log4j.properties 2010-08-21 18:12:23 UTC (rev 5826)
@@ -0,0 +1,7 @@
+log4j.appender.SquirrelAppender=net.sourceforge.squirrel_sql.client.SquirrelAppender
+log4j.appender.SquirrelAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.SquirrelAppender.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c %x - %m%n
+log4j.appender.SquirrelAppender.DatePattern='.'yyyy-ww
+
+log4j.rootLogger=debug, SquirrelAppender
+log4j.logger.org.springframework=WARN, SquirrelAppender
Copied: trunk/sql12/installer/squirrelsql-macosx-installer/src/main/resources/Info.plist (from rev 5805, trunk/sql12/mac/Contents/Info.plist)
===================================================================
--- trunk/sql12/installer/squirrelsql-macosx-installer/src/main/resources/Info.plist (rev 0)
+++ trunk/sql12/installer/squirrelsql-macosx-installer/src/main/resources/Info.plist 2010-08-21 18:12:23 UTC (rev 5826)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleName</key>
+ <string>SQuirreLSQL</string>
+
+ <key>CFBundleExecutable</key>
+ <string>squirrel-sql.sh</string>
+
+ <key>CFBundleIconFile</key>
+ <string>acorn.icns</string>
+
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleSignature</key>
+ <string>????</string>
+</dict>
+</plist>
Copied: trunk/sql12/installer/squirrelsql-macosx-installer/src/main/resources/acorn.icns (from rev 5805, trunk/sql12/mac/Contents/Resources/acorn.icns)
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|