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

  • 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

  • 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.

  • [QUOTE="wick, post: 8491, member: 39"]
    So... is there a better way to set the app name and icon for osx?
    [/QUOTE]

    Guess I have to work on that bit a bit. Patience my young padawan. :)

  • @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.

    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.

  • [QUOTE="dawlane, post: 8497, member: 12"]
    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.
    You should be able to get a full list of any build variables and values by following https://stackoverflow.com/a/6911421
    [/QUOTE]
    No I ment that we implemented the icon setting and I thought it worked. Have to look again.

  • [QUOTE="MikeHart, post: 8498, member: 3"]
    No I ment that we implemented the icon setting and I thought it worked. Have to look again.
    [/QUOTE]
    I think this is the bit:


    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.

  • [QUOTE="dawlane, post: 8497, member: 12"]
    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.
    [/QUOTE]

    I can confirm that the Icon directive does not yet work on the latest version of macOS 10.15.5 Catalina.

  • There is a difference changing an icon through file details dialog and providing it through the process of building the exe.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!