callum_linden  committed 171f628

Fix to build with code signing option (patch from STORM-1900)

  • Participants
  • Parent commits 1d6470b
  • Branches default

Comments (0)

Files changed (5)

File doc/contributions.txt

 Ganymedes Costagravas
 Geenz Spad
+	STORM-1900
 Gene Frostbite
 GeneJ Composer
 Geneko Nemeth
 Kagehi Kohn
 Kaimen Takahe
+Katharine Berry
+	STORM-1900
 Keklily Longfall
 Ken Lavender
 Ken March

File indra/cmake/Variables.cmake

 set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name")
 set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
+set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
+set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
 set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
 set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
 set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.")

File indra/lib/python/indra/util/

          description="""This specifies the version of Second Life that is
         being packaged up.""",
-         default=get_default_version)
+         default=get_default_version),
+    dict(name='signature',
+         description="""This specifies an identity to sign the viewer with, if any.
+        If no value is supplied, the default signature will be used, if any. Currently
+        only used on Mac OS X.""",
+         default=None)
 def usage(srctree=""):

File indra/newview/CMakeLists.txt

   add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger)
+      set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")
+      set(SIGNING_SETTING "")
   if (PACKAGE)
       add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
+          ${SIGNING_SETTING}

File indra/newview/

             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'
+            self.run_command('codesign --force --sign %(identity)r %(bundle)r' % {
+							'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 =