diff options
Diffstat (limited to 'linden/indra/newview/viewer_manifest.py~')
-rwxr-xr-x | linden/indra/newview/viewer_manifest.py~ | 1176 |
1 files changed, 0 insertions, 1176 deletions
diff --git a/linden/indra/newview/viewer_manifest.py~ b/linden/indra/newview/viewer_manifest.py~ deleted file mode 100755 index 452b165..0000000 --- a/linden/indra/newview/viewer_manifest.py~ +++ /dev/null | |||
@@ -1,1176 +0,0 @@ | |||
1 | #!/usr/bin/python | ||
2 | # @file viewer_manifest.py | ||
3 | # @author Ryan Williams | ||
4 | # @brief Description of all installer viewer files, and methods for packaging | ||
5 | # them into installers for all supported platforms. | ||
6 | # | ||
7 | # $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
8 | # | ||
9 | # Copyright (c) 2006-2009, Linden Research, Inc. | ||
10 | # | ||
11 | # Second Life Viewer Source Code | ||
12 | # The source code in this file ("Source Code") is provided by Linden Lab | ||
13 | # to you under the terms of the GNU General Public License, version 2.0 | ||
14 | # ("GPL"), unless you have obtained a separate licensing agreement | ||
15 | # ("Other License"), formally executed by you and Linden Lab. Terms of | ||
16 | # the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
17 | # online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
18 | # | ||
19 | # There are special exceptions to the terms and conditions of the GPL as | ||
20 | # it is applied to this Source Code. View the full text of the exception | ||
21 | # in the file doc/FLOSS-exception.txt in this software distribution, or | ||
22 | # online at | ||
23 | # http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
24 | # | ||
25 | # By copying, modifying or distributing this software, you acknowledge | ||
26 | # that you have read and understood your obligations described above, | ||
27 | # and agree to abide by those obligations. | ||
28 | # | ||
29 | # ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
30 | # WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
31 | # COMPLETENESS OR PERFORMANCE. | ||
32 | # $/LicenseInfo$ | ||
33 | |||
34 | # DO NOT RUN THIS FILE DIRECTLY | ||
35 | # Instead, run develop.py with "configure -DPACKAGE:BOOL=ON" e.g.: | ||
36 | # develop.py -G vc80 configure -DPACKAGE:BOOL=ON | ||
37 | # to generate the "package" project in Visual Studio 2005 | ||
38 | # Note: as of Imprudence 1.3, this defaults to on for Windows | ||
39 | |||
40 | import sys | ||
41 | import os.path | ||
42 | import re | ||
43 | import tarfile | ||
44 | viewer_dir = os.path.dirname(__file__) | ||
45 | # add llmanifest library to our path so we don't have to muck with PYTHONPATH | ||
46 | sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util')) | ||
47 | from llmanifest import LLManifest, main, proper_windows_path, path_ancestors | ||
48 | |||
49 | class ViewerManifest(LLManifest): | ||
50 | def construct(self): | ||
51 | super(ViewerManifest, self).construct() | ||
52 | self.exclude("*.svn*") | ||
53 | self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") | ||
54 | self.path(src="../../etc/message.xml", dst="app_settings/message.xml") | ||
55 | |||
56 | if self.prefix(src="app_settings"): | ||
57 | self.exclude("logcontrol.xml") | ||
58 | self.exclude("logcontrol-dev.xml") | ||
59 | self.path("*.pem") | ||
60 | self.path("*.ini") | ||
61 | self.path("*.xml") | ||
62 | self.path("*.db2") | ||
63 | |||
64 | # include the entire shaders directory recursively | ||
65 | self.path("shaders") | ||
66 | # ... and the entire windlight directory | ||
67 | self.path("windlight") | ||
68 | self.end_prefix("app_settings") | ||
69 | |||
70 | if self.prefix(src="character"): | ||
71 | self.path("*.llm") | ||
72 | self.path("*.xml") | ||
73 | self.path("*.tga") | ||
74 | self.end_prefix("character") | ||
75 | |||
76 | # Include our fonts | ||
77 | if self.prefix(src="fonts"): | ||
78 | self.path("LiberationSans-Bold.ttf") | ||
79 | self.path("LiberationSans-Regular.ttf") | ||
80 | self.path("VeraMono.ttf") | ||
81 | self.path("DejaVuSansCondensed-BoldOblique.ttf") | ||
82 | self.path("DejaVuSansCondensed-Bold.ttf") | ||
83 | self.path("DejaVuSansCondensed-Oblique.ttf") | ||
84 | self.path("DejaVuSansCondensed.ttf") | ||
85 | self.path("GPL.txt") | ||
86 | self.path("Liberation-License.txt") | ||
87 | self.path("Vera-License.txt") | ||
88 | self.end_prefix("fonts") | ||
89 | |||
90 | # skins | ||
91 | if self.prefix(src="skins"): | ||
92 | self.path("paths.xml") | ||
93 | # include the entire textures directory recursively | ||
94 | if self.prefix(src="*/textures"): | ||
95 | self.path("*.tga") | ||
96 | self.path("*.j2c") | ||
97 | self.path("*.jpg") | ||
98 | self.path("*.png") | ||
99 | self.path("textures.xml") | ||
100 | self.end_prefix("*/textures") | ||
101 | self.path("*/xui/*/*.xml") | ||
102 | self.path("*/*.xml") | ||
103 | |||
104 | # Local HTML files (e.g. loading screen) | ||
105 | if self.prefix(src="*/html"): | ||
106 | self.path("*.png") | ||
107 | self.path("*/*/*.html") | ||
108 | self.path("*/*/*.gif") | ||
109 | self.path("*/*/*.png") | ||
110 | self.end_prefix("*/html") | ||
111 | self.end_prefix("skins") | ||
112 | |||
113 | # Files in the newview/ directory | ||
114 | self.path("gpu_table.txt") | ||
115 | |||
116 | |||
117 | # Gather up the README file, etc. | ||
118 | def gather_documents(self): | ||
119 | # From the top level directory (imprudence) | ||
120 | if self.prefix("../../..", dst=""): | ||
121 | self.path("README.txt") | ||
122 | self.path("MANIFESTO.txt") | ||
123 | self.path("CONTRIBUTE.txt") | ||
124 | self.path("RELEASE_NOTES.txt") | ||
125 | self.path("ChangeLog.txt", required=False) | ||
126 | self.end_prefix("../../..") | ||
127 | |||
128 | # From the linden directory | ||
129 | if self.prefix("../..", dst="doc"): | ||
130 | self.path("LICENSE-source.txt") | ||
131 | self.path("LICENSE-logos.txt", "LICENSE-artwork.txt") | ||
132 | self.end_prefix("../..") | ||
133 | |||
134 | # From the linden/doc directory | ||
135 | if self.prefix("../../doc", dst="doc"): | ||
136 | self.path("contributions.txt") | ||
137 | self.path("GPL-license.txt", "GPL.txt") | ||
138 | self.path("FLOSS-exception.txt") | ||
139 | self.end_prefix("../../doc") | ||
140 | |||
141 | |||
142 | def login_channel(self): | ||
143 | """Channel reported for login and upgrade purposes ONLY; | ||
144 | used for A/B testing""" | ||
145 | # NOTE: Do not return the normal channel if login_channel | ||
146 | # is not specified, as some code may branch depending on | ||
147 | # whether or not this is present | ||
148 | return self.args.get('login_channel') | ||
149 | |||
150 | def grid(self): | ||
151 | return self.args['grid'] | ||
152 | def channel(self): | ||
153 | return self.args['channel'] | ||
154 | def channel_unique(self): | ||
155 | return self.channel().replace("Imprudence", "").strip() | ||
156 | def channel_oneword(self): | ||
157 | return "".join(self.channel_unique().split()) | ||
158 | def channel_lowerword(self): | ||
159 | return self.channel_oneword().lower() | ||
160 | |||
161 | def flags_list(self): | ||
162 | """ Convenience function that returns the command-line flags | ||
163 | for the grid""" | ||
164 | |||
165 | # Set command line flags relating to the target grid | ||
166 | grid_flags = '' | ||
167 | if not self.default_grid(): | ||
168 | grid_flags = "--grid %(grid)s "\ | ||
169 | "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\ | ||
170 | {'grid':self.grid()} | ||
171 | |||
172 | # set command line flags for channel | ||
173 | channel_flags = '' | ||
174 | if self.login_channel() and self.login_channel() != self.channel(): | ||
175 | # Report a special channel during login, but use default | ||
176 | channel_flags = '--channel "%s"' % (self.login_channel()) | ||
177 | elif not self.default_channel(): | ||
178 | channel_flags = '--channel "%s"' % self.channel() | ||
179 | |||
180 | # Deal with settings | ||
181 | setting_flags = '' | ||
182 | if not self.default_channel() or not self.default_grid(): | ||
183 | if self.default_grid(): | ||
184 | setting_flags = '--settings settings_%s.xml'\ | ||
185 | % self.channel_lowerword() | ||
186 | else: | ||
187 | setting_flags = '--settings settings_%s_%s.xml'\ | ||
188 | % (self.grid(), self.channel_lowerword()) | ||
189 | |||
190 | return " ".join((channel_flags, grid_flags, setting_flags)).strip() | ||
191 | |||
192 | |||
193 | class WindowsManifest(ViewerManifest): | ||
194 | def final_exe(self): | ||
195 | if self.default_channel(): | ||
196 | if self.default_grid(): | ||
197 | return "imprudence.exe" | ||
198 | else: | ||
199 | return "imprudencepreview.exe" | ||
200 | else: | ||
201 | return ''.join(self.channel().split()) + '.exe' | ||
202 | |||
203 | |||
204 | def construct(self): | ||
205 | super(WindowsManifest, self).construct() | ||
206 | # the final exe is complicated because we're not sure where it's coming from, | ||
207 | # nor do we have a fixed name for the executable | ||
208 | self.path(self.find_existing_file('debug/imprudence-bin.exe', 'release/imprudence-bin.exe', 'relwithdebinfo/imprudence-bin.exe'), dst=self.final_exe()) | ||
209 | |||
210 | self.gather_documents() | ||
211 | |||
212 | if self.prefix("../..", dst="doc"): | ||
213 | self.path("LICENSE-libraries.txt") | ||
214 | self.end_prefix("../..") | ||
215 | |||
216 | |||
217 | self.path("imprudence.url") | ||
218 | |||
219 | # Plugin host application | ||
220 | self.path(os.path.join(os.pardir, | ||
221 | 'llplugin', 'slplugin', self.args['configuration'], "SLPlugin.exe"), | ||
222 | "SLPlugin.exe") | ||
223 | |||
224 | |||
225 | self.path("featuretable.txt") | ||
226 | |||
227 | # For use in crash reporting (generates minidumps) | ||
228 | self.path("dbghelp.dll") | ||
229 | |||
230 | # For using FMOD for sound... DJS | ||
231 | #self.path("fmod.dll") | ||
232 | |||
233 | # For spellchecking | ||
234 | self.path("libhunspell.dll") | ||
235 | |||
236 | # For textures | ||
237 | if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): | ||
238 | self.path("openjpeg.dll") | ||
239 | self.end_prefix() | ||
240 | |||
241 | # For sound | ||
242 | if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): | ||
243 | self.path("openal32.dll") | ||
244 | self.path("alut.dll") | ||
245 | self.end_prefix() | ||
246 | |||
247 | |||
248 | # Media plugins - QuickTime | ||
249 | if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"): | ||
250 | self.path("media_plugin_quicktime.dll") | ||
251 | self.end_prefix() | ||
252 | |||
253 | # Media plugins - WebKit/Qt | ||
254 | if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"): | ||
255 | self.path("media_plugin_webkit.dll") | ||
256 | self.end_prefix() | ||
257 | |||
258 | # For WebKit/Qt plugin runtimes | ||
259 | if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"): | ||
260 | self.path("libeay32.dll") | ||
261 | self.path("qtcore4.dll") | ||
262 | self.path("qtgui4.dll") | ||
263 | self.path("qtnetwork4.dll") | ||
264 | self.path("qtopengl4.dll") | ||
265 | self.path("qtwebkit4.dll") | ||
266 | self.path("ssleay32.dll") | ||
267 | self.end_prefix() | ||
268 | |||
269 | # For WebKit/Qt plugin runtimes (image format plugins) | ||
270 | if self.prefix(src="../../libraries/i686-win32/lib/release/imageformats", dst="llplugin/imageformats"): | ||
271 | self.path("qgif4.dll") | ||
272 | self.path("qico4.dll") | ||
273 | self.path("qjpeg4.dll") | ||
274 | self.path("qmng4.dll") | ||
275 | self.path("qsvg4.dll") | ||
276 | self.path("qtiff4.dll") | ||
277 | self.end_prefix() | ||
278 | |||
279 | # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 | ||
280 | self.path("skins/default/xui/en-us/mime_types_windows.xml", "skins/default/xui/en-us/mime_types.xml") | ||
281 | |||
282 | # These need to be installed as a SxS assembly, currently a 'private' assembly. | ||
283 | # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx | ||
284 | if self.prefix(src=self.args['configuration'], dst=""): | ||
285 | if self.args['configuration'] == 'Debug': | ||
286 | self.path("msvcr80d.dll") | ||
287 | self.path("msvcp80d.dll") | ||
288 | self.path("Microsoft.VC80.DebugCRT.manifest") | ||
289 | else: | ||
290 | self.path("msvcr80.dll") | ||
291 | self.path("msvcp80.dll") | ||
292 | self.path("Microsoft.VC80.CRT.manifest") | ||
293 | self.end_prefix() | ||
294 | |||
295 | # The config file name needs to match the exe's name. | ||
296 | self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config") | ||
297 | |||
298 | # We need this one too, so that llkdu loads at runtime - DEV-41194 | ||
299 | #self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst="llkdu.dll.2.config") | ||
300 | self.path("llkdu.dll.2.config") | ||
301 | |||
302 | # We need this one too, so that win_crash_logger.exe loads at runtime - DEV-19004 | ||
303 | #self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst="win_crash_logger.exe.config") | ||
304 | |||
305 | # same thing for auto-updater. | ||
306 | #self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst="updater.exe.config") | ||
307 | |||
308 | # Vivox runtimes | ||
309 | if self.prefix(src="vivox-runtime/i686-win32", dst=""): | ||
310 | # self.path("alut.dll") | ||
311 | self.path("wrap_oal.dll") | ||
312 | self.path("SLVoice.exe") | ||
313 | # self.path("SLVoiceAgent.exe") | ||
314 | # self.path("libeay32.dll") | ||
315 | # self.path("srtp.dll") | ||
316 | # self.path("ssleay32.dll") | ||
317 | # self.path("tntk.dll") | ||
318 | self.path("vivoxsdk.dll") | ||
319 | self.path("ortp.dll") | ||
320 | |||
321 | self.end_prefix() | ||
322 | |||
323 | # Gstreamer plugins | ||
324 | if self.prefix(src="lib/gstreamer-plugins", dst=""): | ||
325 | self.path("*.dll", dst="lib/gstreamer-plugins/*.dll") | ||
326 | self.end_prefix() | ||
327 | |||
328 | # Gstreamer libs | ||
329 | if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): | ||
330 | self.path("iconv.dll") | ||
331 | self.path("libxml2.dll") | ||
332 | self.path("libcairo-2.dll") | ||
333 | self.path("libgio-2.0-0.dll") | ||
334 | self.path("libglib-2.0-0.dll") | ||
335 | self.path("libgmodule-2.0-0.dll") | ||
336 | self.path("libgobject-2.0-0.dll") | ||
337 | self.path("libgthread-2.0-0.dll") | ||
338 | self.path("charset.dll") | ||
339 | self.path("intl.dll") | ||
340 | self.path("libgcrypt-11.dll") | ||
341 | self.path("libgnutls-26.dll") | ||
342 | self.path("libgpg-error-0.dll") | ||
343 | self.path("libgstapp.dll") | ||
344 | self.path("libgstaudio.dll") | ||
345 | self.path("libgstbase-0.10.dll") | ||
346 | self.path("libgstcdda.dll") | ||
347 | self.path("libgstcontroller-0.10.dll") | ||
348 | self.path("libgstdataprotocol-0.10.dll") | ||
349 | self.path("libgstdshow.dll") | ||
350 | self.path("libgstfft.dll") | ||
351 | self.path("libgstinterfaces.dll") | ||
352 | self.path("libgstnet-0.10.dll") | ||
353 | self.path("libgstnetbuffer.dll") | ||
354 | self.path("libgstpbutils.dll") | ||
355 | self.path("libgstreamer-0.10.dll") | ||
356 | self.path("libgstriff.dll") | ||
357 | self.path("libgstrtp.dll") | ||
358 | self.path("libgstrtsp.dll") | ||
359 | self.path("libgstsdp.dll") | ||
360 | self.path("libgsttag.dll") | ||
361 | self.path("libgstvideo.dll") | ||
362 | self.path("libjpeg.dll") | ||
363 | self.path("libmp3lame-0.dll") | ||
364 | self.path("libneon-27.dll") | ||
365 | self.path("libogg-0.dll") | ||
366 | self.path("liboil-0.3-0.dll") | ||
367 | self.path("libopenjpeg-2.dll") | ||
368 | self.path("libpng12-0.dll") | ||
369 | self.path("libschroedinger-1.0-0.dll") | ||
370 | self.path("libspeex-1.dll") | ||
371 | self.path("libtheora-0.dll") | ||
372 | self.path("libvorbis-0.dll") | ||
373 | self.path("libvorbisenc-2.dll") | ||
374 | self.path("libxml2-2.dll") | ||
375 | self.path("glew32.dll") | ||
376 | self.path("xvidcore.dll") | ||
377 | self.path("zlib1.dll") | ||
378 | self.end_prefix() | ||
379 | |||
380 | # # pull in the crash logger and updater from other projects | ||
381 | # self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter | ||
382 | # "../win_crash_logger/debug/windows-crash-logger.exe", | ||
383 | # "../win_crash_logger/release/windows-crash-logger.exe", | ||
384 | # "../win_crash_logger/relwithdebinfo/windows-crash-logger.exe"), | ||
385 | # dst="win_crash_logger.exe") | ||
386 | self.path(src=self.find_existing_file( | ||
387 | "../win_updater/debug/windows-updater.exe", | ||
388 | "../win_updater/release/windows-updater.exe", | ||
389 | "../win_updater/relwithdebinfo/windows-updater.exe"), | ||
390 | dst="updater.exe") | ||
391 | |||
392 | # For google-perftools tcmalloc allocator. | ||
393 | #if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): | ||
394 | # self.path("libtcmalloc_minimal.dll") | ||
395 | # self.end_prefix() | ||
396 | |||
397 | |||
398 | def nsi_file_commands(self, install=True): | ||
399 | def wpath(path): | ||
400 | if path.endswith('/') or path.endswith(os.path.sep): | ||
401 | path = path[:-1] | ||
402 | path = path.replace('/', '\\') | ||
403 | return path | ||
404 | |||
405 | result = "" | ||
406 | dest_files = [pair[1] for pair in self.file_list if pair[0] and os.path.isfile(pair[1])] | ||
407 | # sort deepest hierarchy first | ||
408 | dest_files.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b)) | ||
409 | dest_files.reverse() | ||
410 | out_path = None | ||
411 | for pkg_file in dest_files: | ||
412 | rel_file = os.path.normpath(pkg_file.replace(self.get_dst_prefix()+os.path.sep,'')) | ||
413 | installed_dir = wpath(os.path.join('$INSTDIR', os.path.dirname(rel_file))) | ||
414 | pkg_file = wpath(os.path.normpath(pkg_file)) | ||
415 | if installed_dir != out_path: | ||
416 | if install: | ||
417 | out_path = installed_dir | ||
418 | result += 'SetOutPath ' + out_path + '\n' | ||
419 | if install: | ||
420 | result += 'File ' + pkg_file + '\n' | ||
421 | else: | ||
422 | result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n' | ||
423 | # at the end of a delete, just rmdir all the directories | ||
424 | if not install: | ||
425 | deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list] | ||
426 | # find all ancestors so that we don't skip any dirs that happened to have no non-dir children | ||
427 | deleted_dirs = [] | ||
428 | for d in deleted_file_dirs: | ||
429 | deleted_dirs.extend(path_ancestors(d)) | ||
430 | # sort deepest hierarchy first | ||
431 | deleted_dirs.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b)) | ||
432 | deleted_dirs.reverse() | ||
433 | prev = None | ||
434 | for d in deleted_dirs: | ||
435 | if d != prev: # skip duplicates | ||
436 | result += 'RMDir ' + wpath(os.path.join('$INSTDIR', os.path.normpath(d))) + '\n' | ||
437 | prev = d | ||
438 | |||
439 | return result | ||
440 | |||
441 | def package_finish(self): | ||
442 | # a standard map of strings for replacing in the templates | ||
443 | substitution_strings = { | ||
444 | 'version' : '.'.join(self.args['version']).replace(' ', '_'), | ||
445 | 'version_short' : '.'.join(self.args['version'][:-1]).replace(' ', '_'), | ||
446 | 'version_dashes' : '-'.join(self.args['version']).replace(' ', '_'), | ||
447 | 'final_exe' : self.final_exe(), | ||
448 | 'grid':self.args['grid'], | ||
449 | 'grid_caps':self.args['grid'].upper(), | ||
450 | # escape quotes becase NSIS doesn't handle them well | ||
451 | 'flags':self.flags_list().replace('"', '$\\"'), | ||
452 | 'channel':self.channel(), | ||
453 | 'channel_oneword':self.channel_oneword(), | ||
454 | 'channel_unique':self.channel_unique(), | ||
455 | } | ||
456 | |||
457 | version_vars = """ | ||
458 | !define INSTEXE "%(final_exe)s" | ||
459 | !define VERSION "%(version_short)s" | ||
460 | !define VERSION_LONG "%(version)s" | ||
461 | !define VERSION_DASHES "%(version_dashes)s" | ||
462 | """ % substitution_strings | ||
463 | if self.default_channel(): | ||
464 | if self.default_grid(): | ||
465 | # release viewer | ||
466 | installer_file = "Imprudence_%(version_dashes)s_Setup.exe" | ||
467 | grid_vars_template = """ | ||
468 | OutFile "%(installer_file)s" | ||
469 | !define INSTFLAGS "%(flags)s" | ||
470 | !define INSTNAME "Imprudence" | ||
471 | !define SHORTCUT "Imprudence" | ||
472 | !define URLNAME "imprudence" | ||
473 | Caption "Imprudence ${VERSION}" | ||
474 | """ | ||
475 | else: | ||
476 | # beta grid viewer | ||
477 | installer_file = "Imprudence_%(version_dashes)s_(%(grid_caps)s)_Setup.exe" | ||
478 | grid_vars_template = """ | ||
479 | OutFile "%(installer_file)s" | ||
480 | !define INSTFLAGS "%(flags)s" | ||
481 | !define INSTNAME "Imprudence%(grid_caps)s" | ||
482 | !define SHORTCUT "Imprudence (%(grid_caps)s)" | ||
483 | !define URLNAME "imprudence%(grid)s" | ||
484 | !define UNINSTALL_SETTINGS 1 | ||
485 | Caption "Imprudence %(grid)s ${VERSION}" | ||
486 | """ | ||
487 | else: | ||
488 | # some other channel on some grid | ||
489 | installer_file = "Imprudence_%(version_dashes)s_%(channel_oneword)s_Setup.exe" | ||
490 | grid_vars_template = """ | ||
491 | OutFile "%(installer_file)s" | ||
492 | !define INSTFLAGS "%(flags)s" | ||
493 | !define INSTNAME "Imprudence%(channel_oneword)s" | ||
494 | !define SHORTCUT "%(channel)s" | ||
495 | !define URLNAME "imprudence" | ||
496 | !define UNINSTALL_SETTINGS 1 | ||
497 | Caption "%(channel)s ${VERSION}" | ||
498 | """ | ||
499 | if 'installer_name' in self.args: | ||
500 | installer_file = self.args['installer_name'] | ||
501 | else: | ||
502 | installer_file = installer_file % substitution_strings | ||
503 | substitution_strings['installer_file'] = installer_file | ||
504 | |||
505 | tempfile = "imprudence_setup_tmp.nsi" | ||
506 | # the following replaces strings in the nsi template | ||
507 | # it also does python-style % substitution | ||
508 | self.replace_in("installers/windows/installer_template.nsi", tempfile, { | ||
509 | "%%VERSION%%":version_vars, | ||
510 | "%%SOURCE%%":self.get_src_prefix(), | ||
511 | "%%GRID_VARS%%":grid_vars_template % substitution_strings, | ||
512 | "%%INSTALL_FILES%%":self.nsi_file_commands(True), | ||
513 | "%%DELETE_FILES%%":self.nsi_file_commands(False)}) | ||
514 | |||
515 | # We use the Unicode version of NSIS, available from | ||
516 | # http://www.scratchpaper.com/ | ||
517 | NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe' | ||
518 | self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile)) | ||
519 | # self.remove(self.dst_path_of(tempfile)) | ||
520 | # If we're on a build machine, sign the code using our Authenticode certificate. JC | ||
521 | sign_py = 'C:\\buildscripts\\code-signing\\sign.py' | ||
522 | if os.path.exists(sign_py): | ||
523 | self.run_command(sign_py + ' ' + self.dst_path_of(installer_file)) | ||
524 | else: | ||
525 | print "Skipping code signing,", sign_py, "does not exist" | ||
526 | self.created_path(self.dst_path_of(installer_file)) | ||
527 | self.package_file = installer_file | ||
528 | |||
529 | |||
530 | class DarwinManifest(ViewerManifest): | ||
531 | def construct(self): | ||
532 | # copy over the build result (this is a no-op if run within the xcode script) | ||
533 | self.path(self.args['configuration'] + "/Imprudence.app", dst="") | ||
534 | |||
535 | if self.prefix(src="", dst="Contents"): # everything goes in Contents | ||
536 | |||
537 | self.path("Info-Imprudence.plist", dst="Info.plist") | ||
538 | |||
539 | # copy additional libs in <bundle>/Contents/MacOS/ | ||
540 | if self.prefix(src="../../libraries/universal-darwin/lib_release", dst="MacOS/"): | ||
541 | |||
542 | self.path("libndofdev.dylib") | ||
543 | |||
544 | self.path("libopenal.1.dylib") | ||
545 | self.path("libalut.0.dylib") | ||
546 | |||
547 | self.path("libglib-2.0.dylib") | ||
548 | self.path("libgmodule-2.0.dylib") | ||
549 | self.path("libgobject-2.0.dylib") | ||
550 | self.path("libgthread-2.0.dylib") | ||
551 | |||
552 | self.path("libgstreamer-0.10.dylib") | ||
553 | self.path("libgstapp-0.10.dylib") | ||
554 | self.path("libgstaudio-0.10.dylib") | ||
555 | self.path("libgstbase-0.10.dylib") | ||
556 | self.path("libgstcdda-0.10.dylib") | ||
557 | self.path("libgstcontroller-0.10.dylib") | ||
558 | self.path("libgstdataprotocol-0.10.dylib") | ||
559 | self.path("libgstfft-0.10.dylib") | ||
560 | self.path("libgstinterfaces-0.10.dylib") | ||
561 | self.path("libgstnet-0.10.dylib") | ||
562 | self.path("libgstnetbuffer-0.10.dylib") | ||
563 | self.path("libgstpbutils-0.10.dylib") | ||
564 | self.path("libgstriff-0.10.dylib") | ||
565 | self.path("libgstrtp-0.10.dylib") | ||
566 | self.path("libgstrtsp-0.10.dylib") | ||
567 | self.path("libgstsdp-0.10.dylib") | ||
568 | self.path("libgsttag-0.10.dylib") | ||
569 | self.path("libgstvideo-0.10.dylib") | ||
570 | |||
571 | self.path("libxml2.2.dylib") | ||
572 | self.path("libfaad.2.dylib") | ||
573 | self.path("libFLAC.8.dylib") | ||
574 | self.path("libintl.3.dylib") | ||
575 | self.path("libjpeg.62.dylib") | ||
576 | self.path("libpng12.0.dylib") | ||
577 | self.path("libneon.27.dylib") | ||
578 | self.path("libogg.0.dylib") | ||
579 | self.path("liboil-0.3.0.dylib") | ||
580 | self.path("libopenjpeg.1.4.dylib") | ||
581 | self.path("libtheora.0.dylib") | ||
582 | self.path("libvorbis.0.dylib") | ||
583 | self.path("libvorbisenc.2.dylib") | ||
584 | self.path("libvorbisfile.3.dylib") | ||
585 | |||
586 | self.end_prefix("../../libraries/universal-darwin/lib_release") | ||
587 | |||
588 | # most everything goes in the Resources directory | ||
589 | if self.prefix(src="", dst="Resources"): | ||
590 | super(DarwinManifest, self).construct() | ||
591 | |||
592 | if self.prefix("cursors_mac"): | ||
593 | self.path("*.tif") | ||
594 | self.end_prefix("cursors_mac") | ||
595 | |||
596 | # From the linden directory | ||
597 | if self.prefix("../..", dst="doc"): | ||
598 | self.path("LICENSE-libraries.txt") | ||
599 | self.end_prefix("../..") | ||
600 | |||
601 | self.gather_documents() | ||
602 | |||
603 | self.path("featuretable_mac.txt") | ||
604 | self.path("SecondLife.nib") | ||
605 | |||
606 | self.path("viewer.icns") | ||
607 | |||
608 | # Translations | ||
609 | self.path("English.lproj") | ||
610 | self.path("German.lproj") | ||
611 | self.path("Japanese.lproj") | ||
612 | self.path("Korean.lproj") | ||
613 | self.path("da.lproj") | ||
614 | self.path("es.lproj") | ||
615 | self.path("fr.lproj") | ||
616 | self.path("hu.lproj") | ||
617 | self.path("it.lproj") | ||
618 | self.path("nl.lproj") | ||
619 | self.path("pl.lproj") | ||
620 | self.path("pt.lproj") | ||
621 | self.path("ru.lproj") | ||
622 | self.path("tr.lproj") | ||
623 | self.path("uk.lproj") | ||
624 | self.path("zh-Hans.lproj") | ||
625 | |||
626 | |||
627 | if self.prefix(src="../../libraries/universal-darwin/lib_release/gstreamer-plugins", dst="lib/gstreamer-plugins"): | ||
628 | self.path("libgstaacparse.so") | ||
629 | self.path("libgstadder.so") | ||
630 | self.path("libgstaiffparse.so") | ||
631 | self.path("libgstamrparse.so") | ||
632 | self.path("libgstapp.so") | ||
633 | self.path("libgstaudioconvert.so") | ||
634 | self.path("libgstaudiorate.so") | ||
635 | self.path("libgstaudioresample.so") | ||
636 | self.path("libgstautodetect.so") | ||
637 | self.path("libgstavi.so") | ||
638 | self.path("libgstcoreelements.so") | ||
639 | self.path("libgstcoreindexers.so") | ||
640 | self.path("libgstdebug.so") | ||
641 | self.path("libgstdecodebin.so") | ||
642 | self.path("libgstdecodebin2.so") | ||
643 | self.path("libgstdeinterlace2.so") | ||
644 | self.path("libgstequalizer.so") | ||
645 | self.path("libgstfaad.so") | ||
646 | self.path("libgstffmpeg.so") | ||
647 | self.path("libgstffmpegcolorspace.so") | ||
648 | self.path("libgstffmpegscale.so") | ||
649 | self.path("libgstfilter.so") | ||
650 | self.path("libgstflac.so") | ||
651 | self.path("libgstflv.so") | ||
652 | self.path("libgstgdp.so") | ||
653 | self.path("libgsth264parse.so") | ||
654 | self.path("libgsticydemux.so") | ||
655 | self.path("libgstid3demux.so") | ||
656 | self.path("libgstinterleave.so") | ||
657 | self.path("libgstjpeg.so") | ||
658 | self.path("libgstlevel.so") | ||
659 | self.path("libgstmetadata.so") | ||
660 | self.path("libgstmpeg4videoparse.so") | ||
661 | self.path("libgstmpegdemux.so") | ||
662 | self.path("libgstmpegvideoparse.so") | ||
663 | self.path("libgstmultifile.so") | ||
664 | self.path("libgstmultipart.so") | ||
665 | self.path("libgstneonhttpsrc.so") | ||
666 | self.path("libgstogg.so") | ||
667 | self.path("libgstosxaudio.so") | ||
668 | self.path("libgstosxvideosink.so") | ||
669 | self.path("libgstplaybin.so") | ||
670 | self.path("libgstpng.so") | ||
671 | self.path("libgstpostproc.so") | ||
672 | self.path("libgstqtdemux.so") | ||
673 | #self.path("libgstqtwrapper.so") | ||
674 | self.path("libgstqueue2.so") | ||
675 | self.path("libgstreal.so") | ||
676 | self.path("libgstrtp.so") | ||
677 | self.path("libgstrtpmanager.so") | ||
678 | self.path("libgstrtsp.so") | ||
679 | self.path("libgstsdpelem.so") | ||
680 | self.path("libgstselector.so") | ||
681 | self.path("libgststereo.so") | ||
682 | self.path("libgsttcp.so") | ||
683 | self.path("libgsttheora.so") | ||
684 | self.path("libgsttypefindfunctions.so") | ||
685 | self.path("libgstudp.so") | ||
686 | self.path("libgstvideobalance.so") | ||
687 | self.path("libgstvideobox.so") | ||
688 | self.path("libgstvideocrop.so") | ||
689 | self.path("libgstvideoflip.so") | ||
690 | self.path("libgstvideomixer.so") | ||
691 | self.path("libgstvideorate.so") | ||
692 | self.path("libgstvideoscale.so") | ||
693 | self.path("libgstvideosignal.so") | ||
694 | self.path("libgstvolume.so") | ||
695 | self.path("libgstvorbis.so") | ||
696 | self.path("libgstwavparse.so") | ||
697 | |||
698 | self.end_prefix("../../libraries/universal-darwin/lib_release/gstreamer-plugins") | ||
699 | |||
700 | |||
701 | # SLVoice and vivox lols | ||
702 | self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib") | ||
703 | self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib") | ||
704 | self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib") | ||
705 | self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib") | ||
706 | self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice") | ||
707 | #self.path("vivox-runtime/universal-darwin/SLVoiceAgent.app", "SLVoiceAgent.app") | ||
708 | |||
709 | #libfmodwrapper.dylib | ||
710 | #self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib") | ||
711 | |||
712 | # our apps | ||
713 | # self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app") | ||
714 | self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app") | ||
715 | |||
716 | # plugin launcher | ||
717 | self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin") | ||
718 | |||
719 | # plugins | ||
720 | if self.prefix(src="", dst="llplugin"): | ||
721 | self.path("../media_plugins/quicktime/" + self.args['configuration'] + "/media_plugin_quicktime.dylib", "media_plugin_quicktime.dylib") | ||
722 | self.path("../media_plugins/webkit/" + self.args['configuration'] + "/media_plugin_webkit.dylib", "media_plugin_webkit.dylib") | ||
723 | self.path("../../libraries/universal-darwin/lib_release/libllqtwebkit.dylib", "libllqtwebkit.dylib") | ||
724 | |||
725 | self.end_prefix("llplugin") | ||
726 | |||
727 | # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 | ||
728 | self.path("skins/default/xui/en-us/mime_types_mac.xml", "skins/default/xui/en-us/mime_types.xml") | ||
729 | |||
730 | # command line arguments for connecting to the proper grid | ||
731 | self.put_in_file(self.flags_list(), 'arguments.txt') | ||
732 | |||
733 | self.end_prefix("Resources") | ||
734 | |||
735 | self.end_prefix("Contents") | ||
736 | |||
737 | # NOTE: the -S argument to strip causes it to keep enough info for | ||
738 | # annotated backtraces (i.e. function names in the crash log). 'strip' with no | ||
739 | # arguments yields a slightly smaller binary but makes crash logs mostly useless. | ||
740 | # This may be desirable for the final release. Or not. | ||
741 | if ("package" in self.args['actions'] or | ||
742 | "unpacked" in self.args['actions']): | ||
743 | self.run_command('strip -S "%(viewer_binary)s"' % | ||
744 | { 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')}) | ||
745 | |||
746 | |||
747 | def package_finish(self): | ||
748 | channel_standin = 'Imprudence' # hah, our default channel is not usable on its own | ||
749 | if not self.default_channel(): | ||
750 | channel_standin = self.channel() | ||
751 | |||
752 | imagename="Imprudence_" + '_'.join(self.args['version']) | ||
753 | |||
754 | # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning. | ||
755 | # If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick. | ||
756 | |||
757 | volname="Imprudence Installer" # DO NOT CHANGE without understanding comment above | ||
758 | |||
759 | if self.default_channel(): | ||
760 | if not self.default_grid(): | ||
761 | # beta case | ||
762 | imagename = imagename + '_' + self.args['grid'].upper() | ||
763 | else: | ||
764 | # first look, etc | ||
765 | imagename = imagename + '_' + self.channel_oneword().upper() | ||
766 | |||
767 | sparsename = imagename + ".sparseimage" | ||
768 | finalname = imagename + ".dmg" | ||
769 | # make sure we don't have stale files laying about | ||
770 | self.remove(sparsename, finalname) | ||
771 | |||
772 | self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 400 -layout SPUD' % { | ||
773 | 'sparse':sparsename, | ||
774 | 'vol':volname}) | ||
775 | |||
776 | # mount the image and get the name of the mount point and device node | ||
777 | hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"') | ||
778 | devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip() | ||
779 | volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip() | ||
780 | |||
781 | # Copy everything in to the mounted .dmg | ||
782 | |||
783 | if self.default_channel() and not self.default_grid(): | ||
784 | app_name = "Imprudence " + self.args['grid'] | ||
785 | else: | ||
786 | app_name = channel_standin.strip() | ||
787 | |||
788 | # Hack: | ||
789 | # Because there is no easy way to coerce the Finder into positioning | ||
790 | # the app bundle in the same place with different app names, we are | ||
791 | # adding multiple .DS_Store files to svn. There is one for release, | ||
792 | # one for release candidate and one for first look. Any other channels | ||
793 | # will use the release .DS_Store, and will look broken. | ||
794 | # - Ambroff 2008-08-20 | ||
795 | dmg_template = os.path.join( | ||
796 | 'installers', | ||
797 | 'darwin', | ||
798 | '%s-dmg' % "".join(self.channel_unique().split()).lower()) | ||
799 | |||
800 | if not os.path.exists (self.src_path_of(dmg_template)): | ||
801 | dmg_template = os.path.join ('installers', 'darwin', 'release-dmg') | ||
802 | |||
803 | for s,d in {self.get_dst_prefix():app_name + ".app", | ||
804 | os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns", | ||
805 | os.path.join(dmg_template, "background.jpg"): "background.jpg", | ||
806 | os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items(): | ||
807 | print "Copying to dmg", s, d | ||
808 | self.copy_action(self.src_path_of(s), os.path.join(volpath, d)) | ||
809 | |||
810 | # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit) | ||
811 | self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"') | ||
812 | self.run_command('SetFile -a V "' + os.path.join(volpath, "background.jpg") + '"') | ||
813 | self.run_command('SetFile -a V "' + os.path.join(volpath, ".DS_Store") + '"') | ||
814 | |||
815 | # Create the alias file (which is a resource file) from the .r | ||
816 | self.run_command('rez "' + self.src_path_of("installers/darwin/release-dmg/Applications-alias.r") + '" -o "' + os.path.join(volpath, "Applications") + '"') | ||
817 | |||
818 | # Set the alias file's alias and custom icon bits | ||
819 | self.run_command('SetFile -a AC "' + os.path.join(volpath, "Applications") + '"') | ||
820 | |||
821 | # Set the disk image root's custom icon bit | ||
822 | self.run_command('SetFile -a C "' + volpath + '"') | ||
823 | |||
824 | # Unmount the image | ||
825 | self.run_command('hdiutil detach -force "' + devfile + '"') | ||
826 | |||
827 | print "Converting temp disk image to final disk image" | ||
828 | self.run_command('hdiutil convert "%(sparse)s" -format UDZO -imagekey zlib-level=9 -o "%(final)s"' % {'sparse':sparsename, 'final':finalname}) | ||
829 | # get rid of the temp file | ||
830 | self.package_file = finalname | ||
831 | self.remove(sparsename) | ||
832 | |||
833 | class LinuxManifest(ViewerManifest): | ||
834 | def construct(self): | ||
835 | super(LinuxManifest, self).construct() | ||
836 | |||
837 | self.path("res/imprudence_icon.png","imprudence_icon.png") | ||
838 | if self.prefix("linux_tools", dst=""): | ||
839 | #self.path("client-readme.txt","README-linux.txt") | ||
840 | self.path("client-readme-voice.txt","README-linux-voice.txt") | ||
841 | #self.path("client-readme-joystick.txt","README-linux-joystick.txt") | ||
842 | self.path("wrapper.sh","imprudence") | ||
843 | self.path("handle_secondlifeprotocol.sh") | ||
844 | self.path("register_secondlifeprotocol.sh") | ||
845 | self.path("getvoice.sh") | ||
846 | self.end_prefix("linux_tools") | ||
847 | |||
848 | self.gather_documents() | ||
849 | |||
850 | # From the linden directory | ||
851 | if self.prefix("../..", dst="doc"): | ||
852 | self.path("LICENSE-libraries.txt") | ||
853 | self.end_prefix("../..") | ||
854 | |||
855 | # Create an appropriate gridargs.dat for this package, denoting required grid. | ||
856 | self.put_in_file(self.flags_list(), 'gridargs.dat') | ||
857 | self.path("linux_tools/launch_url.sh","launch_url.sh") | ||
858 | self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin") | ||
859 | if self.prefix("res-sdl"): | ||
860 | self.path("*") | ||
861 | # recurse | ||
862 | self.end_prefix("res-sdl") | ||
863 | |||
864 | # plugins | ||
865 | if self.prefix(src="", dst="bin/llplugin"): | ||
866 | self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so") | ||
867 | self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so") | ||
868 | self.end_prefix("bin/llplugin") | ||
869 | |||
870 | # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 | ||
871 | self.path("skins/default/xui/en-us/mime_types_linux.xml", "skins/default/xui/en-us/mime_types.xml") | ||
872 | |||
873 | self.path("featuretable_linux.txt") | ||
874 | |||
875 | |||
876 | def package_finish(self): | ||
877 | if 'installer_name' in self.args: | ||
878 | installer_name = self.args['installer_name'] | ||
879 | else: | ||
880 | installer_name_components = ['Imprudence_', self.args.get('arch')] | ||
881 | installer_name_components.extend(self.args['version']) | ||
882 | installer_name = "_".join(installer_name_components) | ||
883 | if self.default_channel(): | ||
884 | if not self.default_grid(): | ||
885 | installer_name += '_' + self.args['grid'].upper() | ||
886 | else: | ||
887 | installer_name += '_' + self.channel_oneword().upper() | ||
888 | |||
889 | # Fix access permissions | ||
890 | self.run_command(""" | ||
891 | find %(dst)s -type d | xargs --no-run-if-empty chmod 755; | ||
892 | find %(dst)s -type f -perm 0700 | xargs --no-run-if-empty chmod 0755; | ||
893 | find %(dst)s -type f -perm 0500 | xargs --no-run-if-empty chmod 0555; | ||
894 | find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644; | ||
895 | find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444; | ||
896 | true""" % {'dst':self.get_dst_prefix() }) | ||
897 | |||
898 | self.package_file = installer_name + '.tar.bz2' | ||
899 | |||
900 | # Disabled for now. It's a waste of time to package every compile. | ||
901 | |||
902 | # if("package" in self.args['actions'] or | ||
903 | # "unpacked" in self.args['actions']): | ||
904 | # | ||
905 | # # temporarily move directory tree so that it has the right | ||
906 | # # name in the tarfile | ||
907 | # self.run_command("mv %(dst)s %(inst)s" % { | ||
908 | # 'dst': self.get_dst_prefix(), | ||
909 | # 'inst': self.build_path_of(installer_name)}) | ||
910 | # try: | ||
911 | # # --numeric-owner hides the username of the builder for | ||
912 | # # security etc. | ||
913 | # self.run_command('tar -C %(dir)s --numeric-owner -cjf ' | ||
914 | # '%(inst_path)s.tar.bz2 %(inst_name)s' % { | ||
915 | # 'dir': self.get_build_prefix(), | ||
916 | # 'inst_name': installer_name, | ||
917 | # 'inst_path':self.build_path_of(installer_name)}) | ||
918 | # finally: | ||
919 | # self.run_command("mv %(inst)s %(dst)s" % { | ||
920 | # 'dst': self.get_dst_prefix(), | ||
921 | # 'inst': self.build_path_of(installer_name)}) | ||
922 | |||
923 | class Linux_i686Manifest(LinuxManifest): | ||
924 | def construct(self): | ||
925 | super(Linux_i686Manifest, self).construct() | ||
926 | self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") | ||
927 | |||
928 | |||
929 | if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): | ||
930 | self.path("libapr-1.so.0") | ||
931 | self.path("libaprutil-1.so.0") | ||
932 | self.path("libdb-4.2.so") | ||
933 | self.path("libcrypto.so.0.9.7") | ||
934 | self.path("libexpat.so.1") | ||
935 | self.path("libssl.so.0.9.7") | ||
936 | self.path("libuuid.so", "libuuid.so.1") | ||
937 | self.path("libSDL-1.2.so.0") | ||
938 | self.path("libELFIO.so") | ||
939 | self.path("libopenjpeg.so.2") | ||
940 | self.path("libxml2.so.2") | ||
941 | self.path("libz.so.1") | ||
942 | |||
943 | # OpenAL | ||
944 | self.path("libopenal.so.1") | ||
945 | self.path("libalut.so.0") | ||
946 | |||
947 | # GTK+ and dependencies | ||
948 | self.path("libatk-1.0.so.0") | ||
949 | self.path("libcairo.so.2") | ||
950 | self.path("libfontconfig.so.1") | ||
951 | self.path("libfreetype.so.6") | ||
952 | # self.path("libgdk_pixbuf-2.0.so.0") # see linux64 why | ||
953 | self.path("libgdk-x11-2.0.so.0") | ||
954 | self.path("libgtk-x11-2.0.so.0") | ||
955 | # self.path("libpango-1.0.so.0") # dto. | ||
956 | # self.path("libpangoft2-1.0.so.0") | ||
957 | # self.path("libpangox-1.0.so.0") | ||
958 | # self.path("libpangoxft-1.0.so.0") | ||
959 | self.path("libpixman-1.so.0") | ||
960 | |||
961 | # Gstreamer libs | ||
962 | self.path("libgstbase-0.10.so.0") | ||
963 | self.path("libgstreamer-0.10.so.0") | ||
964 | self.path("libgstaudio-0.10.so.0") | ||
965 | self.path("libgstbase-0.10.so.0") | ||
966 | self.path("libgstcontroller-0.10.so.0") | ||
967 | self.path("libgstdataprotocol-0.10.so.0") | ||
968 | self.path("libgstinterfaces-0.10.so.0") | ||
969 | self.path("libgstnetbuffer-0.10.so.0") | ||
970 | self.path("libgstpbutils-0.10.so.0") | ||
971 | self.path("libgstriff-0.10.so.0") | ||
972 | self.path("libgstrtp-0.10.so.0") | ||
973 | self.path("libgstrtsp-0.10.so.0") | ||
974 | self.path("libgstsdp-0.10.so.0") | ||
975 | self.path("libgsttag-0.10.so.0") | ||
976 | self.path("libgstvideo-0.10.so.0") | ||
977 | |||
978 | # Gstreamer plugin dependencies | ||
979 | self.path("libfaad.so.0") | ||
980 | self.path("libogg.so.0") | ||
981 | self.path("libtheora.so.0") | ||
982 | self.path("libvorbis.so.0") | ||
983 | self.path("libvorbisenc.so.2") | ||
984 | self.path("liboil-0.3.so.0") | ||
985 | |||
986 | # Gstreamer plugins | ||
987 | if self.prefix("gstreamer-plugins"): | ||
988 | self.path("libgstalsa.so") | ||
989 | self.path("libgstasf.so") | ||
990 | self.path("libgstaudioconvert.so") | ||
991 | self.path("libgstaudioresample.so") | ||
992 | self.path("libgstautodetect.so") | ||
993 | self.path("libgstavi.so") | ||
994 | self.path("libgstcoreelements.so") | ||
995 | self.path("libgstcoreindexers.so") | ||
996 | self.path("libgstdecodebin2.so") | ||
997 | self.path("libgstdecodebin.so") | ||
998 | self.path("libgstesd.so") | ||
999 | self.path("libgstfaad.so") | ||
1000 | self.path("libgstffmpeg.so") | ||
1001 | self.path("libgstgnomevfs.so") | ||
1002 | self.path("libgsticydemux.so") | ||
1003 | self.path("libgstid3demux.so") | ||
1004 | self.path("libgstmpegdemux.so") | ||
1005 | self.path("libgstmultifile.so") | ||
1006 | self.path("libgstmultipart.so") | ||
1007 | self.path("libgstogg.so") | ||
1008 | self.path("libgstossaudio.so") | ||
1009 | self.path("libgstplaybin.so") | ||
1010 | self.path("libgstpulse.so") | ||
1011 | self.path("libgstqtdemux.so") | ||
1012 | self.path("libgstqueue2.so") | ||
1013 | self.path("libgsttcp.so") | ||
1014 | self.path("libgsttheora.so") | ||
1015 | self.path("libgsttypefindfunctions.so") | ||
1016 | self.path("libgstudp.so") | ||
1017 | self.path("libgstvideoscale.so") | ||
1018 | self.path("libgstvolume.so") | ||
1019 | self.path("libgstvorbis.so") | ||
1020 | self.path("libgstwavparse.so") | ||
1021 | |||
1022 | self.end_prefix("gstreamer-plugins") | ||
1023 | |||
1024 | self.end_prefix("lib") | ||
1025 | |||
1026 | # Vivox runtimes and libs | ||
1027 | if self.prefix(src="vivox-runtime/i686-linux", dst="bin"): | ||
1028 | self.path("SLVoice") | ||
1029 | self.end_prefix("bin") | ||
1030 | |||
1031 | if self.prefix(src="vivox-runtime/i686-linux", dst="lib"): | ||
1032 | self.path("libalut.so") | ||
1033 | self.path("libortp.so") | ||
1034 | self.path("libvivoxsdk.so") | ||
1035 | self.end_prefix("lib") | ||
1036 | |||
1037 | class Linux_x86_64Manifest(LinuxManifest): | ||
1038 | def construct(self): | ||
1039 | super(Linux_x86_64Manifest, self).construct() | ||
1040 | self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") | ||
1041 | # self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin") | ||
1042 | |||
1043 | self.path("linux_tools/launch_url.sh","launch_url.sh") | ||
1044 | if self.prefix("res-sdl"): | ||
1045 | self.path("*") | ||
1046 | # recurse | ||
1047 | self.end_prefix("res-sdl") | ||
1048 | |||
1049 | self.path("featuretable_linux.txt") | ||
1050 | #self.path("secondlife-x86_64.supp") | ||
1051 | |||
1052 | self.path("app_settings/mozilla-runtime-linux-x86_64") | ||
1053 | |||
1054 | if self.prefix("../../libraries/x86_64-linux/lib_release_client", dst="lib64"): | ||
1055 | self.path("libapr-1.so.0") | ||
1056 | self.path("libaprutil-1.so.0") | ||
1057 | self.path("libdb-4.2.so") | ||
1058 | self.path("libcrypto.so.0.9.8") | ||
1059 | self.path("libexpat.so.1") | ||
1060 | self.path("libssl.so.0.9.8") | ||
1061 | self.path("libuuid.so", "libuuid.so.1") | ||
1062 | self.path("libSDL-1.2.so.0") | ||
1063 | self.path("libELFIO.so") | ||
1064 | self.path("libjpeg.so.7") | ||
1065 | self.path("libpng12.so.0") | ||
1066 | self.path("libopenjpeg.so.2") | ||
1067 | self.path("libxml2.so.2") | ||
1068 | #self.path("libz.so.1") #not needed | ||
1069 | |||
1070 | # OpenAL | ||
1071 | self.path("libopenal.so.1") | ||
1072 | self.path("libalut.so.0") | ||
1073 | |||
1074 | # GTK+ and dependencies | ||
1075 | self.path("libatk-1.0.so.0") | ||
1076 | self.path("libcairo.so.2") | ||
1077 | self.path("libfontconfig.so.1") | ||
1078 | self.path("libfreetype.so.6") | ||
1079 | self.path("libgdk_pixbuf-2.0.so.0") # was commented to use systems gdk pixbufs instead - | ||
1080 | # but seems webkit needs it o_O . Packaging for testing now. | ||
1081 | self.path("libgdk-x11-2.0.so.0") | ||
1082 | self.path("libgtk-x11-2.0.so.0") | ||
1083 | # self.path("libpango-1.0.so.0") # use systems pango instead | ||
1084 | # self.path("libpangoft2-1.0.so.0") # Both gdk pixbufs and pango would load systems modules | ||
1085 | # self.path("libpangox-1.0.so.0") # and crash if not compatible or present. | ||
1086 | # self.path("libpangoxft-1.0.so.0") # So we depend system gdk pixbufs and pango anyway. | ||
1087 | self.path("libpixman-1.so.0") | ||
1088 | |||
1089 | # Gstreamer libs | ||
1090 | self.path("libgstbase-0.10.so.0") | ||
1091 | self.path("libgstreamer-0.10.so.0") | ||
1092 | self.path("libgstaudio-0.10.so.0") | ||
1093 | self.path("libgstbase-0.10.so.0") | ||
1094 | self.path("libgstcontroller-0.10.so.0") | ||
1095 | self.path("libgstdataprotocol-0.10.so.0") | ||
1096 | self.path("libgstinterfaces-0.10.so.0") | ||
1097 | self.path("libgstnetbuffer-0.10.so.0") | ||
1098 | self.path("libgstpbutils-0.10.so.0") | ||
1099 | self.path("libgstriff-0.10.so.0") | ||
1100 | self.path("libgstrtp-0.10.so.0") | ||
1101 | self.path("libgstrtsp-0.10.so.0") | ||
1102 | self.path("libgstsdp-0.10.so.0") | ||
1103 | self.path("libgsttag-0.10.so.0") | ||
1104 | self.path("libgstvideo-0.10.so.0") | ||
1105 | |||
1106 | # Gstreamer plugin dependencies | ||
1107 | self.path("libfaad.so.0") | ||
1108 | self.path("libogg.so.0") | ||
1109 | self.path("libtheora.so.0") | ||
1110 | self.path("libvorbis.so.0") | ||
1111 | self.path("libvorbisenc.so.2") | ||
1112 | self.path("liboil-0.3.so.0") | ||
1113 | |||
1114 | # Gstreamer plugins | ||
1115 | if self.prefix("gstreamer-plugins"): | ||
1116 | self.path("libgstalsa.so") | ||
1117 | self.path("libgstasf.so") | ||
1118 | self.path("libgstaudioconvert.so") | ||
1119 | self.path("libgstaudioresample.so") | ||
1120 | self.path("libgstautodetect.so") | ||
1121 | self.path("libgstavi.so") | ||
1122 | self.path("libgstcoreelements.so") | ||
1123 | self.path("libgstcoreindexers.so") | ||
1124 | self.path("libgstdecodebin2.so") | ||
1125 | self.path("libgstdecodebin.so") | ||
1126 | self.path("libgstesd.so") | ||
1127 | self.path("libgstfaad.so") | ||
1128 | self.path("libgstffmpeg.so") | ||
1129 | self.path("libgstffmpegcolorspace.so") | ||
1130 | self.path("libgstgnomevfs.so") | ||
1131 | self.path("libgsticydemux.so") | ||
1132 | self.path("libgstid3demux.so") | ||
1133 | self.path("libgstmpegdemux.so") | ||
1134 | self.path("libgstmultifile.so") | ||
1135 | self.path("libgstmultipart.so") | ||
1136 | self.path("libgstogg.so") | ||
1137 | self.path("libgstossaudio.so") | ||
1138 | self.path("libgstplaybin.so") | ||
1139 | self.path("libgstpulse.so") | ||
1140 | self.path("libgstqtdemux.so") | ||
1141 | self.path("libgstqueue2.so") | ||
1142 | self.path("libgsttcp.so") | ||
1143 | self.path("libgsttheora.so") | ||
1144 | self.path("libgsttypefindfunctions.so") | ||
1145 | self.path("libgstudp.so") | ||
1146 | self.path("libgstvideoscale.so") | ||
1147 | self.path("libgstvolume.so") | ||
1148 | self.path("libgstvorbis.so") | ||
1149 | self.path("libgstwavparse.so") | ||
1150 | |||
1151 | self.end_prefix("gstreamer-plugins") | ||
1152 | self.end_prefix("lib64") | ||
1153 | |||
1154 | |||
1155 | # Vivox runtimes and libs | ||
1156 | if self.prefix(src="vivox-runtime/i686-linux", dst="bin"): | ||
1157 | self.path("SLVoice") | ||
1158 | self.end_prefix("bin") | ||
1159 | |||
1160 | if self.prefix(src="vivox-runtime/i686-linux", dst="lib32"): | ||
1161 | #self.path("libalut.so") | ||
1162 | self.path("libortp.so") | ||
1163 | self.path("libvivoxsdk.so") | ||
1164 | self.end_prefix("lib32") | ||
1165 | |||
1166 | # 32bit libs needed for voice | ||
1167 | if self.prefix("../../libraries/x86_64-linux/lib_release_client/32bit-compat", dst="lib32"): | ||
1168 | self.path("libalut.so") | ||
1169 | self.path("libidn.so.11") | ||
1170 | self.path("libopenal.so.1") | ||
1171 | # self.path("libortp.so") | ||
1172 | self.path("libuuid.so.1") | ||
1173 | self.end_prefix("lib32") | ||
1174 | |||
1175 | if __name__ == "__main__": | ||
1176 | main() | ||