OSDN Git Service

Add the ability to add & remove notebook stacks.
[neighbornote/NeighborNote.git] / nevernote-osx
1 #! /bin/sh
2
3 ###########################################
4 # NeverNote 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 NEVERNOTE=$(cd `dirname $0` && pwd)
17 # NEVERNOTE=/usr/share/nevernote
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=512M
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 NeverNote 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=$NEVERNOTE/nevernote.jar
88 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/evernote.jar
89 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/h2-1.2.136.jar
90 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/libthrift.jar
91 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/log4j-1.2.14.jar
92 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/PDFRenderer.jar
93 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/commons-lang-2.4.jar
94 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/jtidy-r938.jar 
95 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/qtjambi-macosx-4.5.2_01.jar
96 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/qtjambi-macosx-gcc-4.5.2_01.jar
97
98
99 ###################
100 # Run the program #
101 ###################
102 cd $NEVERNOTE
103
104 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 -XstartOnFirstThread -d32 -client
105
106 cd -
107