Some time ago, someone on Reddit (u/HomeStarRunnerTron) posted a comment where he said that you can run 32-Bits Adobe AIR Games on Modern macOS by taking Resources folder and put it on a 64-Bits AIR game, i suggested him to make a guide about it, but it have been 2 months... And also i ended figuring out how to do it without a secondary game or using paid software like Animate, so, i think at this point i could write the guide without problems.
Due to AIR is just "Flash Player with a different name", i think most AIR apps from different Platforms (Like Linux and Windows) could be ported to macOS and vice versa. Also, the latest AIR version is actually a Universal 2 App, so most AIR apps could be ported even to Apple Silicon.
So, actually there are two types of AIR apps:
A common AIR app: An app that requires the user install Adobe AIR Runtime separately, this one could be an .air installation package, or an .app bundle.
Captive runtime bundle: An app that already includes the Adobe AIR Runtime inside, looks like this one only can be obtained as an .app bundle (I think most people would prefer this one).
Actually you can build a Captive Runtime Bundle using ADT from the Adobe AIR SDK, however, that thing is tricky to use for people that never developed apps using AIR, and also, for the thing we are looking, is not really necessary to overcomplicate everything with that, ¡You just need to copy some files and the Game will run!
Porting the App as Captive runtime bundle
Is not really that hard...
- Download the Latest AIR SDK.
- Make sure you have the game installed.
- Copy Template.app from /AIRSDK_MacOS/runtimes/air/mac/Adobe AIR.framework/Versions/1.0/Resources/Template.app to somewhere that's easy to access.
- Do Right-Click -> Show Package Contents, and go to /Template.app/Contents/MacOS/
- Open a new Finder window, but don't close the other one.
- Copy CaptiveAppEntry from /AIRSDK_MacOS/lib/nai/lib/CaptiveAppEntry to the former Finder Window, and Delete "Template" thats inside /Contents/MacOS/
- Copy Adobe AIR.framework from AIRSDK_MacOS/runtimes/air-captive/mac/Adobe AIR.framework/ to /Template.app/Contents/Frameworks/
- IMPORTAN NOTE: ¡Dont confuse /runtimes/air-captive and /runtimes/air folders!
- Now, depending from what platform the game is, the folder that we need could be the next ones:
- On macOS .app the folder should be /Game.app/Contents/Resources/
- On Windows and i think Linux too, should be the game folder itself
- On iOS, should be the root of Game.app
- In any Case the game data folder should contain a "META-INF" folder and a .swf file, if you find it, copy game data folder to /Template.app/Contents/ and rename it to "Resources"
- Open Info.plist and modify the next keys:
- at <key>CFBundleExecutable</key> Replace the <string> with CaptiveAppEntry
- at <key>CFBundleIdentifier</key> Modify the identifier so you prevent possible minimal problems at the Operative System
- Optionally, you can add this, so you can copy a macOS icon to Resources, only add it if you are porting an app from a different platform thats not macOS:
- <key>CFBundleIconFile</key>
- <string>icon.icns</string>
- ¡Now the game is ready! you can just run it and see how it works
- Otherwise, you should try to make a common AIR app
Porting the app as a common AIR app
Is the same as above, but:
- Instead of CaptiveAppEntry you must use ExtendedAppEntryTemplate64 from /AIRSDK_MacOS/runtimes/air/mac/Adobe AIR.framework/Versions/1.0/Resources/ExtendedAppEntryTemplate64
- IMPORTAN NOTE: ¡Dont confuse /runtimes/air-captive and /runtimes/air folders!
- Instead of Adobe AIR.framework from /runtimes/air-captive/ you must use the one from /runtimes/air/
- Remember to use the correct executable name when editing Info.plist
Troubleshooting
Trying an old AIR runtime
Some important update happened at some AIR version where certain apps would not work, so in that case you could try to use an SDK BELOW AIR 33.1.1.758 (all of them can be found HERE), sadly, these old AIR versions are only available as Intel Binaries on Mac.
¡¡My app wont run!!
Did you forgot to replace the "Template" from /Contents/MacOS/ and change the executable name from Info.plist?...
No comments:
Post a Comment