OSDN Git Service

GitHub最初のコミット(SourceForge.jp 128fa38 2013-02-28 15:28:57 と同じ内容)
[neighbornote/NeighborNote.git] / neighbornote.bat
diff --git a/neighbornote.bat b/neighbornote.bat
new file mode 100755 (executable)
index 0000000..6893c6e
--- /dev/null
@@ -0,0 +1,119 @@
+@echo off\r
+rem #####################\r
+rem # Install variables #\r
+rem #####################\r
+set NEIGHBORNOTE=%~dp0\r
+\r
+rem ########################################\r
+rem # Memory settings.  These can be tuned #\r
+rem # to your specific needs.  The greater #\r
+rem # the memory allocated the better      #\r
+rem # your response may be, but the more   #\r
+rem # resources the program will consume.  #\r
+rem # Lower numbers may hurt performance   #\r
+rem # but will reduce resource held by     #\r
+rem # the program.  If you get errors      #\r
+rem # that say "out of memory" you need    #\r
+rem # to increase these values.            #\r
+rem ########################################\r
+rem # Initial heap size\r
+set NN_XMS=256M\r
+rem # Maximum heap size\r
+set NN_XMX=1024M\r
+\r
+rem ## The young generation\r
+rem # the young generation will occupy 1/2 of total heap\r
+set NN_NEW_RATIO=1\r
+\r
+rem ## GC option\r
+rem ## recommend Incremental Low Pause GC for desktop apps \r
+set NN_GC_OPT=-Xincgc\r
+rem ## recent multi-core CPU may show good performance\r
+rem set NN_GC_OPT=-XX:+UseParNewGC\r
+rem set NN_GC_OPT=-XX:+UseConcMarkSweepGC\r
+rem ## same as default\r
+rem set NN_GC_OPT=-XX:+UseParallelGC\r
+\r
+rem ## debug\r
+rem set NN_DEBUG=-agentlib:hprof=format=b\r
+rem set NN_DEBUG=-agentlib:hprof=cpu=samples,format=a\r
+rem set NN_DEBUG=-verbose:gc \r
+\r
+rem ########################################\r
+rem # This next variable is optional. It   #\r
+rem # is only needed if you want to run    #\r
+rem # multiple copies of NeighborNote under#\r
+rem # the same user id.  Each              #\r
+rem # additional copy (after the first)    #\r
+rem # should have a unique name.  This     #\r
+rem # permits the settings to be saved     #\r
+rem # properly.  If you only want to run   #\r
+rem # one copy under a single userid, this #\r
+rem # can be commented out.                #\r
+rem ########################################\r
+set NN_NAME=\r
+rem set NN_NAME="production"  \r
+\r
+\r
+\r
+rem #################################################################\r
+rem #################################################################\r
+rem ## You probably don't need to change anything below this line. ##\r
+rem #################################################################\r
+rem #################################################################\r
+\r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+if "%1" == "NN_NAME" set NN_NAME=%2\r
+if "%1" == "NN_HOME" set NN_HOME=%2\r
+if "%1" == "NN_SYNCONLY" set NN_SYNCONLY=%2\r
+if "%1" == "NN_GC_OPT" set NN_GC_OPT=%2\r
+if "%1" == "NN_DEBUG" set NN_DEBUG=%2\r
+shift \r
+shift\r
+GOTO Loop\r
+:Continue\r
+\r
+rem #####################\r
+rem # Setup environment #\r
+rem #####################\r
+set NN_CLASSPATH=%NEIGHBORNOTE%neighbornote.jar\r
+\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\apache-mime4j-0.6.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\commons-codec-1.5.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\commons-compress-1.2.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\commons-lang3-3.0.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\commons-logging-1.1.1.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\evernote-api-1.20.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\h2-1.3.158.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\httpclient-4.1.1.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\httpcore-4.1.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\httpmime-4.1.1.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\jaxen-1.1.3.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\jazzy.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\jtidy-r938.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\libthrift.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\log4j-1.2.14.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\pdfbox-app-1.6.0.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\poi-3.7-20101029.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\poi-ooxml-3.7.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\poi-ooxml-schemas-3.7-20101029.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\poi-scratchpad-3.7-20101029.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\scribe-1.3.0.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\tika.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\xmlbeans-2.3.0.jar\r
+set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\xsdlib-20060615.jar\r
+\r
+if exist "%NEIGHBORNOTE%lib\qtjambi-win32-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\qtjambi-win32-4.5.2_01.jar\r
+if exist "%NEIGHBORNOTE%lib\qtjambi-win32-msvc2005-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\qtjambi-win32-msvc2005-4.5.2_01.jar\r
+if exist "%NEIGHBORNOTE%lib\qtjambi-win64-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%lib\qtjambi-win64-4.5.2_01.jar\r
+if exist "%NEIGHBORNOTE%lib\qtjambi-win64-msvc2005x64-4.5.2_01.jar" set NN_CLASSPATH=%NN_CLASSPATH%;%NEIGHBORNOTE%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 --sync-only=%NN_SYNCONLY% --name=%NN_NAME% --home=%NN_HOME%\r
+exit\r