OSDN Git Service

Merge remote-tracking branch 'origin/develop'
[neighbornote/NeighborNote.git] / neighbornote-osx
1 #! /bin/sh
2
3 ###########################################
4 # NeighborNote Startup script for OS-X
5 ###########################################
6
7
8 eval $1
9
10 ###########################################
11 # Location variables. Edit the variables #
12 # below to your specific installation. #
13 # The ones below are examples only. #
14 ###########################################
15
16 NEIGHBORNOTE=$(cd `dirname $0` && pwd)
17 # NEIGHBORNOTE=/usr/share/neighbornote
18
19 ########################################
20 # Memory settings. These can be tuned #
21 # to your specific needs. The greater #
22 # the memory allocated the better #
23 # your response may be, but the more #
24 # resources the program will consume. #
25 # Lower numbers may hurt performance #
26 # but will reduce resource held by #
27 # the program. If you get errors #
28 # that say "out of memory" you need #
29 # to increase these values. #
30 ########################################
31 # Initial heap size
32 NN_XMS=256M
33 # Maximum heap size
34 NN_XMX=1024M
35
36 ## The young generation
37 # the young generation will occupy 1/2 of total heap
38 NN_NEW_RATIO=1
39
40 ## GC option
41 ## recommend Incremental Low Pause GC for desktop apps 
42 NN_GC_OPT=-Xincgc
43 ## recent multi-core CPU may show good performance
44 #NN_GC_OPT=-XX:+UseParNewGC
45 #NN_GC_OPT=-XX:+UseConcMarkSweepGC
46 ## same as default
47 #NN_GC_OPT=-XX:+UseParallelGC
48
49 ## debug
50 #NN_DEBUG=-agentlib:hprof=format=b
51 #NN_DEBUG=-agentlib:hprof=cpu=samples,format=a
52 #NN_DEBUG=-verbose:gc 
53
54 ########################################
55 # This next variable is optional. It #
56 # is only needed if you want to run #
57 # multiple copies of NeighborNote under #
58 # the same Linux user id. Each #
59 # additional copy (after the first) #
60 # should have a unique name. This #
61 # permits the settings to be saved #
62 # properly. If you only want to run #
63 # one copy under a single userid, this #
64 # can be commented out. #
65 ########################################
66 #NN_NAME="sandbox" 
67
68
69 #Do any parameter overrides
70 while [ -n "$*" ]
71 do
72 eval $1
73 shift
74 done
75
76
77 ###################################################################
78 ###################################################################
79 ## You probably don't need to change anything below this line. ##
80 ###################################################################
81 ###################################################################
82
83
84 #####################
85 # Setup environment #
86 #####################
87 NN_CLASSPATH=$NEIGHBORNOTE/neighbornote.jar
88
89 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/apache-mime4j-0.6.jar
90 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/commons-codec-1.5.jar
91 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/commons-compress-1.2.jar
92 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/commons-lang3-3.0.jar
93 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/commons-logging-1.1.1.jar
94 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/evernote-api-1.25.0.jar
95 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/h2-1.3.163.jar
96 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/h2-lucene-ex-1.3.163.jar
97 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/httpclient-4.1.1.jar
98 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/httpcore-4.1.jar
99 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/httpmime-4.1.1.jar
100 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/jaxen-1.1.3.jar
101 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/jazzy.jar
102 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/jtidy-r938.jar
103 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/libthrift.jar
104 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/log4j-1.2.14.jar
105 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/lucene-analyzers-3.6.2.jar
106 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/lucene-core-3.6.2.jar
107 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/pdfbox-app-1.6.0.jar
108 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/poi-3.7-20101029.jar
109 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/poi-ooxml-3.7.jar
110 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/poi-ooxml-schemas-3.7-20101029.jar
111 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/poi-scratchpad-3.7-20101029.jar
112 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/scribe-1.3.0.jar
113 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/tika.jar
114 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/xmlbeans-2.3.0.jar
115 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/xsdlib-20060615.jar
116
117 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/qtjambi-macosx-4.5.2_01.jar
118 NN_CLASSPATH=$NN_CLASSPATH:$NEIGHBORNOTE/lib/qtjambi-macosx-gcc-4.5.2_01.jar
119
120 ###################
121 # Run the program #
122 ###################
123 cd $NEIGHBORNOTE
124
125 java -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 --home=$NN_HOME --name=$NN_NAME -XstartOnFirstThread -d32 -client
126
127 cd -
128