Author Topic: AGS engine Mac OS X port  (Read 113172 times)

Hobbes

  • Swashbuckler
AGS engine Mac OS X port
« Reply #260 on: 25 Sep 2021, 07:50 »
I watched this video on YouTube which seems to indicate there's development happening about this? I don't personally use the Steam AGS plugin so don't know how that would work, sorry!

https://www.youtube.com/watch?v=3AxkhWhSWDI&t=95s

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #261 on: 25 Sep 2021, 10:47 »
There is as of two days ago. The only thing that's troubling me is compiling an ags steam universal library lol.
No more military army stuff. I'm alive and back.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #262 on: 25 Sep 2021, 11:35 »


Stopped the steam related issues. Now it's giving me agsclient related issues.
No more military army stuff. I'm alive and back.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #263 on: 26 Sep 2021, 17:58 »
Took a while but i resolved it.
No more military army stuff. I'm alive and back.

Re: AGS engine Mac OS X port
« Reply #264 on: 02 Feb 2022, 12:36 »
Hi All,

It took me a bit of messing about but I have successfully compiled the latest stable and latest alpha versions of the AGS MacOS Engine.

I have put the precompiled binaries and instructions on how I compiled them on my website so others can hopefully either just download the binaries or follow the instructions to compile for themselves.

I have videos and text instructions on my website https://anthonyirwin.com/adventure-game-studio-ags-macos-build/

Hope this helps people trying to get ags engine up and running on their mac.


Anthony

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #265 on: 02 Feb 2022, 13:09 »
I have videos and text instructions on my website https://anthonyirwin.com/adventure-game-studio-ags-macos-build/

Hello.
There is an outdated information in these instructions, related to using game files:
You do not have to use Windows files, but use files from Compiled/Data instead: these are raw game data without windows engine attached.
Renaming file to ac2game.dat is also not necessary. Older version of the mac port was searching for that file explicitly. Now it should be accepting any filename, iirc, but the convention is to have file called gamename.ags.

This is mentioned in the 3.5.1 readme here:
https://github.com/adventuregamestudio/ags/blob/release-3.5.1/OSX/README.md
« Last Edit: 02 Feb 2022, 13:15 by Crimson Wizard »

CrashPL

  • The dinosaur guy
    • I can help with AGS tutoring
    • I can help with animation
    • I can help with characters
    • I can help with play testing
    • I can help with scripting
    • I can help with translating
    • CrashPL worked on one or more games that won an AGS Award!
    •  
    • CrashPL worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #266 on: 04 Feb 2022, 19:26 »
I have videos and text instructions on my website https://anthonyirwin.com/adventure-game-studio-ags-macos-build/

The information and instructions above are absolutely fine, but here's also some of my own things I've noticed while working on the Steam/GOG Mac version of Zniw Adventure:


* if you wish to quickly (re)build your game *.app bundle, you can use the following script in the build directory with the CMakeList.txt file:

Code: [Select]
export BUILD=release

mkdir build_$BUILD
cd build_$BUILD

cmake -DCMAKE_BUILD_TYPE=$BUILD ..
make

* to have a unique icon of your app bundle, drop an "ags.icns" Mac icon file into the "Resources" folder of your bundle. You can set both the version, name, main executable, and the icon of your bundle by editing the keys of the Info.plist file inside your *.app:



* if you actually wish to sign, notarize and staple your game (in case Apple Thanos-snaps all unsigned apps from existence one day, just like they completely dropped 32-bit apps support), you will need a valid Apple dev ID:

Code: [Select]
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:

Code: [Select]
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:





Re: AGS engine Mac OS X port
« Reply #267 on: 08 Feb 2022, 03:03 »
Thanks to everyone that provided extra details on my post I have updated the website info.

I will save the code signing information so when I get a developer certificate for building apps and code signing I will have the instructions.

I have built the latest versions of ags engine.

3.5.1-patch8 is a universal binary but I have only tested it on an intel machine.
3.6.0-alpha18 is an intel binary. I got errors compiling sdl2 when trying to do a universal build.

The download links are below:
https://anthonyirwin.com/wp-content/uploads/ags-macos-builds/AGS-3.5.1-patch8.app.zip
https://anthonyirwin.com/wp-content/uploads/ags-macos-builds/AGS-3.6.0-alpha18.app.zip

Instructions on how to use this are at https://anthonyirwin.com/adventure-game-studio-ags-macos-build/

For doing the universal build I just used the settings that Xcode gave for automatically updating the build target architectures instead of using what was in the make files provided by ags.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #268 on: 08 Feb 2022, 03:09 »
3.6.0-alpha18 is an intel binary. I got errors compiling sdl2 when trying to do a universal build.

Could you mention which errors did you get? Maybe we should look into this.

Re: AGS engine Mac OS X port
« Reply #269 on: 08 Feb 2022, 03:58 »
The errors occurred on the SLD_cpuinfo.h file.

I am not sure how to export the build errors or find a text version that I can copy and paste into a file.

I have included a screenshot of the errors below.


eri0o

Re: AGS engine Mac OS X port
« Reply #270 on: 08 Feb 2022, 09:15 »
Can you use the regular makefile generator and build with make?

I checked sdl2 source code and no changes suggest changes in these particular flags that are specifically MacOS related as far as I can tell.

To clarify, if this is a bug and not something wrong in the environment it needs to be reported upstream, but I was able to load a Monterrey computer and build with CMake+make, which is why I asked.

I want to add what CrashPL describes up to before the codesign+notarization directly in AGS Editor at some point soon, by I lack an actual Mac computer with M1 to test (they are really really expensive in my country). The codesign+notarization then is left as an exercise for the reader - I mean, we probably could make a tool to just do those commands, erh, maybe.
« Last Edit: 09 Feb 2022, 00:56 by eri0o »