Skip to content

Commit d7d8677

Browse files
committed
[[ Bug 22791 ]] Fix error signing Mac standalones when app name contains accents
This patch fixes an error when using the codesign utility to sign Mac standalones, when the app name contains accented characters. This is due to codesign expecting unicode characters in the plist to be given in decomposed form.
1 parent eeb23f2 commit d7d8677

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

engine/rsrc/Installer-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleDevelopmentRegion</key>
6-
<string>English</string>
6+
<string>en</string>
77
<key>CFBundleExecutable</key>
88
<string>$(PRODUCT_NAME)</string>
99
<key>CFBundleGetInfoString</key>

engine/rsrc/LiveCode-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleDevelopmentRegion</key>
6-
<string>English</string>
6+
<string>en</string>
77
<key>CFBundleDocumentTypes</key>
88
<array>
99
<dict>

engine/rsrc/Standalone-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleDevelopmentRegion</key>
6-
<string>English</string>
6+
<string>en</string>
77
<key>CFBundleDocumentTypes</key>
88
<array>
99
<dict>

ide-support/revsaveasstandalone.livecodescript

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ command revSaveAsMacStandalone pStack, pRestoreFileName, pFolder, @xStandalonePa
672672
put sStandaloneSettingsA into tStandaloneSettingsA
673673
repeat for each key tTarget in sPlatformDirectoriesA["MacOSX"]
674674
put sPlatformDirectoriesA["MacOSX"][tTarget] into tTargetDir
675-
put tTargetDir & sStandaloneSettingsA["name"] & ".app/Contents/MacOS/" into tDirectory
675+
put tTargetDir & normalizeForDisk(sStandaloneSettingsA["name"]) & ".app/Contents/MacOS/" into tDirectory
676676

677677
-- Ensure standalone settings script local is reset when building for subsequent targets
678678
put tStandaloneSettingsA into sStandaloneSettingsA
@@ -697,7 +697,7 @@ command revSaveAsMacStandalone pStack, pRestoreFileName, pFolder, @xStandalonePa
697697
& return & tEngineSourceFile
698698
end if
699699

700-
put tDirectory & sStandaloneSettingsA["name"] into tStandalonePath
700+
put tDirectory & normalizeForDisk(sStandaloneSettingsA["name"]) into tStandalonePath
701701

702702
put tStandalonePath into xStandalonePaths[tTarget]
703703

@@ -1783,9 +1783,18 @@ end revSetMacOS
17831783
-- plists as Mavericks doesn't like it!
17841784
private function escapeForXml pString
17851785
replace "&" with "&amp;" in pString
1786-
return pString
1786+
return normalizeText(pString, "NFD")
17871787
end escapeForXml
17881788

1789+
private function normalizeForDisk pString
1790+
if the platform is "MacOS" then
1791+
// Composed unicode chars can cause problems with codesign so we normalize them to NFD form
1792+
return normalizeText(pString, "NFD")
1793+
else
1794+
return pString
1795+
end if
1796+
end normalizeForDisk
1797+
17891798
#####################################################################
17901799
# revSetStackProps is a combination of revRemoveProps and revSetProfiles
17911800
# There's no point walking every object in the distribution twice

0 commit comments

Comments
 (0)