install.py: extended and corrected the macOS application bundle generation.

Sun, 20 Jan 2019 14:41:07 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 20 Jan 2019 14:41:07 +0100
changeset 6664
50c9c1c9cf30
parent 6663
fe9da2b5d148
child 6665
adb59475e671

install.py: extended and corrected the macOS application bundle generation.

install.py file | annotate | diff | comparison | revisions
--- a/install.py	Sat Jan 19 15:58:03 2019 +0100
+++ b/install.py	Sun Jan 20 14:41:07 2019 +0100
@@ -1237,6 +1237,16 @@
     shutilCopy(os.path.join(sourceDir, "pixmaps", "eric_2.icns"),
                os.path.join(dirs["icns"], "eric.icns"))
     
+    if os.path.exists(os.path.join("eric", "UI", "Info.py")):
+        # Installing from archive
+        from eric.UI.Info import Version, CopyrightShort
+    elif os.path.exists(os.path.join("UI", "Info.py")):
+        # Installing from source tree
+        from UI.Info import Version, CopyrightShort
+    else:
+        Version = "Unknown"
+        CopyrightShort = "(c) 2002 - 2019 Detlev Offenbach"
+    
     copyToFile(
         os.path.join(dirs["contents"], "Info.plist"),
         '''<?xml version="1.0" encoding="UTF-8"?>\n'''
@@ -1249,7 +1259,7 @@
         '''    <key>CFBundleIconFile</key>\n'''
         '''    <string>eric.icns</string>\n'''
         '''    <key>CFBundleInfoDictionaryVersion</key>\n'''
-        '''    <string>1.0</string>\n'''
+        '''    <string>{1}</string>\n'''
         '''    <key>CFBundleName</key>\n'''
         '''    <string>{0}</string>\n'''
         '''    <key>CFBundleDisplayName</key>\n'''
@@ -1257,13 +1267,18 @@
         '''    <key>CFBundlePackageType</key>\n'''
         '''    <string>APPL</string>\n'''
         '''    <key>CFBundleSignature</key>\n'''
-        '''    <string>????</string>\n'''
+        '''    <string>ERIC-IDE</string>\n'''
         '''    <key>CFBundleVersion</key>\n'''
-        '''    <string>1.0</string>\n'''
+        '''    <string>{1}</string>\n'''
+        '''    <key>CFBundleGetInfoString</key>\n'''
+        '''    <string>{1}, {2}</string>\n'''
         '''    <key>CFBundleIdentifier</key>\n'''
         '''    <string>org.python-projects.eric-ide</string>\n'''
         '''</dict>\n'''
-        '''</plist>\n'''.format(macAppBundleName.replace(".app", "")))
+        '''</plist>\n'''.format(
+            macAppBundleName.replace(".app", ""),
+            Version.split(None, 1)[0],
+            CopyrightShort))
 
 
 def createInstallConfig():

eric ide

mercurial