Signing MacOS build: bundle format unrecognized

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
unregistered
Newbie
Posts: 11
Joined: Tue Apr 21, 2020 5:18 am
Contact:

Signing MacOS build: bundle format unrecognized

#1 Post by unregistered » Wed Feb 16, 2022 11:56 am

I use the Renpy notarization tool to notarize my Mac Build with Apple but I just can't get the app signed and submitted.

When I try to sign it after unpacking with my Cert, this is the error I get:

Code: Select all

./notarize.sh {myapp} sign_app  
{myapp}.app: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /mac-notarization-master/{myapp}/{myapp}.app/Contents/MacOS/lib/python2.7
The problem goes away as soon as I delete the python2.7 folder, which, of course, breaks the app.
Is there something in the python2.7 folder that renders signing impossible?
Last edited by unregistered on Wed Feb 16, 2022 12:35 pm, edited 1 time in total.

unregistered
Newbie
Posts: 11
Joined: Tue Apr 21, 2020 5:18 am
Contact:

Re: Signing MacOS build: bundle format unrecognized

#2 Post by unregistered » Wed Feb 16, 2022 12:27 pm

According to this post, codesign doesn't want folders with periods in the MacOS folder, which Renpy has ("python2.7"). This is the same issue, I guess:

https://stackoverflow.com/questions/377 ... tory-names

unregistered
Newbie
Posts: 11
Joined: Tue Apr 21, 2020 5:18 am
Contact:

Re: Signing MacOS build: bundle format unrecognized

#3 Post by unregistered » Wed Feb 16, 2022 8:55 pm

Sorry for triple posting:

I can confirm that the workaround from Stack Overflow works for the problematic directory structure of Renpy builds when codesigning isn't working:

- Move the folders within the .App Application folder from ./MacOS to ./Resources and symlink them back to ./MacOS
- This keeps the Renpy App working, but having a compatible directory structure for Apple's codesigning.
- To symlink, use the command line "ln -s {sourcedir} {targetdir}

Probably, Renpy should be updated to reflect that with future MacOS builds to avoid further codesigning issues because of invalid periods in directories.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Signing MacOS build: bundle format unrecognized

#4 Post by PyTom » Fri Feb 18, 2022 12:31 am

A quick look shows that this was fixed in Ren'Py 7.4.5. Are you on the latest version of Ren'Py?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

unregistered
Newbie
Posts: 11
Joined: Tue Apr 21, 2020 5:18 am
Contact:

Re: Signing MacOS build: bundle format unrecognized

#5 Post by unregistered » Mon Feb 21, 2022 11:29 am

Ah, that might be it.

While I'm on Renpy 7.4.11 now, the build in question was compiled with 7.4.4.1439. So that might be it! Sorry for that and thanks for taking a look! My bad!

Are there any risks using the symlink workaround or should I recompile everything with the newest version just to be sure? I'm a little worried because the product has now been tested on 7.4.4. extensively.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Signing MacOS build: bundle format unrecognized

#6 Post by PyTom » Sun Feb 27, 2022 12:51 am

I don't have any advice about a symlink workaround - I haven't analyzed it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Bing [Bot]