diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/CMakeLists.txt | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | indra/newview/lltexturefetch.cpp | 0 | ||||
-rw-r--r-- | indra/newview/viewer_manifest.py | 24 |
3 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3cd03f8641..0031362210 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1955,6 +1955,12 @@ if (DARWIN) ) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger) + + if (ENABLE_SIGNING) + set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}") + else (ENABLE_SIGNING) + set(SIGNING_SETTING "") + endif (ENABLE_SIGNING) if (PACKAGE) add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) @@ -1974,6 +1980,7 @@ if (DARWIN) --login_channel=${VIEWER_LOGIN_CHANNEL} --source=${CMAKE_CURRENT_SOURCE_DIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched + ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 7adf5212c2..7adf5212c2 100755..100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d1c952ac3b..3c3aba23f8 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -816,6 +816,30 @@ class DarwinManifest(ViewerManifest): self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script)) def package_finish(self): + # Sign the app if requested. + if 'signature' in self.args: + identity = self.args['signature'] + if identity == '': + identity = 'Developer ID Application' + + # Look for an environment variable set via build.sh when running in Team City. + try: + build_secrets_checkout = os.environ['build_secrets_checkout'] + except KeyError: + pass + else: + # variable found so use it to unlock keyvchain followed by codesign + home_path = os.environ['HOME'] + keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx','password.txt') + keychain_pwd = open(keychain_pwd_path).read().rstrip() + + self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % ( keychain_pwd, home_path ) ) + self.run_command('codesign --verbose --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % { + 'home_path' : home_path, + 'identity': identity, + 'bundle': self.get_dst_prefix() + }) + channel_standin = 'Second Life Viewer' # hah, our default channel is not usable on its own if not self.default_channel(): channel_standin = self.channel() |