Skip to content

Commit

Permalink
Bug 958814 - For Mac XULRunner installations, add a bundle identifier…
Browse files Browse the repository at this point in the history
… to prevent a crash in gfxPlatformMac.cpp. r=Mossop
  • Loading branch information
ajvincent committed Jan 12, 2014
1 parent a693e40 commit fece0ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xulrunner/app/install_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,25 @@ def installApp(appLocation, installDir, appName, greDir):
<string>$version</string>
<key>CFBundleVersion</key>
<string>$version.$buildID</string>
<key>CFBundleIdentifier</key>
<string>$reverseVendor</string>
</dict>
</plist>
"""
version = iniparser.get("App", "Version")
buildID = iniparser.get("App", "BuildID")
infoString = appName + " " + version
reverseVendor = "com.vendor.unknown"
appID = iniparser.get("App", "ID")
colonIndex = appID.find("@") + 1
if (colonIndex != 0):
vendor = appID[colonIndex:]
reverseVendor = ".".join(vendor.split(".")[::-1])
contents = contents.replace("$infoString", infoString)
contents = contents.replace("$appName", appName)
contents = contents.replace("$version", version)
contents = contents.replace("$buildID", buildID)
contents = contents.replace("$reverseVendor", reverseVendor)
infoPList = open(os.path.join(installDir, "Contents/Info.plist"), "w+b")
infoPList.write(contents)
infoPList.close()
Expand Down

0 comments on commit fece0ff

Please sign in to comment.