Packaging GE on Mac

Mac specific questions and discussion

Packaging GE on Mac

Postby StAquinas » Thu Sep 22, 2011 7:15 am

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
StAquinas
 
Posts: 9
Joined: Mon Sep 05, 2011 8:20 pm
Location: Lost in my own mind
Score: 1 Give a positive score

Re: Packaging GE on Mac

Postby skydereign » Thu Sep 22, 2011 8:48 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Packaging GE on Mac

Postby StAquinas » Fri Sep 23, 2011 1:14 am

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?
Last edited by StAquinas on Fri Sep 23, 2011 1:35 am, edited 1 time in total.
StAquinas
 
Posts: 9
Joined: Mon Sep 05, 2011 8:20 pm
Location: Lost in my own mind
Score: 1 Give a positive score

Re: Packaging GE on Mac

Postby skydereign » Fri Sep 23, 2011 1:20 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Packaging GE on Mac

Postby StAquinas » Fri Sep 23, 2011 2:31 am

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
StAquinas
 
Posts: 9
Joined: Mon Sep 05, 2011 8:20 pm
Location: Lost in my own mind
Score: 1 Give a positive score

Re: Packaging GE on Mac

Postby StAquinas » Fri Sep 23, 2011 2:45 am

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
StAquinas
 
Posts: 9
Joined: Mon Sep 05, 2011 8:20 pm
Location: Lost in my own mind
Score: 1 Give a positive score

Re: Packaging GE on Mac

Postby skydereign » Fri Sep 23, 2011 3:07 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Packaging GE on Mac

Postby akr » Fri Sep 23, 2011 5:57 am

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
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

How To Export and Create and Application for Mac OS X

Postby StAquinas » Fri Sep 23, 2011 7:20 pm

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
StAquinas
 
Posts: 9
Joined: Mon Sep 05, 2011 8:20 pm
Location: Lost in my own mind
Score: 1 Give a positive score

Re: Packaging GE on Mac

Postby makslane » Mon Sep 26, 2011 4:39 pm

Thanks, nice tutorial :-)
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Mac

Who is online

Users browsing this forum: No registered users and 1 guest

cron