DRTVWR-474, MAINT-9047: Make viewer_manifest use same bundle name.

meow-7.2.2
Nat Goodspeed 2018-09-09 09:22:06 -04:00
parent 65dd31631f
commit a74b3691af
1 changed files with 9 additions and 10 deletions

View File

@ -871,6 +871,9 @@ class Windows_x86_64_Manifest(WindowsManifest):
class DarwinManifest(ViewerManifest):
build_data_json_platform = 'mac'
def app_bundle(self):
return self.app_name() + ".app"
def finish_build_data_dict(self, build_data_dict):
build_data_dict.update({'Bundle Id':self.args['bundleid']})
return build_data_dict
@ -881,7 +884,10 @@ class DarwinManifest(ViewerManifest):
def construct(self):
# copy over the build result (this is a no-op if run within the xcode script)
self.path(os.path.join(self.args['configuration'], "Second Life.app"), dst="")
# Second Life.app is what CMake / Xcode builds
# self.app_bundle() is what we ultimately expect to sign and package
self.path(os.path.join(self.args['configuration'], "Second Life.app"),
dst=self.app_bundle())
pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
relpkgdir = os.path.join(pkgdir, "lib", "release")
@ -930,8 +936,6 @@ class DarwinManifest(ViewerManifest):
with self.prefix(src=pkgdir,dst=""):
self.path("ca-bundle.crt")
self.path("SecondLife.nib")
# Translations
self.path("English.lproj/language.txt")
self.replace_in(src="English.lproj/InfoPlist.strings",
@ -1180,8 +1184,6 @@ class DarwinManifest(ViewerManifest):
# Copy everything in to the mounted .dmg
app_name = self.app_name()
# Hack:
# Because there is no easy way to coerce the Finder into positioning
# the app bundle in the same place with different app names, we are
@ -1195,7 +1197,7 @@ class DarwinManifest(ViewerManifest):
if not os.path.exists (self.src_path_of(dmg_template)):
dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
for s,d in {self.get_dst_prefix():app_name + ".app",
for s,d in {self.get_dst_prefix(): self.app_bundle(),
os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",
os.path.join(dmg_template, "background.jpg"): "background.jpg",
os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
@ -1238,7 +1240,7 @@ class DarwinManifest(ViewerManifest):
# the signature are preserved; moving the files using python will leave them behind
# and invalidate the signatures.
if 'signature' in self.args:
app_in_dmg=os.path.join(volpath,self.app_name()+".app")
app_in_dmg=os.path.join(volpath,self.app_bundle())
print "Attempting to sign '%s'" % app_in_dmg
identity = self.args['signature']
if identity == '':
@ -1293,9 +1295,6 @@ class DarwinManifest(ViewerManifest):
raise
self.run_command(['spctl', '-a', '-texec', '-vv', app_in_dmg])
imagename="SecondLife_" + '_'.join(self.args['version'])
finally:
# Unmount the image even if exceptions from any of the above
self.run_command(['hdiutil', 'detach', '-force', devfile])