Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 255 lines (177 sloc) 6.707 kb
8a9c095 @ccgus Added Gus's build script.
authored
1 #!/bin/bash
2
3 # there's a lot of gus specific stuff in here.
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
4 SRC_DIR=`cd ${0%/*}/..; pwd`
8a9c095 @ccgus Added Gus's build script.
authored
5 startDate=`/bin/date`
6 revision=""
7 upload=1
8 ql=1
606a13a @ccgus finally hit upon some stuff that'll make the app store happy.
authored
9 appStoreSettings=""
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
10 archFlags=""
11 appStore=0
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
12 checkout=1
13
8a9c095 @ccgus Added Gus's build script.
authored
14
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
15 while getopts e:nr:st option
8a9c095 @ccgus Added Gus's build script.
authored
16 do
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
17 case "${option}"
18 in
19 e)
20 echoversion=${OPTARG}
4af68c9 @ccgus moar app store stuff.
authored
21 ;;
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
22 n)
23 upload=0
24 ;;
25 r)
26 revision="-r ${OPTARG}"
8a9c095 @ccgus Added Gus's build script.
authored
27 upload=0
28 ;;
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
29 s)
30 appStore=1
8a9c095 @ccgus Added Gus's build script.
authored
31 upload=0
606a13a @ccgus finally hit upon some stuff that'll make the app store happy.
authored
32 appStoreSettings="-xcconfig AppStore.xcconfig"
33 #echo 'CODE_SIGN_IDENTITY=3rd Party Mac Developer Application: Flying Meat Inc.' > AppStore.xcconfig
34 echo "OTHER_CFLAGS=-DMAC_APP_STORE" > AppStore.xcconfig
8a9c095 @ccgus Added Gus's build script.
authored
35 ;;
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
36 t)
37 echo "USING LOCAL TREE"
38 checkout=0
8a9c095 @ccgus Added Gus's build script.
authored
39 ;;
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
40
41 \?) usage
42 echo "invalid option: $1" 1>&2
8a9c095 @ccgus Added Gus's build script.
authored
43 exit 1
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
44 ;;
45 esac
8a9c095 @ccgus Added Gus's build script.
authored
46 done
47
48
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
49
50
8a9c095 @ccgus Added Gus's build script.
authored
51 if [ "$echoversion" != "" ]; then
52 version=$echoversion
53
606a13a @ccgus finally hit upon some stuff that'll make the app store happy.
authored
54 # this is for gus to make distributions with.
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
55
606a13a @ccgus finally hit upon some stuff that'll make the app store happy.
authored
56 echo "cd ~/jstalk/download/"
57 echo "cp JSTalkPreview.zip JSTalk-$version.zip"
58 echo "rm JSTalk.zip; ln -s JSTalk-$version.zip JSTalk.zip"
8a9c095 @ccgus Added Gus's build script.
authored
59
60 exit
61 fi
62
63
64 buildDate=`/bin/date +"%Y.%m.%d.%H"`
65
66 if [ ! -d ~/cvsbuilds ]; then
67 mkdir ~/cvsbuilds
68 fi
69
70 echo cleaning.
71 rm -rf ~/cvsbuilds/JSTalk*
72 rm -rf /tmp/jstalk
73
74 source ~/.bash_profile
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
75 v=`date "+%s"`
8a9c095 @ccgus Added Gus's build script.
authored
76
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
77 if [ $checkout == 1 ]; then
8a9c095 @ccgus Added Gus's build script.
authored
78
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
79 cd /tmp
80
81 echo "doing remote checkout ($revision) upload($upload)"
82 git clone git://github.com/ccgus/jstalk.git
83 else
84 echo "Copying local tree"
85 cp -r $SRC_DIR /tmp/jstalk
86 fi
e050136 @ccgus added the ability to specify a plugin at launch time
authored
87
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
88 cd /tmp/jstalk
8a9c095 @ccgus Added Gus's build script.
authored
89
90 echo setting build id
91 sed -e "s/BUILDID/$v/g" res/Info.plist > res/Info.plist.tmp
92 mv res/Info.plist.tmp res/Info.plist
93
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
94
95
1a51751 @ccgus Typo fixer
authored
96 xcodebuild=/usr/bin/xcodebuild
8a9c095 @ccgus Added Gus's build script.
authored
97 function buildTarget {
98
99 echo Building "$1"
100
606a13a @ccgus finally hit upon some stuff that'll make the app store happy.
authored
101 $xcodebuild -target "$1" -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build $appStoreSettings
8a9c095 @ccgus Added Gus's build script.
authored
102
103 if [ $? != 0 ]; then
104 echo "****** Bad build for $1 ********"
105 say "Bad build for $1"
e4b32f9 @ccgus Mac App Store stuff. Possibly. It's flaky.
authored
106
8a9c095 @ccgus Added Gus's build script.
authored
107 fi
108 }
109
110
111 buildTarget "JSTalk Framework"
112 buildTarget "jstalk command line"
113 buildTarget "JSTalkRunner"
114 buildTarget "JSTalk Editor"
115
116
21db634 @ccgus Changes to check and see if an application is running already before lau...
authored
117 cd /tmp/jstalk/plugins/acornplugin
56120b7 @ccgus Building a ppc version of the JSTalk framework.
authored
118 $xcodebuild -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build OTHER_CFLAGS=""
8a9c095 @ccgus Added Gus's build script.
authored
119 if [ $? != 0 ]; then
120 echo "****** Bad build for acorn plugin ********"
121 exit
122 fi
123
21db634 @ccgus Changes to check and see if an application is running already before lau...
authored
124 cd /tmp/jstalk/plugins/voodoopadplugin
56120b7 @ccgus Building a ppc version of the JSTalk framework.
authored
125 $xcodebuild -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build OTHER_CFLAGS=""
8a9c095 @ccgus Added Gus's build script.
authored
126 if [ $? != 0 ]; then
127 echo "****** Bad build for vp plugin ********"
128 exit
129 fi
130
131
21db634 @ccgus Changes to check and see if an application is running already before lau...
authored
132 cd /tmp/jstalk/plugins/sqlite-fmdb-jstplugin
56120b7 @ccgus Building a ppc version of the JSTalk framework.
authored
133 $xcodebuild -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build OTHER_CFLAGS="" -target fmdbextra
966b9e4 @ccgus updated build script, and example for fmdb extra
authored
134 if [ $? != 0 ]; then
135 echo "****** Bad build for fmdb extra ********"
136 exit
137 fi
138
a679f06 @ccgus project fixes for the ci + opencl stuff.
authored
139
2e39fe2 @ccgus updated samples.
authored
140 cd /tmp/jstalk/plugins/imagetools
a679f06 @ccgus project fixes for the ci + opencl stuff.
authored
141 $xcodebuild -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build OTHER_CFLAGS=""
142 if [ $? != 0 ]; then
2e39fe2 @ccgus updated samples.
authored
143 echo "****** Bad build for Image Tools ********"
a679f06 @ccgus project fixes for the ci + opencl stuff.
authored
144 exit
145 fi
146
6454f67 @ccgus Now including GTMScriptRunner by default with builds.
authored
147 cd /tmp/jstalk/plugins/GTMScriptRunner-jstplugin
148 $xcodebuild -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build OTHER_CFLAGS=""
149 if [ $? != 0 ]; then
150 echo "****** Bad build for GTMScriptRunner ********"
151 exit
152 fi
153
2310230 Automator goodness.
August Mueller authored
154 cd /tmp/jstalk/automator/
155 $xcodebuild -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build OTHER_CFLAGS="" -target JSTAutomator
156 if [ $? != 0 ]; then
157 echo "****** Bad build for automator action ********"
158 exit
159 fi
160
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
161
162 cd /tmp/jstalk/build/Release/
163
2310230 Automator goodness.
August Mueller authored
164 mkdir -p /tmp/jstalk/build/Release/JSTalk\ Editor.app/Contents/Library/Automator
165 mv /tmp/jstalk/build/Release/JSTalk.action /tmp/jstalk/build/Release/JSTalk\ Editor.app/Contents/Library/Automator/.
166
8a9c095 @ccgus Added Gus's build script.
authored
167 if [ ! -d ~/cvsbuilds ]; then
168 mkdir ~/cvsbuilds
169 fi
170
171
172 mkdir JSTalkFoo
173
174 mv jstalk JSTalkFoo/.
175 mv "JSTalk Editor.app" JSTalkFoo/.
176
177 # I do a cp here, since I rely on this framework being here for other builds...
178 cp -R JSTalk.framework JSTalkFoo/.
179 cp -R /tmp/jstalk/example_scripts JSTalkFoo/examples
21db634 @ccgus Changes to check and see if an application is running already before lau...
authored
180 cp -R /tmp/jstalk/plugins/sqlite-fmdb-jstplugin/fmdb.jstalk JSTalkFoo/examples/.
8a9c095 @ccgus Added Gus's build script.
authored
181
21db634 @ccgus Changes to check and see if an application is running already before lau...
authored
182 mkdir JSTalkFoo/plugins
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
183 mkdir -p JSTalkFoo/JSTalk\ Editor.app/Contents/PlugIns
184
a679f06 @ccgus project fixes for the ci + opencl stuff.
authored
185 cp -r JSTalk.acplugin JSTalkFoo/plugins/.
186 cp -r JSTalk.vpplugin JSTalkFoo/plugins/.
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
187 cp -r FMDB.jstplugin JSTalkFoo/JSTalk\ Editor.app/Contents/PlugIns/.
188 cp -r ImageTools.jstplugin JSTalkFoo/JSTalk\ Editor.app/Contents/PlugIns/.
6454f67 @ccgus Now including GTMScriptRunner by default with builds.
authored
189 cp -r GTMScriptRunner.jstplugin JSTalkFoo/JSTalk\ Editor.app/Contents/PlugIns/.
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
190
9db59a8 stupid git
August Mueller authored
191 mv /tmp/jstalk/plugins/proxitask/JSTalkProxiTask.bundle JSTalkFoo/plugins/.
8a9c095 @ccgus Added Gus's build script.
authored
192
21db634 @ccgus Changes to check and see if an application is running already before lau...
authored
193 cp /tmp/jstalk/plugins/README.txt JSTalkFoo/plugins/.
8a9c095 @ccgus Added Gus's build script.
authored
194
195 mv JSTalkFoo JSTalk
196
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
197 mv JSTalk ~/cvsbuilds/.
198
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
199
200 if [ $appStore = 1 ]; then
4af68c9 @ccgus moar app store stuff.
authored
201
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
202 cd ~/cvsbuilds/JSTalk
203
204 cd JSTalk\ Editor.app/Contents/Resources/JSTalkRunner.app/Contents/Frameworks/JSTalk.framework/Versions/A/Resources/
205
206 # app loader doesn't like multipe frameworks with the same id in it.
207 sed -e "s/org.jstalk.JSTalk/org.jstalk.JSTalkRunnerF/g" Info.plist > Info.plist.tmp
208 mv Info.plist.tmp Info.plist
209
210
211 cd ~/cvsbuilds/JSTalk
212 cd JSTalk\ Editor.app/Contents/Frameworks/JSTalk.framework/Versions/A/Resources/
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
213
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
214 # app loader doesn't like multipe frameworks with the same id in it.
215 sed -e "s/org.jstalk.JSTalk/org.jstalk.JSTalkEditor.JSTalkFramework/g" Info.plist > Info.plist.tmp
216 mv Info.plist.tmp Info.plist
217
218 cd ~/cvsbuilds/JSTalk
219
606a13a @ccgus finally hit upon some stuff that'll make the app store happy.
authored
220 /usr/bin/codesign -f -s "3rd Party Mac Developer Application: Flying Meat Inc." JSTalk\ Editor.app
221
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
222 productbuild --product /tmp/jstalk/res/jstalk_product_definition.plist --component JSTalk\ Editor.app /Applications --sign '3rd Party Mac Developer Installer: Flying Meat Inc.' JSTalkEditor.pkg
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
223
224 open .
225
226 exit
227 fi
228
ff2d673 @ccgus Finally made something that can be uploaded to the MAS.
authored
229 cd ~/cvsbuilds
5fa3ad6 @ccgus ohhhhhh did somebody say mac app store? We'll see.
authored
230
8a9c095 @ccgus Added Gus's build script.
authored
231 ditto -c -k --sequesterRsrc --keepParent JSTalk JSTalk.zip
232
233 rm -rf JSTalk
234
235 cp JSTalk.zip $v-JSTalk.zip
236
237
238 if [ $upload == 1 ]; then
239 echo uploading to server...
240
49ee971 @ccgus Now there's a website and stuff. How awesome is that?
authored
241 #downloadDir=latest
8a9c095 @ccgus Added Gus's build script.
authored
242
49ee971 @ccgus Now there's a website and stuff. How awesome is that?
authored
243 scp ~/cvsbuilds/JSTalk.zip gus@elvis.mu.org:~/jstalk/download/JSTalkPreview.zip
8a9c095 @ccgus Added Gus's build script.
authored
244 #scp /tmp/jstalk/res/jstalkupdate.xml gus@elvis.mu.org:~/fm/download/$downloadDir/.
245 #scp /tmp/jstalk/res/shortnotes.html gus@elvis:~/fm/download/$downloadDir/jstalkshortnotes.html
246 fi
247
248 say "done building"
249
250 endDate=`/bin/date`
251 echo Start: $startDate
252 echo End: $endDate
253
254 echo "(That was version $v)"
Something went wrong with that request. Please try again.