Please Note
I compiled these AGS MacOS Engine binaries for my own personal use and releasing them to the general public because many people do not have the technical skills or desire to compile them for themselves. I can not offer support for this other then the instructions on this page.
Text Instructions Below Have Newer Information Then The Video
Please Note: This was built on MacOS Monterey 12.2 on an Intel 64bit machine. The app has not been code signed or notarized with Apple so you will get warnings preventing you opening the app.
To run this app disable gatekeeper on the app by running the following command in the terminal:
xattr -dr com.apple.quarantine /path/to/ags-<version>.app
POWER USERS ONLY: You can permanently disable gatekeeper for all applications. This should only be done if you are a power user and know what you are doing as you can accidentally run malicious applications without having Apples built in protection for average users.
To permanently disable gatekeeper for all applications run the command below in the terminal:
sudo spctl --master-disable or sudo spctl --global-disable (depending on MacOS version)
How to play Windows exe or AGS Data Game files using the MacOS AGS App Bundle:
- Copy the windows game files or the AGS game data files to the clipboard.
- In the finder highlight the ‘ags-<version>.app’ file then right click the application then click ‘Show package contents’.
- Go into the ‘Contents’ folder.
- Go into the ‘Resources’ folder.
- Paste the Windows game files or AGS game data files into the ‘Resources’ folder.
- Rename the Windows AGS ‘<game name>.exe’ file to be ‘<game_name>.ags’. (for your own games that you have compiled you can used the ‘Compiled/Data’ files instead of using the windows engine .exe file)
- Click back in finder until you are at the ‘ags-<version>.app’ file.
- Rename the ‘ags-<version>.app’ file to be ‘<game name>.app’.
- You should now be able to open and run the ‘<game name>.app’ ags game. If MacOS throws any errors then make sure that you have disabled gatekeeper protection on the file as shown below the download buttons above.
Please Note
I compiled these AGS MacOS Engine binaries for my own personal use and documented the process to help others that may want to do the same. I can not offer support for this other then the instructions on this page.
How To Compile Adventure Game Studio AGS MacOS Engine
Text Instructions Below Have Newer Information Then The Video
- Go to https://github.com/adventuregamestudio/ags/releases and download the source code for the version you want to build.
- Download and install Xcode from the Apple App Store if you do not have Xcode installed on your computer.
- Go to https://brew.sh and install homebrew if you don’t already have it installed.
- Open a terminal window and type the following command ‘brew install cmake’ this will install cmake onto your computer or update it if it is out of date.
- In the terminal type ‘cd /path/to/ags/source/code’.
- In the terminal type ‘mkdir build && cd build’.
- In the terminal type ‘cmake -G Xcode ..’. This will take some time and when it is finished you will have an Xcode build file that is configured for your computer setup.
- In finder go to the ‘</path/to/ags/source/code>/build’ folder.
- Open the ‘AGS.xcodeproj’ file in xcode by double clicking it.
- In Xcode click the ‘Product’ menu then go down to the ‘Scheme’ menu then click ‘ALL_BUILD’. This will tell Xcode to build everything needed for the AGS MacOS Engine.
- In Xcode at the top menu bar in the middle change ‘ALL_BUILD > My Mac’ to ‘ALL_BUILD > Any Mac’.
- In Xcode click the ‘Product’ menu then click the ‘Build’ option. When this builds successfully you will have the ags engine for MacOS as a standalone file and as an application bundle.
- In finder go to the ‘</path/to/ags/source/code>/build/Debug’ folder. In this folder you will see the ags standalone file and the AGS.app bundle file.
- Copy the ags standalone file or AGS.app and paste it into the folder with the ags game files.
- Follow the instructions above named ‘How to play Windows exe or AGS Data Game files using the MacOS AGS App Bundle’ to setup the AGS.app application bundle to run the ags game files.
Information for releasing you own game with code signing and notarization
for releasing your own games that you have compiled you can used the ‘Compiled/Data’ files instead of using the windows engine .exe file in the resources folder of the app bundle.
You should also change the ags.icns in the resources folder of the app bundle to be the icon for your game.
You should also change the Executable File, Get Info String, Bundle identifier, Bundle name, Bundle version and Copyright fields in the Info.plist file that is in the app bundle.
![info.plist file in ags app bundle](https://ftp.anthonyirwin.com/wp-content/uploads/2022/02/ags-info.plist_-768x526.png)
To code sign and notarize your app do the following:
codesign --force -v --sign "Your developer ID (your provider ID)" --options runtime --entitlements Entitlements.plist GameName.app
ditto -c -k --sequesterRsrc --keepParent *app yourGame.zip
xcrun altool --notarize-app --primary-bundle-id "your.bundle.id" --username your@email.com --password AppleOneTimePasswordHere --asc-provider YourProviderID --file yourGame.zip
After the notarization’s done, you can verify your game, and staple it for offline use:
codesign --verify --verbose=4 YourGame.app spctl --verbose=4 --assess --type execute YourGame.app spctl -a -v YourGame.app xcrun stapler staple -v YourGame.app stapler validate YourGame.app
Additionally, if you do any changes to your game bundle (like a little patch, update, even a small change in the Resources directory), you need to re-sign and re-notarize it again.
* if you wish to locally test your debug build with Steam/GOG dylibs, you need proper entitlements in your Entitlements.plist file (the one you use to sign the app), otherwise your game will crash and burn while trying to access Galaxy/Steam shared libs:
![](https://ftp.anthonyirwin.com/wp-content/uploads/2022/02/Entitlements.plist_-768x173.png)
export BUILD=release
mkdir build_$BUILD
cd build_$BUILD
cmake -DCMAKE_BUILD_TYPE=$BUILD ..
make
If you have any issues getting this working then you should check out the Adventure Game Studio forum which has answers to most questions.
The forum post for the MacOS port of the AGS engine is https://www.adventuregamestudio.co.uk/forums/index.php?topic=47264.260