From 27d5708ade21ff8ea2bb90d3b4866c269dce6369 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 28 Sep 2010 03:19:43 +0200 Subject: RED-565: Building the package/ directory fails for standalone. See http://redmine.imprudenceviewer.org/issues/565 This patch also reorders the "help" text of llmanifest.py to be alphabetical, next to adding the option --standalone with help text. indra/newview/CMakeLists.txt is changed to pass --standalone to the python script. Finally, viewer_manifest.py, which inherits from llmanifest.py uses it to skip the sections that don't make sense when building standalone, and which fail with errors without this patch. This patch is not 100% tested: I don't have a Mac or windows. However, it ONLY touches 'standalone', and before my patches standalone was broken anyway. So, even if this doesn't fix it completely for Mac and/or windows, then it can't hurt to commit, or even release. Even if this fails, the errors are not fatal: the packaging fails, but the viewer is already compiled at this point. I'd advise against holding this back until it could be tested by a Mac or windows developer that can build standalone: that might never happen to begin with! When time comes, some other developer will test it and when there are still problems, fix it, on the other operating systems. --- linden/indra/lib/python/indra/util/llmanifest.py | 17 ++++++++++------- linden/indra/newview/CMakeLists.txt | 3 +++ linden/indra/newview/viewer_manifest.py | 15 +++++++++------ 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py index 7a2505d..3444a15 100644 --- a/linden/indra/lib/python/indra/util/llmanifest.py +++ b/linden/indra/lib/python/indra/util/llmanifest.py @@ -119,7 +119,11 @@ ARGUMENTS=[ Example use: %(name)s --arch=i686 On Linux this would try to use Linux_i686Manifest.""", default=""), + dict(name='artwork', description='Artwork directory.', default=DEFAULT_SRCTREE), dict(name='build', description='Build directory.', default=DEFAULT_SRCTREE), + dict(name='channel', + description="""The channel to use for updates, packaging, settings name, etc.""", + default=get_channel), dict(name='configuration', description="""The build configuration used. Only used on OS X for now, but it could be used for other platforms as well.""", @@ -130,16 +134,13 @@ ARGUMENTS=[ though it's not strictly a grid, 'firstlook' is also an acceptable value for this parameter.""", default=""), - dict(name='channel', - description="""The channel to use for updates, packaging, settings name, etc.""", - default=get_channel), - dict(name='login_channel', - description="""The channel to use for login handshake/updates only.""", - default=None), dict(name='installer_name', description=""" The name of the file that the installer should be packaged up into. Only used on Linux at the moment.""", default=None), + dict(name='login_channel', + description="""The channel to use for login handshake/updates only.""", + default=None), dict(name='login_url', description="""The url that the login screen displays in the client.""", default=None), @@ -150,7 +151,9 @@ ARGUMENTS=[ dict(name='source', description='Source directory.', default=DEFAULT_SRCTREE), - dict(name='artwork', description='Artwork directory.', default=DEFAULT_SRCTREE), + dict(name='standalone', + description='Set to ON if this is a standalone build.', + default="OFF"), dict(name='touch', description="""File to touch when action is finished. Touch file will contain the name of the final package in a form suitable diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index b071795..1816ff9 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -1319,6 +1319,7 @@ if (WINDOWS) --configuration=${CMAKE_CFG_INTDIR} --channel=${VIEWER_CHANNEL} --login_channel=${VIEWER_LOGIN_CHANNEL} + --standalone=${STANDALONE} --grid=${GRID} --source=${CMAKE_CURRENT_SOURCE_DIR} --artwork=${ARTWORK_DIR} @@ -1394,6 +1395,7 @@ if (LINUX) COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --standalone=${STANDALONE} --grid=${GRID} --channel=${VIEWER_CHANNEL} --login_channel=${VIEWER_LOGIN_CHANNEL} @@ -1453,6 +1455,7 @@ if (DARWIN) COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --standalone=${STANDALONE} --grid=${GRID} --configuration=${CMAKE_CFG_INTDIR} --channel=${VIEWER_CHANNEL} diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 6b5e800..4a17cd0 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -160,6 +160,8 @@ class ViewerManifest(LLManifest): # whether or not this is present return self.args.get('login_channel') + def standalone(self): + return self.args['standalone'] == "ON" def grid(self): return self.args['grid'] def channel(self): @@ -327,7 +329,7 @@ class WindowsManifest(ViewerManifest): self.end_prefix() # Gstreamer libs - if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): + if (not self.standalone()) and self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): self.path("iconv.dll") self.path("libxml2.dll") self.path("libcairo-2.dll") @@ -541,7 +543,7 @@ class DarwinManifest(ViewerManifest): self.path("Info-Imprudence.plist", dst="Info.plist") # copy additional libs in /Contents/MacOS/ - if self.prefix(src="../../libraries/universal-darwin/lib_release", dst="MacOS/"): + if (not self.standalone()) and self.prefix(src="../../libraries/universal-darwin/lib_release", dst="MacOS/"): self.path("libndofdev.dylib") self.path("libhunspell-1.2.dylib") @@ -635,7 +637,7 @@ class DarwinManifest(ViewerManifest): self.path("zh-Hans.lproj") - if self.prefix(src="../../libraries/universal-darwin/lib_release/gstreamer-plugins", dst="lib/gstreamer-plugins"): + if (not self.standalone()) and self.prefix(src="../../libraries/universal-darwin/lib_release/gstreamer-plugins", dst="lib/gstreamer-plugins"): self.path("libgstaacparse.so") self.path("libgstadder.so") self.path("libgstaiffparse.so") @@ -916,7 +918,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("app_settings/mozilla-runtime-linux-i686") - if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): + if (not self.standalone()) and self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): self.path("libapr-1.so.0") self.path("libaprutil-1.so.0") self.path("libdb-4.2.so") @@ -1040,9 +1042,10 @@ class Linux_x86_64Manifest(LinuxManifest): self.path("featuretable_linux.txt") #self.path("secondlife-x86_64.supp") - self.path("app_settings/mozilla-runtime-linux-x86_64") + if not self.standalone(): + self.path("app_settings/mozilla-runtime-linux-x86_64") - if self.prefix("../../libraries/x86_64-linux/lib_release_client", dst="lib64"): + if (not self.standalone()) and self.prefix("../../libraries/x86_64-linux/lib_release_client", dst="lib64"): self.path("libapr-1.so.0") self.path("libaprutil-1.so.0") self.path("libdb-4.2.so") -- cgit v1.1