Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Manu

#41
Quote from: Hobbes on Fri 02/07/2021 00:11:52
Hi Manu, would it be OK if I added this to the AGS Wiki? It would be a great resource for people to keep an eye on. And then if the procedure changes, we can always update the wiki page.
Thanks for doing this!
Yes of course! Feel free to copy it, or if I have access to the wiki I can do it.

Quote from: Hobbes on Fri 02/07/2021 00:11:52
It works a treat by the way! I just compiled my game from scratch using the latest AGS version source code. I imagine this is how the wrapper is also created?
I'm not sure if it's created with Xcode or CMake, but I think the result is the same. Basically you are creating your "wrapper" in this way (if this is the right term). In fact, you can replace the files inside Resources, change the icon and rename it, and use it for another game.
#42
This is a small guide for all the people that would like to compile AGS and create a macOS version of their AGS game starting from scratch. I'm posting this guide here, but if you think it should be somewhere else, let me know.

Consider that the easiest solution to create a mac OS version of your game is to use the pre-made wrapper created by TheVolumeRemote: https://www.adventuregamestudio.co.uk/forums/index.php?topic=47264.msg636631416#msg636631416
With this wrapper, you can simply copy your game assets into the Resources folder, and it's done.

But if you want, you can do it from scratch following the small guide below. The main advantage is that as soon as there is a new version of AGS, e.g., 3.5.1.8, you can build your game with the latest version of the engine without waiting for the new wrapper.

It's pretty easy if you have some familiarity with the Mac terminal. And you don't need to install 50GB of XCode, just CMake. See details in the spoiler below.

Spoiler

PRE-REQUISITES


  • Download and Install CMake
    Download CMake from https://cmake.org/download/ - Choose "macOS 10.13 or later"
    Copy the app to your Applications folder. Launch it.
    Now open the Mac Terminal and type:
    PATH="/Applications/CMake.app/Contents/bin":"$PATH"


  • Download and Install Xcode Command Line Tools
    (not Xcode, just the command line tools).
    Go here: https://developer.apple.com/download/all/?q=command%20line and choose a version, for example "Command Line Tools for Xcode 12.5.1"
    Download the dmg and install it (unless you already have it, of course).

  • Download a free app called Image2Icon
    You will find it here https://img2icnsapp.com or on the Mac App Store.

NOW BUILD THE AGS APP:

  • Download the latest version of the AGS source code.
    Go here: https://github.com/adventuregamestudio/ags/releases
    and download the file "Source Code (zip)"


  • Unzip the archive somewhere (for example /Users/yourname/src/)
    You will obtain a folder like this:
    /Users/yourname/src/ags-v.3.5.1.8

  • Copy the game resources:
    Delete all the files inside this folder "/Users/yourname/src/ags-v.3.5.1.8/OSX/Resources/"
    Go to the Compiled/Data directory of your AGS game, and copy all the files you find there, to the folder you have emptied  "/Users/yourname/src/ags-v.3.5.1.8/OSX/Resources/"


  • Create the game icon
    Open Image2Icon, drag and drop a square image representing your game icon into the app, and choose "Export -> ICNS.
    Call the file "ags.icns". Copy this file into "/Users/yourname/src/ags-v.3.5.1.8/OSX/Resources/"

  • Build the game
    in the terminal, enter the OSX folder:
    "cd /Users/yourname/src/ags-v.3.5.1.8/OSX/"

    then type:
    cmake -DCMAKE_BUILD_TYPE=Release ..

    this will take a while. Once it's done, type:
    make

Final steps


  • If everything went well, you will have in the OSX folder a new app, called AGS.app
    rename it with "mv AGS.app MyGame.app" (where "MyGame" is the name of your game, better not to use spaces)

  • Enter MyGame.app/Contents/ and search for a file called Info.plist.
    Edit it with a text editor, like Sublime text, and change a few lines,
    CFBundleIdentifier = invent a unique id, for example: com.myname.mygame
    CFBundleName = My Game
    you can also change CFBundleVersion to add your game version and NSHumanReadableCopyright to specify the copyright.

  • Try the game.
    The game app (eg. MyGame.app) is inside the OSX folder. I suggest you zip it so that you are sure you will always keep the original version.
    Then drag and drop MyGame.app somewhere else (eg. Desktop).
    Double click the app to launch it.

DISTRIBUTING THE APP
You can simply upload to itch.io the ZIP file you created before.
Unfortunately, unless you are enrolled in the Apple Developer Program (99 eur/year) you won't be able to sign the app. This means when you distribute your game, people will receive several warnings.

You should instruct your users to do this:

  • download the zip file
  • extract the zip file and move the .app to Applications
  • right-click the game icon in Applications and select Open. It will open a window with some buttons. If there is no "open" button, close the window, don't do anything.
  • right click again on the game icon. This time you will see an open button.

In case I decide to pay for the Apple Developer program I will let you know how to sign the app :)
[close]
#43
Quote from: Crimson Wizard on Wed 23/06/2021 13:33:08
I think mac port should write a log? If you enable logging in config file, or from command line (if you can run this port from cmd line on your mac), then you may know more information on what is happening.


Posting this here for completeness even if we spoke on Discord.

The crash was generated by System.SaveConfigToFile() which is in fact an API available only on 3.5.1, while I was using the Mac "wrapper" created by TheVolumeRemote with version 3.5.0 (downloaded here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=47264.msg636631416#msg636631416).

In the meantime, I learned how to compile the game on Mac with the latest version of AGS starting from the source code. I will post a step-by-step guide soon, it's quite easy in the end.


#44
Quote from: bx83 on Thu 17/06/2021 14:37:25
emabolo, TheVolumeRemote should generate a new wrapper for 3.5.1, or produce a tutorial on how to compile the 3.5.1 code into a Mac engine so I no longer have to bother him by proxy, HINT HINT HINT ;P

I have no desire to install Xcode, it's too much for my Mac, it will probably destroy it :)
I'll be waiting for the new wrapper, thanks a lot to the developers!
#45
I just refreshed my Mac wrapper with a new version of the game, just copying the .exe and the .tra and renaming the exe "game.ags". Unfortunately, the app does not even open. I can see the icon on the dock, and it shuts down immediately. If I put the old game back, it's working. Is it possible that the wrapper 3.5.0 is not compatible with AGS 3.5.1 ? If not, what else could be the reason?
#46
Quote from: Potajito on Wed 26/05/2021 14:55:27
As a side note, if you use itch.io's butler (the command line software to push builds), you can add the flag --fix-permissions (both for max and linux) so you don't have to do that manually.

I didn't know about the butler. I'm definitely going to use itl! Thank you!
#47
Quote from: eri0o on Wed 26/05/2021 00:11:28
I imagine things downloaded from the internet after Catalina gets tagged as insecure by the OS, so I it would require both code signing and notarization to run. But the SO answers says a bunch of different things: https://stackoverflow.com/questions/64842819/cant-run-app-because-of-permission-in-big-sur/64895860#64895860

So apparently it was a problem of permissions. I solved it with
Code: ags
 chmod -R 755 NameofGame.app 

After that, I was able to launch the game, after the usual warning about insecure source.
thanks!
#48
Hello! I used the AGS Mac Wrapper 3.5. I added all the files of my game into the Resources folder, I also renamed the app and changed the icon. The game worked perfectly. Then I zipped it and send it to my friend but he could not open the app, he saw an error message "you don't have permission to open this app". I tried to download the zip and this happened to me too. I also tried the usual Ctrl+Click to open it, but it's the same. There is no way to launch the game if it's downloaded.
Do you know if it's possible to fix this? Thanks a lot!
#49
I just tested it and it works perfectly! Thank you!
I have one question regarding the config file. After I run the game once, I modified the file acsetup.cfg in the Resources folder, to switch from fullscreen to windowed mode. But the change didn't produce any effect. Is the config file saved in the user directory and the default config is ignored the second time you run the game, like the Windows version?. If this is the case, where is the config file saved?

And another question. Can I rename AGS.app to mygame.app? Or this will break something?

Thanks a lot!
SMF spam blocked by CleanTalk