User Tools

Site Tools


en:tutorials:publishing:preparing_a_macosx_release

Preparing for a release under MacOSX

The following acts as a tutorial and a reference checklist for preparing your build for release and packaging for deployment. It covers a checklist of things for your config files, preparing and converting an icon for your executable, and finally how to create a disk image with an “installer”.

Code and Config pre-flight checklist

  • Ensure that your [Resource] section has paths that will locate your config when you repackage your binary, configs, assets and library. For example:
  Texture = ../../data # ./data	
  • Remove any test features from your code.
  • Remove any files that aren't needed. Remove liborxd.dylib and liborxp.dylib. Only liborx.dylib is needed for release.

Preparing the application folder structure

Prepare up the following suggested folder structure, eg:

My Game Application
	Contents
		MacOS
		Resources

Under MacOS, drop in your executable, liborx.dylib, and starting ini file.

Ensure your executable is named the same as the root folder name, eg: “My Game Application” (without quotes) Also ensure your starting .ini is using the same name so the executable can pick it up, eg: “My Game Application.ini” (without quotes)

Under the Resources subfolder, drop in your data assets and any other ini files.

Make sure all config paths and resource paths are correct, by loading your executable and ensuring it all runs fine.

Icons

You will need to create an icns file, which is a file that can contain one or more icons of varying sizes. Get a PNG image that you would like to use.

Preparing the correct icon size
  1. Double click your PNG to load into Preview.
  2. Use Tools/Resize to change the size to 128×128 or 256×256 whatever is closest.
  3. Export to a new PNG file and name using either the exact name of icon_128x128.png or icon_256x256.png
Building the icon folder structure to make a conversion
  1. Create a folder called: icon.iconset
  2. Copy your icon_128x128.png or icon_256x256 (or both) into this folder
  3. Open a terminal and make your way to the parent folder of the icon.iconset folder
  4. Type: iconutil -c icns icon.iconset

A new file called icon.icns will be created.

Rename this file in the same format of the application, eg: “My Game Application.icns” (without quotes).

Copy the file to Resources folder.

Creating package information

Package information is a way to add metadata into your application which identifies the name of the game, author, versions etc etc etc.

The Pkginfo file

Create a Pkginfo file under the Contents folder. Add the following literal text to the file:

 
 APPL????
 
The Info.plist file

Create another file in the Contents folder called: Info.plist

Paste in the following and change the string values to what suits your application:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>BuildMachineOSBuild</key>
	<string>13A561</string>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>My Game Application</string>
	<key>CFBundleGetInfoString</key>
	<string>1.0, Copyright © 2014-2015, Mr Developer.</string>
	<key>CFBundleHelpBookFolder</key>
	<string>My Game Application.help</string>
	<key>CFBundleHelpBookName</key>
	<string>net.somedomain.somesubdomain.help</string>
	<key>CFBundleIconFile</key>
	<string>My Game Application.icns</string>
	<key>CFBundleIdentifier</key>
	<string>net.somedomain.somesubdomain.somesubsubdomain</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>1.0</string>
	<key>CFBundleName</key>
	<string>My Game Application</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>123</string>
	<key>DTCompiler</key>
	<string>net.apple.compilers.llvm.clang.1_0</string>
	<key>DTPlatformBuild</key>
	<string>5A11344p</string>
	<key>DTPlatformVersion</key>
	<string>GM</string>
	<key>DTSDKBuild</key>
	<string>13A561</string>
	<key>DTSDKName</key>
	<string></string>
	<key>DTXcode</key>
	<string>0500</string>
	<key>DTXcodeBuild</key>
	<string>5A11344p</string>
	<key>LSApplicationCategoryType</key>
	<string>public.app-category.arcade-games</string>
	<key>LSApplicationSecondaryCategoryType</key>
	<string>public.app-category.simulation-games</string>
	<key>LSHasLocalizedDisplayName</key>
	<true/>
	<key>LSMinimumSystemVersion</key>
	<string>10.8.0</string>
	<key>NSMainNibFile</key>
	<string>My Game Application</string>
	<key>NSPrincipalClass</key>
	<string>NSApplication</string>
	<key>NSSupportsSuddenTermination</key>
	<true/>
</dict>
</plist>

Here is a handy guide to cover the keys above: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW1

And wikipedia will help you locate values for your BuildMachineOSBuild value. Start at: https://en.wikipedia.org/wiki/MacOS#Release_history and look under the “Most Recent Version” column to get a version code.

The version.plist file

Create another file under the Contents folder called: version.plist. Paste in the following and change the string values to what suits your application:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>BuildVersion</key>
	<string>1</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>ProjectName</key>
	<string>My Game Application</string>
	<key>SourceVersion</key>
	<string>1</string>
</dict>
</plist>

Converting structure to an application

Rename the “My Game Application” to “My Game Application.app”

Your icon should appear on the application and it will appear as a single file.

Double click on the Application file to check that the application launches fine.

Creating a disk Image

In order to distribute your game, you'll need to turn the “My Game Application.app” folder structure into a disk image.

  1. Create a folder with the same name as your app, e.g. “My Game Application”, and drag your .app file into it,
  2. Launch the Disk Utility application.
  3. Select File / New / Image from Folder
  4. Select your “My Game Application” folder and click the Open button.
  5. Save as “My Game Application.dmg” and choose read/write as the image format.
  6. Click Save.
  7. Your .dmg file will be created.
  8. Close Disk Utility
  9. Double click on the DMG file to mount it as a Volume.
  10. Double click the “My Game Application” volume to open it. You will see your game application icon inside.
  11. en/tutorials/publishing/preparing_a_macosx_release.txt · Last modified: 2025/09/30 17:26 (9 months ago) by 127.0.0.1