Page 1 of 1

Packaging GE on Mac

PostPosted: Thu Sep 22, 2011 7:15 am
by StAquinas
Hey All,
I'm a mac user of GE and have seen posts where people have talked about having created a .app bundle for GE, but I can never seem to find any concrete instructions on how to build it myself. So far using what I have found through scouring the forums, has resulted in three tries and three fails. Right now I just open the Unix exe with terminal, but hope to build the app to allow for better export to macs as well as having a standalone app that doesn't require me to constantly open terminal. If you know how I'd love to hear from you! :D

Re: Packaging GE on Mac

PostPosted: Thu Sep 22, 2011 8:48 am
by skydereign
This should work. http://game-editor.com/forum/viewtopic.php?f=1&t=8733&p=68856#p68856

Just to note, after you chmod it to flip the execute bit, you should be able to double click it.

Re: Packaging GE on Mac

PostPosted: Fri Sep 23, 2011 1:14 am
by StAquinas
I followed the instructions and I didn't manage to make it work, I got the chmod to work and created a unix executable, but once I put together the package in the newly created .app directory I got an error that it was incomplete or corrupt. I opened up a few other packages, namely safari and firefox and I noticed both had an info.plist file in the directory as well, do I need to create a property list for it to function?

Re: Packaging GE on Mac

PostPosted: Fri Sep 23, 2011 1:20 am
by skydereign
No, I don't think that would work. gE needs those other files, and has to be in that directory, otherwise it won't load. There might be a way of packaging those in, but I don't think gE can work that way.

Re: Packaging GE on Mac

PostPosted: Fri Sep 23, 2011 2:31 am
by StAquinas
Well at least out of it all I learned to properly chmod my exports even if I haven't quite figured out how to package them into a .app bundle

Re: Packaging GE on Mac

PostPosted: Fri Sep 23, 2011 2:45 am
by StAquinas
I spoke too soon! to Bundle an exported game, you need to follow those instructions you linked to and then add the info.plist file from sourceforge:
http://sourceforge.net/apps/trac/game-e ... Info.plist

Once you do that edit the entries appropriately and your game should fire from an application rather than go through terminal to execute. :D

And in Recent Tests this works for GE itslef, got it to launch normally in .app bundle

Re: Packaging GE on Mac

PostPosted: Fri Sep 23, 2011 3:07 am
by skydereign
Yeah, doesn't seem to work anymore. It used to be able to run without the plist file, I guess they've gotten stricter with the structure.

Re: Packaging GE on Mac

PostPosted: Fri Sep 23, 2011 5:57 am
by akr
I am not sure where we are but the exported binary should run from command line or desktop after the chmod +x

or

inside the MacOS directory of an app bundle. Therefore u can use the app bundle of the ge editor and copy it for your
own purpose. Place the binary there (after chmod) and lauch app. Should run. Make sure that u got the latest
os binary. If not download from game-editor.net.

In future we will provide a xcode project in addition for that. It will be named "gemac". For two reasons:

1) Enable ge users to post apps to the mac appstore. A great marketplace!!!
2) Delegate the app bundle task to xcode instead of doing it manually.

-andreas

How To Export and Create and Application for Mac OS X

PostPosted: Fri Sep 23, 2011 7:20 pm
by StAquinas
Here are the steps I took to package an exported game into an application

1. Export to Mac executable from inside GE
2. This should produce a document without an extension that has the name of your game
3. To make a unix executable from this first open Terminal, this is in Applications -> Utilities -> Terminal
4. Enter "cd "(no quotes, the space is crucial) filepath to directory where your exported game is stored
5. Now enter "chmod +x "(again spaces are important) followed by yourgamefilename (the filename should not have any spaces)
6. Assuming this has succeeded you should now have a unix executable file.
7. At this point your game is runnable, but if you want to have your game as an application there is still more work to be done
8. Create a new Directory with what you [u]want[/u] game application to be named
9. Inside this folder create a new folder "Contents" (no quotes, case sensitive)
10. Inside Contents create yet another folder "MacOS" (still no quotes, still case sensitive)
11. Place your unix executable inside MacOS
12. Now download an info.plist file from the source trunk for GE at: http://sourceforge.net/apps/trac/game-e ... Info.plist
13. Open info.plist using TextEdit and change the entries for CFBundleDisplayName, CFBundleExecuatble, CFBundleIdentifier, CFBundleName, CFBundleShortVersionString, and CFBundleSignature (This could remain ???? and have the app still work)
14. Place the edited info.plist into the Contents folder
15. "Get Info" about your Game folder that we created and rename it "Your game title.app"
16.When asked if you wanted to add this extension press add
17. You should now have a complete application created from your exported game


How I Packaged GE:

1. Create folder "Game Editor" or whatever you would like to call it
2. Create Contents folder within this
3. Create MacOS within Contents
4. Place gameEditorMacOSX inside MacOS
5. Create Resources folder within Contents
6. Place bin folder from the GE folder you downladed, along with tutorials folder, docs folder, b_xy.ping, editor.dat, functions.xml, GameEditor.ini, and logo.png into the Resources folder you created.
7. Again download the info.plist and edit the appropriate entries just like above
8. Place this inside the Contents folder
9.Just like before add the .app extension
10. You should now be able to run game Editor from an application without opening Terminal

Re: Packaging GE on Mac

PostPosted: Mon Sep 26, 2011 4:39 pm
by makslane
Thanks, nice tutorial :-)