Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

iOS and MacOS / Ancient Lady's detailed instructions for using Xcode for Tier 1 Mac project

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 26th Jun 2013 16:20 Edited at: 27th Jun 2013 17:39
Okay, the official AppGameKit Guide for Mac production is horribly out of date and has incorrect information.

So, I updated my iOS Tier 1 instructions for Mac and here they are.

If you have any issues with them, please let me know.
===================================================================
• Copy the entire IDE folder from the AppGameKit installation to your Mac
• On the Mac copy of the files, delete all but the following folders:
<MACAGKDIR>/IDE/apps/interpreter
<MACAGKDIR>/IDE/apps/interpreter_ios
<MACAGKDIR>/IDE/apps/interpreter_mac
<MACAGKDIR>/IDE/apps/template_ios
<MACAGKDIR>/IDE/apps/template_mac
<MACAGKDIR>/IDE/common
<MACAGKDIR>/IDE/Help (this is up to you, whether you want local help)
<MACAGKDIR>/IDE/platform/apple
<MACAGKDIR>/IDE/platform/mac
• This next step is very important if you want to link v1085+ (Facebook):
⁃ Navigate to <MACAGKDIR>/IDE/platform/apple/Source/Social Plugins/FacebookSDK
⁃ Follow the instructions in the file named Urgent_ReadMe_Now.txt
• Navigate to \IDE\Apps\interpreter_mac folder and duplicate it
• Rename the duplicate to your chosen app name (i.e. foo)
• Navigate into this folder and double click on agkinterpreter.xcodeproj (i.e. \IDE\Apps\foo)
• This should launch XCODE (4.3.2 or better) with the iOS application project
• In order to create a release build, do these steps:
⁃ Click on 'agk_interpreter>' at the very top of the interface (to the right of the square 'Stop' button and to the left of 'My Mac 32-bit')
⁃ Click on 'Edit scheme…'
⁃ For each item other than 'Build' in the left column, click on it and select 'Release' from the 'Build Configuration' drop down list to the right
⁃ Close the dialog with the 'OK' button
• If you want your compiled project to end up in a friendly directory (the default is quite ugly):
⁃ Select Xcode -> Preferences from main menu
⁃ Click on the "Locations" tab/icon
⁃ Click on the "Advanced…" button
⁃ Select "Custom", click on the select list next to it and select "Relative to Workspace"
⁃ Click on "Done"
⁃ Do yourself a favor and click on the "Text Editing" tab/icon and check "Line numbers", this comes in handy later
⁃ Close the Preferences dialog box
• If it is visible, click on "Validate Settings" in the middle at the bottom of the interface and click on "Perform Changes" in the popped up dialog (it's up to you whether you enable or disable automatic snapshots in the next pop up)
• Click on the tiny folder icon under tab-like thing with label "agkinterpreter.xcodeproj" (on the left side of the app, near the top)
• To rename the basic project:
⁃ Click on "agk_interpreter, 1 target, OS X SDK 10.<something>" next to white pointing triangle
⁃ In the area to the right, click on "agkinterpreter" under the word "PROJECT"
⁃ Click on "Build Settings" in the header in the area next to that one
⁃ In the far right column, under the heading "Identity", change 'Project Name' from 'agkinterpreter' to the new name of your application (foo) and then press the enter or return key (do NOT use any spaces or special characters other than the underline)
⁃ In the "Rename project content items?" dialog that pops up, click on the "Rename" button
⁃ Double click on "agk_interpreter" under "TARGETS" (beneath "PROJECTS")
⁃ Type in your preferred name (should be same as project, for simplicity) and press enter/return key
• Now, to rename the application itself:
⁃ Click on the name under "TARGETS" and select "Build Settings" from the set to the right
⁃ Scroll down to the "Code Signing" header and open the section, if not already opened
⁃ Click on the entry next to "Code Signing Identity"
⁃ If you have registered with Apple, created a Developer ID and downloaded it, it will appear under 'Automatic Profile Selector', select that for now
⁃ If you have not registered, select "Don't Code Sign" for now
⁃ Scroll down to the "Packaging" header and open the section, if not already opened
⁃ Double click on "AGK Player" next to "Product Name"
⁃ Type the name you want to use for your app and press the enter/return key
• You probably will want to change the bundle identifier (certainly before you publish):
⁃ Select the target under "TARGETS" and select "Info" on the right
⁃ Double click on "com.thegamecreators.AGKTestAppMacOS" and change it to something appropriate for your app. "thegamecreators" should become your indie/company name (no spaces) and "AGKTestApp" should be your application name without spaces or underscores (a-z,0-9 only)
• Select Product > Clean from the main menu (or click {apple}{shift}k)
• Select Product > Build from the main menu (or click {apple}b)
• If all goes well, your application will build successfully
• You can test your new application by clicking on the big black triangle in a circle above the word 'Run' in the upper left of the app.
• You should see the AppGameKit Player standby screen on your display
• Quit the application and collect the byte code and media files from your Windows AppGameKit project's media directory
• The byte code and media files should include the BYC file named <yourwinproj>.byc
• Copy these files into the media directory in your new project folder
• Rename the .BYC file to 'bytecode.byc' exactly, all lowercase and no spaces
• From the project project tree to the left, open up your project so you can see your project files
• Modify the interpreter.cpp file to include the 'bytecode.byc' file:
⁃ Make sure the application tree is open, the right triangle next to the project name in the far left column is changed to a down triangle and a list of directory boxes appears
⁃ Open the "Classes" directory
⁃ Click on 'interpreter.h'
⁃ Add this as the third line (after '#define _H_APP'):
#define STANDALONE
⁃ Save the file
⁃ All being well, when you click Build and Run you will see your Tier 1 BASIC app appear!
• You can find your final application binary at IDE\Apps\yourproject\Build\Products\Release\yourapp

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 26th Jun 2013 23:52
very much appreciated Lady ! Thanks a lot !

(still we can use the Mac AppGameKit Player inserting the media and bytecode directly by editing the .app package or not ? except for mac appstore obviously (due to dev license) but for standalone providing ..?)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jun 2013 03:44
Quote: "still we can use the Mac AppGameKit Player inserting the media and bytecode directly by editing the .app package or not ?"

No.

As far as I know, once the project is built, you cannot actually change the contents.

You can add your stuff to the Mac Player's media directory and rebuild, but that is recreating the package, not editing it.

And you are not allowed to give that to anyone who isn't registered as one of your developer's or testers under your Mac Developer's License with Apple.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 27th Jun 2013 06:02
Quote: "As far as I know, once the project is built, you cannot actually change the contents."

i have a doubt because i'm pretty sure that i have done this at the beginning of AppGameKit and that it was in the help docs...

(Edit : it's in the doc :

Quote: "The easiest way to prepare a standalone application is to modify the AppGameKit Player for Mac which is provided in the AGK\Players\Mac folder. Follow these steps:

Navigate to the AGK\Players\Mac folder and make a copy of the AppGameKit Player.app folder
Rename this copy to the name you wish to call your application (i.e. MyStandaloneApp.app)
Don't forget to include the '.app' at the end of your renamed folder
Navigate inside this folder to Contents\Resources (i.e. MyStandaloneApp\Contents\Resources)
Copy all the files in your projects media folder to this location (except the AGC file)
Rename the project BYC file to "AGK Player.byc" (case sensitive)
Copy the whole application folder (i.e. MyStandaloneApp.app) to a Mac
You can launch the standalone application by simply double clicking the .app file"

)

Quote: "You can add your stuff to the Mac Player's media directory and rebuild, but that is recreating the package, not editing it.

And you are not allowed to give that to anyone who isn't registered as one of your developer's or testers under your Mac Developer's License with Apple.
"


I was talking for a private use (not for official distribution through a store
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jun 2013 16:26
Well, if you look in the AGK\Players\Mac folder, all you will find is a text file.

I believe that TGC did intend on providing prebuilt Players for iOS and Mac (the AGK\Players\Apple also has just a text file). But Apple won't let them do this for iOS and the Mac AppGameKit Player in the Mac App Store is for v1074 (not even the current official release).

So, my original answer stands.

But, if it had been there, you could have used it.

If you have a Mac and Xcode, you can create anything you want for your own use.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 27th Jun 2013 20:58
Yes. Indeed, the prebuilt MacOS player is no longer in the based AppGameKit Package.

But it sounds good to compile the player the first time with XCode and simply modify .app contents and plist to have a working updated app
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jun 2013 21:36
The trick is that I cannot find anything with an extension of .app in the stuff built for Mac by Xcode. And the only thing with 'plist' that I can find is the one in the project directory which doesn't list any assets.

And I repeat my defense that it is better to make a fresh copy of the interpreter_mac (or _ios) directory and rename it to your own project. That way your media is always specific to the project. And that includes things like the icons for the App, which should be distinct.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-03-29 09:02:32
Your offset time is: 2024-03-29 09:02:32