/[svn]/misc/trunk/mac_package_builder/make-tar-file.sh
ViewVC logotype

Contents of /misc/trunk/mac_package_builder/make-tar-file.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3495 - (show annotations) (download) (as text)
Sun Mar 10 07:38:26 2019 UTC (3 years, 3 months ago) by persson
File MIME type: application/x-sh
File size: 10469 byte(s)
* Mac: Use the new C++11 builds, with GTK 3 for gigedit and Qt 5 for
  qsampler (64-bit only, macOS 10.7 or later required)

1 #!/bin/sh -xe
2
3 # This script is primarily made for the linuxsampler build server. It
4 # copies the files created by the previous Max OS X build steps. Then
5 # it packs all components as a .pkg Mac installer package and finally
6 # it wraps everything in a tar.bz2 archive.
7
8 LIPO=x86_64-apple-darwin9-lipo
9 P=/home/persson/mac64
10 D=linuxsampler_`date +%Y%m%d`
11
12 # command line tools shipped with libgig
13 gigtools_bins="akaidump akaiextract dlsdump gig2mono gig2stereo gigdump gigextract gigmerge korg2gig korgdump rifftree sf2dump sf2extract"
14
15 createuniv ()
16 {
17 # we no longer support i686 and powerpc
18 # $LIPO -create "$P/x86_64/$1" "$P/i686/$1" "$P/powerpc/$1" \
19 # -output "$D/${2-$1}"
20 cp -a "$P/$1" "$D/${2-$1}"
21 }
22
23
24 rm -rf linuxsampler_*
25 rm -rf components
26 rm -rf linuxsampler.prepkg
27 rm -rf LinuxSampler.pkg
28 mkdir -p "$D/LinuxSampler" "$D/lib"
29
30
31 # linuxsampler, libgig and dependencies
32
33 createuniv lib/libogg.0.dylib
34 createuniv lib/libvorbis.0.dylib
35 createuniv lib/libvorbisenc.2.dylib
36 createuniv lib/libFLAC.8.dylib
37 createuniv lib/libsndfile.1.dylib
38 createuniv lib/libgig/libgig.8.dylib lib/libgig.8.dylib
39 createuniv lib/linuxsampler/liblinuxsampler.5.dylib lib/liblinuxsampler.5.dylib
40 createuniv bin/linuxsampler LinuxSampler/linuxsampler
41 createuniv bin/lscp LinuxSampler/lscp
42 cp README "$D"
43 cp licenses.txt "$D/LinuxSampler"
44
45 # AU plugin
46
47 cp -r "$P/Components/LinuxSamplerAU.component" "$D"
48 createuniv Components/LinuxSamplerAU.component/Contents/MacOS/LinuxSamplerAU LinuxSamplerAU.component/Contents/MacOS/LinuxSamplerAU
49
50
51 # VST plugin
52
53 cp -r "$P/VST/LinuxSampler.vst" "$D"
54 createuniv VST/LinuxSampler.vst/Contents/MacOS/LinuxSampler LinuxSampler.vst/Contents/MacOS/LinuxSampler
55
56
57 # gigtools
58
59 for x in $gigtools_bins
60 do
61 createuniv "bin/$x" "LinuxSampler/$x"
62 done
63
64
65 # Fantasia
66
67 cp -r "/home/persson/mac/Fantasia.app" "$D/LinuxSampler"
68
69
70 # QSampler
71
72 ./make-qsampler-app.sh
73 mv qsampler.app "$D/LinuxSampler"
74
75
76 # Gigedit
77
78 # no powerpc build of gigedit
79 createuniv ()
80 {
81 #$LIPO -create "$P/x86_64/$1" "$P/i686/$1" \
82 # -output "$D/${2-$1}"
83 cp -a "$P/$1" "$D/${2-$1}"
84 }
85
86 mkdir -p "$D/LinuxSampler/gigedit.app/Contents/MacOS" \
87 "$D/lib/gdk-pixbuf-2.0/2.10.0/loaders" \
88 "$D/share/locale/sv/LC_MESSAGES" \
89 "$D/share/locale/de/LC_MESSAGES" \
90 "$D/lib/linuxsampler/plugins"
91
92 createuniv lib/gigedit/libgigedit.4.dylib lib/libgigedit.4.dylib
93 createuniv bin/gigedit LinuxSampler/gigedit.app/Contents/MacOS/gigedit
94 createuniv lib/linuxsampler/plugins/libgigeditlinuxsamplerplugin.so
95
96 for x in libatk-1.0.0.dylib libatkmm-1.6.1.dylib libcairo.2.dylib \
97 libcairo-gobject.2.dylib \
98 libcairomm-1.0.1.dylib libepoxy.0.dylib libffi.6.dylib libfontconfig.1.dylib \
99 libfreetype.6.dylib libgailutil-3.0.dylib libgdk-3.0.dylib libgdkmm-3.0.1.dylib \
100 libgdk_pixbuf-2.0.0.dylib libgio-2.0.0.dylib \
101 libgiomm-2.4.1.dylib libglib-2.0.0.dylib libglibmm-2.4.1.dylib \
102 libgmodule-2.0.0.dylib libgobject-2.0.0.dylib libgthread-2.0.0.dylib \
103 libgtk-3.0.dylib libgtkmm-3.0.1.dylib libintl.9.dylib \
104 libpango-1.0.0.dylib libpangocairo-1.0.0.dylib \
105 libpangomm-1.4.1.dylib libpixman-1.0.dylib libpng16.16.dylib \
106 libsigc-2.0.0.dylib \
107 gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so \
108 gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so \
109 libharfbuzz.0.dylib libpangoft2-1.0.0.dylib libfribidi.0.dylib
110 do
111 #$LIPO -create "/home/persson/macgtk64/lib/$x" \
112 #"/home/persson/macgtk32/lib/$x" \
113 #-output "$D/lib/$x"
114 cp -a "$P/lib/$x" "$D/lib/$x"
115 done
116
117 cp PkgInfo Info.plist "$D/LinuxSampler/gigedit.app/Contents"
118 cp loaders.cache "$D/lib/gdk-pixbuf-2.0/2.10.0"
119 cp $P/share/locale/de/LC_MESSAGES/gigedit.mo "$D/share/locale/de/LC_MESSAGES"
120 cp $P/share/locale/sv/LC_MESSAGES/gigedit.mo "$D/share/locale/sv/LC_MESSAGES"
121 cp $P/share/locale/de/LC_MESSAGES/gtk30.mo "$D/share/locale/de/LC_MESSAGES"
122 cp $P/share/locale/sv/LC_MESSAGES/gtk30.mo "$D/share/locale/sv/LC_MESSAGES"
123 cd $D
124 (cd $P ; \
125 tar cf - \
126 share/glib-2.0/schemas/gschemas.compiled \
127 share/icons/Adwaita/index.theme \
128 share/icons/Adwaita/16x16/actions/application-exit.png \
129 share/icons/Adwaita/16x16/actions/bookmark-new-symbolic.symbolic.png \
130 share/icons/Adwaita/16x16/actions/document-new.png \
131 share/icons/Adwaita/16x16/actions/document-open.png \
132 share/icons/Adwaita/16x16/actions/document-open-recent-symbolic.symbolic.png \
133 share/icons/Adwaita/16x16/actions/document-properties.png \
134 share/icons/Adwaita/16x16/actions/document-save-as.png \
135 share/icons/Adwaita/16x16/actions/document-save.png \
136 share/icons/Adwaita/16x16/actions/edit-clear-symbolic.symbolic.png \
137 share/icons/Adwaita/16x16/actions/edit-copy.png \
138 share/icons/Adwaita/16x16/actions/edit-delete.png \
139 share/icons/Adwaita/16x16/actions/edit-find-symbolic.symbolic.png \
140 share/icons/Adwaita/16x16/actions/go-down.png \
141 share/icons/Adwaita/16x16/actions/go-up.png \
142 share/icons/Adwaita/16x16/actions/help-about.png \
143 share/icons/Adwaita/16x16/actions/list-add.png \
144 share/icons/Adwaita/16x16/actions/list-add-symbolic.symbolic.png \
145 share/icons/Adwaita/16x16/actions/list-remove.png \
146 share/icons/Adwaita/16x16/actions/list-remove-symbolic.symbolic.png \
147 share/icons/Adwaita/16x16/actions/media-eject-symbolic.symbolic.png \
148 share/icons/Adwaita/16x16/actions/pan-down-symbolic.symbolic.png \
149 share/icons/Adwaita/16x16/actions/pan-end-symbolic.symbolic.png \
150 share/icons/Adwaita/16x16/actions/pan-start-symbolic.symbolic.png \
151 share/icons/Adwaita/16x16/actions/pan-up-symbolic.symbolic.png \
152 share/icons/Adwaita/16x16/actions/window-close.png \
153 share/icons/Adwaita/16x16/devices/drive-harddisk-symbolic.symbolic.png \
154 share/icons/Adwaita/16x16/mimetypes/inode-directory-symbolic.symbolic.png \
155 share/icons/Adwaita/16x16/mimetypes/text-x-generic.png \
156 share/icons/Adwaita/16x16/places/folder-documents-symbolic.symbolic.png \
157 share/icons/Adwaita/16x16/places/folder-download-symbolic.symbolic.png \
158 share/icons/Adwaita/16x16/places/folder-music-symbolic.symbolic.png \
159 share/icons/Adwaita/16x16/places/folder-pictures-symbolic.symbolic.png \
160 share/icons/Adwaita/16x16/places/folder-videos-symbolic.symbolic.png \
161 share/icons/Adwaita/16x16/places/user-desktop.png \
162 share/icons/Adwaita/16x16/places/user-desktop-symbolic.symbolic.png \
163 share/icons/Adwaita/16x16/places/user-home-symbolic.symbolic.png \
164 share/icons/Adwaita/16x16/places/user-trash-symbolic.symbolic.png \
165 share/icons/Adwaita/16x16/status/image-missing.png \
166 share/icons/Adwaita/32x32/devices/drive-harddisk.png \
167 share/icons/hicolor/index.theme) | tar xf -
168 cd ..
169
170
171 # generate OS X .pkg package / installer ...
172
173 component="codecs"
174 dlib="components/$component.pkg/lib"
175 mkdir -p $dlib
176 for f in `ls $D/lib/libFLAC* $D/lib/libogg* $D/lib/libsndfile* $D/lib/libvorbis*`; do
177 cp $f $dlib
178 done
179
180 component="fantasia"
181 dlib="components/$component.pkg/LinuxSampler"
182 mkdir -p $dlib
183 cp -r $D/LinuxSampler/Fantasia.app $dlib
184
185 component="gigedit"
186 dlib="components/$component.pkg/LinuxSampler"
187 mkdir -p $dlib
188 cp -r $D/LinuxSampler/$component.app $dlib
189
190 component="libgig"
191 dlib="components/$component.pkg/lib"
192 mkdir -p $dlib
193 for f in `ls $D/lib/libgig.*`; do
194 cp $f $dlib
195 done
196
197 component="gigtools"
198 dlib="components/$component.pkg/bin"
199 mkdir -p $dlib
200 for f in $gigtools_bins; do
201 cp $D/LinuxSampler/$f $dlib
202 done
203 dlib="components/$component.pkg/share/man/man1"
204 mkdir -p $dlib
205 for f in $gigtools_bins; do
206 cp $P/share/man/man1/$f.1 $dlib
207 done
208
209 component="libgigedit"
210 dlib="$PWD/components/$component.pkg/lib"
211 mkdir -p $dlib
212 (
213 cd $D/lib/
214 for f in `ls -d linuxsampler libgigedit*`; do
215 cp -r --parents $f $dlib
216 done
217 )
218 dlib="$PWD/components/$component.pkg"
219 (
220 cd $D
221 cp --parents share/locale/*/LC_MESSAGES/gigedit.mo $dlib
222 )
223
224 component="libgtk"
225 dlib="$PWD/components/$component.pkg/lib"
226 mkdir -p $dlib
227 (
228 cd $D/lib/
229 for f in `ls -d gdk* libatk* libcairo* libepoxy* libffi* libfont* libfreetype* libfribidi* libgailutil* libgdk* libgio* libglib* libgmodule* libgobject* libgthread* libgtk* libharfbuzz* libintl* libpango* libpixman* libpng* libsigc*`; do
230 cp -r --parents $f $dlib
231 done
232 )
233 dlib="$PWD/components/$component.pkg"
234 (
235 cd $D
236 cp -r --parents share/locale/*/LC_MESSAGES/gtk30.mo share/glib-2.0 share/icons $dlib
237 )
238
239 component="liblinuxsampler"
240 dlib="components/$component.pkg/lib"
241 mkdir -p $dlib
242 for f in `ls $D/lib/liblinuxsampler*`; do
243 cp $f $dlib
244 done
245 mkdir -p "$dlib/linuxsampler/plugins"
246
247 component="linuxsampler"
248 dlib="components/$component.pkg/bin"
249 mkdir -p $dlib
250 for f in `ls $D/LinuxSampler/linuxsampler $D/LinuxSampler/lscp`; do
251 cp $f $dlib
252 done
253
254 component="linuxsampler_au"
255 dlib="components/$component.pkg"
256 mkdir -p $dlib
257 cp -r $D/LinuxSamplerAU.component $dlib
258
259 component="linuxsampler_vst"
260 dlib="components/$component.pkg"
261 mkdir -p $dlib
262 cp -r $D/LinuxSampler.vst $dlib
263
264 component="qsampler"
265 dlib="components/$component.pkg/LinuxSampler"
266 mkdir -p $dlib
267 cp -r $D/LinuxSampler/$component.app $dlib
268
269
270 mkdir linuxsampler.prepkg
271 cp linuxsampler.unpkg/Distribution linuxsampler.prepkg
272 rsync -r --exclude='.svn' linuxsampler.unpkg/Resources linuxsampler.prepkg
273 (
274 cd components
275 for d in `ls -d *.pkg`; do
276 mkdir -p ../linuxsampler.prepkg/$d
277 (
278 cd $d
279 find . | cpio -o --format odc --owner 0:80 | gzip -c
280 ) > ../linuxsampler.prepkg/$d/Payload
281 mkbom -u 0 -g 80 $d ../linuxsampler.prepkg/$d/Bom
282 size_kb=`du -sk $d | cut -f 1`
283 entries_count=`find $d | wc -l`
284 cp ../linuxsampler.unpkg/$d/PackageInfo ../linuxsampler.prepkg/$d
285 xmltxt=`xmlstarlet ed -u '/pkg-info/payload/@numberOfFiles' -v $entries_count ../linuxsampler.prepkg/$d/PackageInfo | xmlstarlet ed -u '/pkg-info/payload/@installKBytes' -v $size_kb`
286 echo $xmltxt > ../linuxsampler.prepkg/$d/PackageInfo
287 identifier=`xmlstarlet sel -t -v '/pkg-info/@identifier' ../linuxsampler.prepkg/$d/PackageInfo`
288 xmltxt=`xmlstarlet ed -u "/installer-gui-script/pkg-ref[@id='$identifier']/@installKBytes" -v $size_kb ../linuxsampler.prepkg/Distribution`
289 echo $xmltxt > ../linuxsampler.prepkg/Distribution
290 done
291 )
292 (
293 cd linuxsampler.prepkg
294 xar --compression none -cf ../LinuxSampler.pkg .
295 )
296
297 tar cjf "$D.tar.bz2" README LinuxSampler.pkg

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC