Further macOS deployment fixes
5 files changed, 27 insertions(+), 12 deletions(-)

M deploy/osx/Info.plist
M deploy/osx/copy-pyqt.sh
A => deploy/osx/notarize.sh
M deploy/osx/sign.sh
M easyhg.py
M deploy/osx/Info.plist +1 -3
@@ 11,11 11,9 @@ 
 	<key>CFBundleIconFile</key>
 	<string>easyhg-icon.icns</string>
 	<key>CFBundleIdentifier</key>
-	<string>org.easymercurial.EasyMercurial</string>
+	<string>org.easyhg.EasyMercurial</string>
 	<key>CFBundleShortVersionString</key>
 	<string>EASYHG_VERSION</string>
-
-	<!-- enable HiDPI -->
 	<key>NSPrincipalClass</key>
 	<string>NSApplication</string>
 	<key>NSHighResolutionCapable</key>

          
M deploy/osx/copy-pyqt.sh +1 -1
@@ 28,7 28,7 @@ if [ ! -f "$ENUM_EGG" ]; then
     exit 2
 fi
 
-pydir="$app.app/Contents/MacOS/Py2.7"
+pydir="$app.app/Contents/MacOS/Py27"
 mkdir -p "$pydir/PyQt5"
 mkdir -p "$pydir/enum"
 

          
A => deploy/osx/notarize.sh +20 -0
@@ 0,0 1,20 @@ 
+## Before this, we need to open Application Loader and log in to the
+## right iTunes Connect account
+
+echo "Not running - read, review, and update script first"
+exit 1
+
+xcrun altool --notarize-app -f "EasyMercurial-1.4.dmg" --primary-bundle-id org.easyhg.EasyMercurial -u "cannam+apple@all-day-breakfast.com" -p @keychain:"Application Loader: cannam+apple@all-day-breakfast.com"
+
+## That churns for a while and then dumps out a UUID
+
+# xcrun altool --notarization-info UUID -u "cannam+apple@all-day-breakfast.com" -p @keychain:"Application Loader: cannam+apple@all-day-breakfast.com"
+
+## Returns "in progress" at first, then eventually a report with a URL
+## that can be retrieved as JSON payload using wget. An email is also
+## sent to the iTunes Connect account holder when it completes
+
+# xcrun stapler staple -v "EasyMercurial-1.4.dmg"
+
+# spctl -a -v "/Applications/EasyMercurial.app"
+

          
M deploy/osx/sign.sh +4 -7
@@ 15,17 15,14 @@ fi
 
 for app in "$dir"/*.app; do
     find "$app" -name Qt\* -print | while read fr; do
-	codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
+	codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$fr"
     done
     find "$app" -name \*.dylib -print | while read fr; do
-	codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
+	codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$fr"
     done
     find "$app" -name \*.so -print | while read fr; do
-	codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
+	codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$fr"
     done
-    codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$app"
-#    codesign -s "Developer ID Application: Chris Cannam" -fv \
-#         --requirements '=designated =>  identifier "org.easymercurial.EasyMercurial" and ( (anchor apple generic and    certificate leaf[field.1.2.840.113635.100.6.1.9] ) or (anchor apple generic and    certificate 1[field.1.2.840.113635.100.6.2.6]  and    certificate leaf[field.1.2.840.113635.100.6.1.13] and    certificate leaf[subject.OU] = "M2H8666U82"))' \
-#         "$app"
+    codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$app"
 done
 

          
M easyhg.py +1 -1
@@ 31,7 31,7 @@ easyhg_import_path = 'NO_EASYHG_IMPORT_P
 if not easyhg_import_path.startswith('NO_'):
     # We have an installation path: append it twice, once with
     # the Python version suffixed
-    version_suffix = 'Py%d.%d' % (sys.version_info[0], sys.version_info[1])
+    version_suffix = 'Py%d%d' % (sys.version_info[0], sys.version_info[1])
     sys.path.append(easyhg_import_path + "/" + version_suffix)
     sys.path.append(easyhg_import_path)