Can you build the app as hatari (lowercase) and manually rename it to Hatari (capitalized) after the build?
I thought the user could manually rename the app after it has been code signed. Is that wrong?
After a few more experiments it seems that the entries in the Info.plist inside the bundle must match the name of the bundle and the name of the executable to allow signing.
The current (unpatched) code produces hatari.app on macOS with lower case hatari executable inside the bundle. It is not possible to produce Hatari.app with hatari executable. At least I don’t know how. If you prefer hatari executables it will be hatari.app.
>
> Thomas,
>
> As a former Linux user and current macOS terminal user, I completely agree with you. On Linux, the executable should be lowercase. I do not remember if Hatari is capitalized on Windows or not. I do not use Hatari on Windows enough to remember.
>
> Furthermore, on macOS, the executable inside the Hatari.app bundle (appears as a directory when viewing it on non-macOS systems) should be lowercase. If you run a command from Terminal, we should be able to keep the hatari executable in lowercase and only have Hatari.app with a capital letter. This is helpful when a Hatari developer suggests a command-line to a macOS user. They could get confused wondering why the command did not run if the macOS executable is named Hatari instead of hatari because you will get an error stating that “hatari” is not found if the executable is called Hatari.
>
> I am very grateful to Andreas for finding the underlying problem on why I could not run the cirrus-ci binaries on macOS Sonoma. With his help, it should be possible to make a macOS Hatari binary that works for end users easily.
>
> If I am reading your diff correctly, why are you changing Hatari.app to hatari.app? I think the only part of the CMakefile that needs to have Hatari capitalized is any reference to Hatari.app. If the CMakefile refers simply to hatari, I think we can leave that in lowercase.
>
> Bob C
>
>>
>> Am Sun, 17 Dec 2023 01:23:45 +0100
>>
>>> Great! This is normal behaviour for applications signed by non-paying developers. Problem solved!
>>>
>>> The quarantine problem was caused by signing failing silently. Hatari was not signed at all. The signing failed because of the big hatari-Hatari-mess in the CMakeLists. The appended patch2 fixes the issue. I also appended patch1 again to make sure patches are applied in the correct order.
>>
>> So the problem is simply about a "hatari.app" vs. "Hatari.app" naming issue?
>> Ouch!
>> Ok, thanks a lot for your investigation, Andreas! But I think your second
>> patch is not the right way for Hatari, since this also renames the binary
>> on Linux and other OSes which is not what we want (at least it's not what
>> I want).
>>
>> So I think for Hatari we should go the other way round and find the right
>> spots where we have to rename "Hatari" to "hatari" in the macOS parts of
>> the code.
>>
>> Could you please check whether this fixes the issue, too:
>>
>> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
>> index 30630b69..ba26b693 100644
>> --- a/src/CMakeLists.txt
>> +++ b/src/CMakeLists.txt
>> @@ -98,9 +98,9 @@ if(ENABLE_OSX_BUNDLE)
>> set(MACOSX_BUNDLE_ICON_FILE Hatari.icns)
>> set(MACOSX_BUNDLE_GUI_IDENTIFIER org.tuxfamily.Hatari)
>> if(CMAKE_GENERATOR MATCHES "Xcode")
>> else()
>> endif()
>> if(PNG_FOUND)
>> set(COPY_PNG cp -R ${PNG_LIBRARY} ${BUNDLE_CONTENTS}/Frameworks/)
>> diff --git a/src/gui-osx/Info-Hatari.plist b/src/gui-osx/Info-Hatari.plist
>> index eea99de6..b6d87bc2 100644
>> --- a/src/gui-osx/Info-Hatari.plist
>> +++ b/src/gui-osx/Info-Hatari.plist
>> @@ -54,7 +54,7 @@
>> </dict>
>> </array>
>> <key>CFBundleExecutable</key>
>> - <string>Hatari</string>
>> + <string>hatari</string>
>> <key>CFBundleIconFile</key>
>> <string>Hatari.icns</string>
>> <key>CFBundleIdentifier</key>
>> @@ -62,7 +62,7 @@
>> <key>CFBundleInfoDictionaryVersion</key>
>> <string>6.0</string>
>> <key>CFBundleName</key>
>> - <string>Hatari</string>
>> + <string>hatari</string>
>> <key>CFBundlePackageType</key>
>> <string>APPL</string>
>> <key>CFBundleShortVersionString</key>
>> @@ -71,7 +71,7 @@
>> <string>HATA</string>
>> <key>CFBundleVersion</key>
>> <string>2.4.1</string>
>> - <key>Hatari</key>
>> + <key>hatari</key>
>> <string>SDL Cocoa App</string>
>> <key>LSMinimumSystemVersion</key>
>> <string>10.9.0</string>
>> index 8e9661ea..6e36b535 100644
>> @@ -1,6 +1,6 @@
>> /* Localized versions of Info.plist keys */
>>
>> -CFBundleName = "Hatari";
>> +CFBundleName = "hatari";
>> CFBundleShortVersionString = "Hatari version 2.4.1";
>> CFBundleGetInfoString = "Hatari version 2.4.1 , Copyright 2022, T. Huth.";
>> NSHumanReadableCopyright = "Copyright 2022, T. Huth.";
>> index 0c25a2dd..06c3e018 100644
>> @@ -1,6 +1,6 @@
>> /* Localized versions of Info.plist keys */
>>
>> -CFBundleName = "Hatari";
>> +CFBundleName = "hatari";
>> CFBundleShortVersionString = "Hatari(fr) version F 2.4.1 ";
>> CFBundleGetInfoString = "Hatari version 2.4.1 , Copyright 2022, T. Huth.";
>> NSHumanReadableCopyright = "Copyright 2022, T. Huth.";
>>
>> ?
>>
>> Thanks,
>> Thomas
>>
>>
>