Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac export does not set the binary as executable #4618

Closed
azurvii opened this issue May 11, 2016 · 8 comments
Closed

Mac export does not set the binary as executable #4618

azurvii opened this issue May 11, 2016 · 8 comments

Comments

@azurvii
Copy link

azurvii commented May 11, 2016

Operating system or device - Godot version:
Mac OS X 10.11.4, Godot 2.0.2.stable.official

Issue description (what happened, and what was expected):
Exporting Mac binary, the app does not run. I went in the directory, it looks like the binary file is not set as executable. chmod +x the binary file could resolve the issue.

It's similar to #4219's first point, but it's not crashing for me, and whether or not 64-bit option is on ends the same for me (non-executable).

@akien-mga
Copy link
Member

Can you check in the OSX export template directly if the binary is executable? IINM, the build script used for 2.0.1 and 2.0.2 is supposed to make the binary executable, and then zip the .app; the .zip should then keep the executable bit for the binary inside (in theory).

@azurvii
Copy link
Author

azurvii commented May 11, 2016

The template itself contains multiple executables:

$ ll osx_template.app/Contents/MacOS/
-rwxr-xr-x@ 1 user  staff    25M Apr 12 01:57 osx_template.app/Contents/MacOS/godot_osx_debug.32
-rwxr-xr-x@ 1 user  staff    25M Apr 12 01:57 osx_template.app/Contents/MacOS/godot_osx_debug.64
-rwxr-xr-x@ 1 user  staff    24M Apr 12 01:57 osx_template.app/Contents/MacOS/godot_osx_release.32
-rwxr-xr-x@ 1 user  staff    24M Apr 12 01:57 osx_template.app/Contents/MacOS/godot_osx_release.64

The bundle generated is not:

$ ll FirstGodotGameBundle.app/Contents/MacOS/FirstGodotGameBundle 
-rw-r--r--  1 user  staff    24M Apr 11 19:57 FirstGodotGameBundle.app/Contents/MacOS/FirstGodotGameBundle

Am I not looking at the export directory "directly"?

@akien-mga
Copy link
Member

@punto- Any idea?

All in all it's similar to #527, but it seems people were not complaining about this some months ago so could it be a regression?

@punto-
Copy link
Contributor

punto- commented May 11, 2016

I think this should be set when we construct the .zip during the final
export. Remember that it should be possible to export for OSX from a
Windows machine, and even if the file is set to executable in the template,
the exporter will unzip the template, and rebuild a new .app structure with
the game and the binaries inside a .zip. So whatever needs to happen, it's
some flag that goes in during the .zip creation..

On 11 May 2016 at 10:26, Rémi Verschelde notifications@github.com wrote:

@punto- https://github.com/punto- Any idea?

All in all it's similar to #527
#527, but it seems people
were not complaining about this some months ago so could it be a regression?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#4618 (comment)

@akien-mga
Copy link
Member

Ok, so it's the same problem as #527. We can't just use chmod +x for that as it's not cross-platform. Are there platform-specific APIs we can use to write binaries with the execution bit?

@akien-mga akien-mga added this to the 2.1 milestone May 11, 2016
@azurvii
Copy link
Author

azurvii commented May 12, 2016

I have not tried: https://stackoverflow.com/a/434689/1066506, which needs python.
I don't know what tools are available for the exporter to use, but how about using .tar.gz instead of .zip? Both formats are open-able by Mac's stock Archive Utility.

@azurvii
Copy link
Author

azurvii commented Jul 12, 2016

Not sure if there has been any progress on this, and/or #527. Mac binaries from 2.0.4.1 and the Mac template I compiled 1 or 2 weeks ago still failed to run.

IMHO, I think it's better to apply the quick fix @akien-mga mentioned in that issue to use chmod for the time being. i.e. to only leave the Windows cross-compiling part broken (which maybe not even many people care about?) while figuring out the solution and letting other platforms work which do care about these exports.

@akien-mga
Copy link
Member

Closing as duplicate of #527 since both issues are being discussed together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants