OSDN Git Service

Update to suppport install program.
authorRandy Baumgarte <randy@fbn.cx>
Mon, 20 Sep 2010 23:33:35 +0000 (19:33 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Mon, 20 Sep 2010 23:40:22 +0000 (19:40 -0400)
nevernote.bat

index 73a0ba0..e8bf6d1 100644 (file)
@@ -1,12 +1,8 @@
+@echo off\r
 rem #####################\r
 rem # Install variables #\r
 rem #####################\r
-set NEVERNOTE=C:\NeverNote\r
-set JAMBI_LOCATION=C:\qtjambi-win32-lgpl-4.5.2_01\r
-set JAMBI_VERSION=4.5.2_01\r
-set JAMBI_PLATFORM=win32-msvc2005\r
-\r
-\r
+set NEVERNOTE=%~dp0\r
 \r
 \r
 rem ########################################\r
@@ -56,8 +52,8 @@ rem # properly.  If you only want to run   #
 rem # one copy under a single userid, this #\r
 rem # can be commented out.                #\r
 rem ########################################\r
-rem set NN_NAME="sandbox"  \r
-\r
+set NN_NAME=\r
+rem set NN_NAME="production"  \r
 \r
 \r
 \r
@@ -67,20 +63,36 @@ rem ## You probably don't need to change anything below this line. ##
 rem #################################################################\r
 rem #################################################################\r
 \r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+if "%1" == "NN_NAME" set NN_NAME=%2\r
+echo %NN_NAME%\r
+shift \r
+shift\r
+GOTO Loop\r
+:Continue\r
 \r
 rem #####################\r
 rem # Setup environment #\r
 rem #####################\r
-set NN_CLASSPATH=%NEVERNOTE%\nevernote.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%\lib\evernote.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%\lib\libthrift.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%\lib\log4j-1.2.14.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%\lib\h2-1.2.136.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%\lib\PDFRenderer.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%\lib\commons-lang-2.4.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%JAMBI_LOCATION%\qtjambi-%JAMBI_VERSION%.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%JAMBI_LOCATION%\qtjambi-util-%JAMBI_VERSION%.jar\r
-set NN_CLASSPATH=%NN_CLASSPATH%;%JAMBI_LOCATION%\qtjambi-%JAMBI_PLATFORM%-%JAMBI_VERSION%.jar\r
+set NN_CLASSPATH=%NEVERNOTE%nevernote.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\evernote.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\libthrift.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\log4j-1.2.14.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\h2-1.2.136.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\PDFRenderer.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\commons-lang-2.4.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\jtidy-r938.jar\r
+if exist "%NEVERNOTE%lib\qtjambi-win32-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\qtjambi-win32-4.5.2_01.jar\r
+if exist "%NEVERNOTE%lib\qtjambi-win32-msvc2005-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\qtjambi-win32-msvc2005-4.5.2_01.jar\r
+if exist "%NEVERNOTE%lib\qtjambi-win64-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\qtjambi-win32-4.5.2_01.jar\r
+if exist "%NEVERNOTE%lib\qtjambi-win64-msvc2005x64-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEVERNOTE%lib\qtjambi-win64-msvc2005x64-4.5.2_01.jar\r
+\r
+rem set NN_CLASSPATH="%NN_CLASSPATH%"\r
+\r
+@echo on\r
+\r
+rem java -Xmx%NN_XMX% -Xms%NN_XMS%  -XX:NewRatio=%NN_NEW_RATIO% %NN_GC_OPT% %NN_DEBUG%  -classpath "%NN_CLASSPATH%" cx.fbn.nevernote.NeverNote --name=%NN_NAME%\r
 \r
-start /B javaw -Xmx%NN_XMX% -Xms%NN_XMS%  -XX:NewRatio=%NN_NEW_RATIO% %NN_GC_OPT% %NN_DEBUG%  -classpath %NN_CLASSPATH% cx.fbn.nevernote.NeverNote --name=%NN_NAME%\r
+start /B javaw -Xmx%NN_XMX% -Xms%NN_XMS%  -XX:NewRatio=%NN_NEW_RATIO% %NN_GC_OPT% %NN_DEBUG%  -classpath "%NN_CLASSPATH%" cx.fbn.nevernote.NeverNote --name=%NN_NAME%\r
 exit\r