Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 8627bf8

Browse files
Merge pull request #7586 from livecodeian/bugfix-22791
[[ Bug 22791 ]] Fix error signing Mac standalones when app name contains accents
2 parents 63f6bd2 + 31acf8e commit 8627bf8

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

docs/notes/bugfix-22791.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix codesigning error saving Mac standalone app when the app name contains accented characters

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)