• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

"damaged or incomplete" error when app is run outside of build folder

olive

Member
3rd Party Module Dev
Tutorial Author
Patreon Bronze
Joined
Jul 17, 2017
Messages
76
This might be some kind of mac permissions problem, but I can't find any leads via google.

Game runs fine if I run it from glfw3/xcode/build/Release. If I copy that .app file to anywhere else, the icon gets crossed out and trying to run it will throw a "You can't open the application ... because it may be damaged or incomplete." Screenshot attached.

Am I looking at the wrong file or building it wrong somehow?

Catalina 10.15.3
Cerberus v2019-10-13
 

Attachments

  • Screen Shot 2020-06-11 at 1.36.34 PM.png
    Screen Shot 2020-06-11 at 1.36.34 PM.png
    1.1 MB · Views: 163
Sounds like an issue with plist. May need the xcode template updating to a version of xcode that was the entry to the oldest supported version of Mac OS X.
 
OK, I think I figured out what's causing it.

- Did a clean rebuild. The .app worked normally.
- I manually modified plist in order to set the app title, icon, etc.
- The "damaged or incomplete" error now pops up as soon as I move or rename the file.

I think this causes the plist's signature to differ from the one in Contents/_CodeSignature/CodeResources.

So... is there a better way to set the app name and icon for osx? Or to rebuild CodeResources after modifying plist? I'm already using #GLFW_APP_ICON, etc.
 
Last edited:
@MikeHart
The app name and bundle id should be easy enough to do.
Update the xcode project template and make sure you have some thing like this.
Take from my experimental git repo.

Cerberus:
Local appName:=GetConfigVar( "GLFW_APP_NAME" ), bundleID:=GetConfigVar( "GLFW_XCODE_BUNDLE_ID" )

' Set the Application bundle name.
If appName="" appName=QuoteMe("CerberusGame") Else appName=QuoteMe(appName)
If bundleID="" bundleID="com.yourcompany.CerberusGame"

Local params:="OTHER_CFLAGS='"+ccopts+" ' OTHER_LDFLAGS='"+ldopts+" "+libsopts+" ' PRODUCT_NAME='"+StripQuotes( appName ) +
"' PRODUCT_BUNDLE_IDENTIFIER='"+bundleID
            
Execute "xcodebuild -configuration "+casedConfig+" "+params

Adding icons would be a bit trickier as there are two paths to take.
Add the ability to generate icns files from pngs, or use the xcatalog and copy over a bunch of pngs.
 
No I ment that we implemented the icon setting and I thought it worked. Have to look again.
I think this is the bit:
Cerberus:
Method CopyIcon:Void(iFile:String,targetIcon:String)      
        If HostOS() = "winnt"
            Local iconPath:=ExtractDir(StripExt( tcc.opt_srcpath ))
            local iconFile:String = RealPath(iconPath+"\"+iFile)
            If FileType( iconFile )=FILETYPE_FILE
                'Print "Icon1== "+iconFile
                If ExtractExt( iconFile).ToLower() = "ico"
                    CopyFile (iconFile,targetIcon)
                Else
                    _ConvertToIco (iconFile,targetIcon)
                End
            Else
                iconFile = iFile
                If FileType( iconFile )=FILETYPE_FILE
                    'Print "Icon2== "+iconFile
                    If ExtractExt( iconFile).ToLower() = "ico"
                        CopyFile (iconFile,targetIcon)
                    Else
                        _ConvertToIco (iconFile,targetIcon)
                    End
                Endif
            Endif
        Endif
    End
I don't recall if OS X will handle ico format correctly, due to the nature of how images need to be stores for them to be displayed correctly over all Apple devices. Or if xcodebuild has any way for passing the icon name.
 
Haven't built the latest on OS X due to being stuck on 10.11, so I don't know how it currently is implemented.

I can confirm that the Icon directive does not yet work on the latest version of macOS 10.15.5 Catalina.
 
btw ico is a legacy format that only Windows uses, everything else uses png. I think Windows can use png too?
 
There is a difference changing an icon through file details dialog and providing it through the process of building the exe.
 
Back
Top Bottom