AGS engine Mac OS X port

Started by JanetC, Mon 10/12/2012 19:12:16

Previous topic - Next topic

Hobbes

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

There is as of two days ago. The only thing that's troubling me is compiling an ags steam universal library lol.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Dualnames



Stopped the steam related issues. Now it's giving me agsclient related issues.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Dualnames

Took a while but i resolved it.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

anthonyirwin82

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

#265
Quote from: anthonyirwin82 on Wed 02/02/2022 12:36:46
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

CrashPL

Quote from: anthonyirwin82 on Wed 02/02/2022 12:36:46
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: ags
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: ags

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: ags

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:





anthonyirwin82

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

Quote from: anthonyirwin82 on Tue 08/02/2022 03:03:11
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.

anthonyirwin82

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

#270
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.

Amir

#271
Hi, is it possible to create a mac version of my game on Windows?

Edit: Forget the question. My friend will use Wine.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

Hey, if some macOS dev keeps tabs with here, I am updating the Xcode project files for macOS in this pull request here.

It would be really useful if someone could run this in their machine and check if the steps added in README make sense and if they could review my changes as I am not familiar with Xcode. Thanks!

eri0o

#273
I added also instructions on how to build AGS using only the Makefile and handling dependencies through Homebrew. I adjusted the Makefile. This is intended only for locally running games, and not for porting (use either the CMake or Xcode build systems for that).

Updated the macOS port README here.

eri0o

I noticed in the previous posts on the signing topic it mentions the altool, but it's been deprecated in favour of the notarytool - more info in here. I may have an additional update to the macOS instructions to include a minimal guide on signing and notarization for app releases.

aKro

Hello everyone,
Thanks a lot to Anthony Irwin for building this Mac version, from what I saw so far, it work very well.
I just have a little problem with a game (Maniac Mansion Deluxe) that use AGSflashlight.dll, the game works fine except in rooms that should be dark.
Is anyone aware of a solution to fix that ?
Is it even possible without modifying the game ?
As LucasFanGames seems to not exist anymore.

Snarky

I don't think so. I believe someone would have to make a Mac/Linux version of the plugin, and even then you might have to rebuild the game to link it properly with the new plugin.

Crimson Wizard

Quote from: Snarky on Wed 14/06/2023 22:14:59I don't think so. I believe someone would have to make a Mac/Linux version of the plugin, and even then you might have to rebuild the game to link it properly with the new plugin.

Flashlight plugin have been rewritten many years ago by JJS, as a part of the initial engine ports. It is present in our repository: https://github.com/adventuregamestudio/ags/tree/master/Plugins
It's kept 100% script compatible, because it's used to run old games. It may not be 100% precise in behavior though, and I've never tested it myself.

The plugin may either be built standalone (*.dylib), or integrated with the engine if particular compilation flag is used (BUILTIN_PLUGINS).

It's possible to find out whether plugin is used at all at runtime, if you run the engine with "--log-stdout=main:all", it will print its attempt to hook up plugins or use built-in functions.

eri0o

@aKro can you link the specific game you are having issue, with a way to download it

aKro

#279
Thank you for your quick answers.

You can download my Mac version here :
http://hahd.fr/sub/ManiacMansionDeluxe.app.zip

And the Windows version here :
https://archive.org/details/Maniac_Mansion_Deluxe_14

Rooms that should be dark are for example, on the second floor, first door after passing thru the reinforced door or the basement.

SMF spam blocked by CleanTalk