FRESteamWorks allows you to implement SteamWorks API features including achievements, leaderboards, steam input, cloud storage, workshop support and much more in your games built with Adobe AIR on Windows, Mac and Linux.
A brief history of this project's development:
- Ventero initially started this project as a fork of FRESteamWorks by Oldes/Amanita Design
- waveofthought forked Ventero's branch FRESteamWorks by Ventero to create his branch that added 64Bit + expanded API
- RossD20Studios forked waveofthought's branch FRESteamWorks waveofthought to create this branch that adds support for Steam Input API, Native Linux, and newer AIR v50.2.3 thanks to support from Andrew Frost, Jon Dix and Brad Jackson.
For an example of this ANE in action with a Steam Deck Verified and Native Linux support, you can download the free demo of my turn-based tactical card game, Abalon, on Steam.
A working ANE with Steam Input support for Windows/macOS/Linux can be downloaded here.
For a full list of all supported functions, see FRESteamWorks.as. In general, the FRESteamWorks API functions try to be a close representation of the native Steamworks SDK functions.
The Steam API docs can be found here. Steam Input API Documentation can be read here
Note: Steam SDK documentation is not always up-to-date with the latest SDK version, so cross-reference the Steam SDK source code in C++.
- AIR Version 50.2.3
- SteamWorks SDK v1.54 (At this time, newer versions of the SDK are not supported due to added parameters in the authentication methods starting in v1.56)
- Windows 32-bit/x64, MacOS x64/ARM (M1/M2) or Linux x64
Include the ANE in your project like
any normal SWC, add the extension to your application descriptor and include
extendedDesktop
in the list of supported profiles. For an example, see
the application descriptor of the FRESteamWorks test application.
In addition, you will also need to include the corresponding SteamWorks redistributable bin file in your application's root directory. These are found in SteamWorks SDK folder "redistributable_bin"
- Windows 64-bit requires steam_api64.dll (32-bit requires steam.dll)
- Mac OS requires libsteam_api.dylib
- Linux requires libsteam_api.so
For testing the application, I recommend building the AIR application, opening the Steam client, and copying the build you wish to test over the installed version of your Steam client version of your development machine on each respective platform you wish to support.
Building the ANE from the source files is only necessary if you need to modify source code and/or the ANE package is no longer available for downloaded here.
- AIR Version 50.2.3
- SteamWorks SDK v1.54 (At this time, newer versions of the SDK are not supported due to added parameters in the authentication methods starting in v1.56)
- Mac OS Catalina+ (To ensure support for latest Xcode)
- Apple Developer Account (To create the Developer ID Application certificate necessary to sign the ANE to work on Mac)
- Xcode v14+ (To build the Mac version and ensure support for Apple Silicon M1/M2)
- Windows 10+
- Microsoft Visual Studio 2022
- Linux OS / Virtual Machine - x86/64 Version (AIR will not currently compile/run on ARM versions)
The original Ventero project would have you modify build scripts (indicating the relative and/or direct file paths to the necessary dependent source code, such as the AIRSDK and the SteamSDK). However, in practice, I found that each of the respective projects (Visual Studio, Xcode) still required several direct file path dependencies. To make this process easier and avoid the trouble of finding and replacing all of these dependent file paths, I’ve coded the project to use fixed filepaths.
To build the ANE, you will need to compile the respective native source files for each platform you wish to target (Windows, Mac, Linux) using a machine that includes this native operating system or virtual operating system for that platform. Then, you will need to package the native compiled files into a ZIP file with extension ANE. We will complete this last step on the MacOS.
- Ensure FRESteamWorks project folder is located in your username home folder (ex: Users/userName/FRESteamWorks) so that relative file paths in the Xcode project will find dependent source files
- Create an SDKS folder in your username home folder (ex: Users/userName/SDKS)
- Inside the SDKS folder, copy your AIRSDK and SteamSDK and ensure the folder names are labeled as this exactly.
- Inside the root of SDKS\AIRSDK folder, you should see the actual AIRSDK folders (ex: ant, asdoc, aftools, etc.) and not a nested version of the current AIR version.
- Inside the root of your SDKS\SteamSDK, you should see the actual SteamSDK folders (ex: glmgr, public, redistributable_bin, etc.)
- Proceed to building Windows DLLs and Linux SO, we’ll need the output files before we build the MacOS files and assemble the ANE
- Create an SDKS folder at C:\SDKS
- Inside the C:\SDKS folder, copy your AIRSDK and SteamSDK and ensure the folder names are labeled as this exactly.
- Inside the root of your C:\SDKS\AIRSDK folder, you should see the actual AIRSDK folders (ex: ant, asdoc, aftools, etc.) and not a nested version of the current AIR version.
- Inside the root of your C:\SDKS\SteamSDK, you should see the actual SteamSDK folders (ex: glmgr, public, redistributable_bin, etc.)
- Navigate to your FRESteamWorks\src folder and open FRESteamWorks.vcxproj with Microsoft Visual Studio 2022
- In the two drop down menus at the top (just below the Build / Debug menu headers) set the first drop down menu to “Release” and the second drop down menu to “x64”. Then, select Build -> Build Solution (Ctrl + Shift + B). Note: The Build will fail here unless java environment variables are configured, but that’s OK. It will still output the FRESteamWorks-64.dll file to FRESteamworks/src/Release/FRESteamWorks-64.dll, and that’s all you need for 64-bit Windows.
- Change the second drop down selection from x64 to Win32 and select Build -> Build Solution again to compile the 32-bit Windows version. This will output the file FRESteamworks/src/Release/FRESteamWorks.dll.
- Copy FRESteamworks/src/Release/FRESteamWorks-64.dll and FRESteamworks/src/Release/FRESteamWorks.dll to the FRESteamWorks/lib/bin folder on your Mac OS.
- Ensure the root of your FRESteamWorks project on Linux is located at Home\FRESteamWorks
- Create an SDKS folder at Home\SDKS
- Inside the SDKS folder, copy your AIRSDK and SteamSDK and ensure the folder names are labeled as this exactly.
- Inside the root of your SDKS\AIRSDK folder, you should see the actual AIRSDK folders (ex: ant, asdoc, aftools, etc.) and not a nested version of the current AIR version.
- Inside the root of your SDKS\SteamSDK, you should see the actual SteamSDK folders (ex: glmgr, public, redistributable_bin, etc.)
- Navigate to FRESteamWorks\src where the MakeFile is located and right click to open this location in the terminal
- Type “make” (no quotes). If this fails, you may need to install g++. To do so, type “Sudo apt install g++” (no quotes)
- The make command will create a new file in FRESteamWorks\src\FRESteamWorks\ called “FRESteamWorks.so”. Copy this file to the FRESteamWorks/lib/bin folder on your Mac OS.
- Create a Developer ID Application certificate in your Apple Developer Account under Certificates. This type of certificate is used to code sign your app for distribution outside the Mac App Store. Once you’ve created the certificate, download it, then double click it to add it to your KeyChain.
- Navigate to FRESteamWorks/src and open the FRESteamWorks.xcodeproj in Xcode
- In the left navigational menu of Xcode, ensure the “folder” icon is selected and then select the FRESteamWorks project which will have a generic App icon to its left. This will take you to the Build Settings tab. Here, in the “Signing” section, you will need to select Developer ID Application. Select Code Signing Style -> Manual. And also ensure your development team is selected in the third drop down. No provisioning file is required.
- From the upper task bar menu, select Project -> Build
- If you are prompted to enter a password to use the certificate from your keychain, do so. Important Note: After doing so, you will need to run the build a second time, even if it succeeded, to ensure that the build is properly code signed. I made this mistake many times thinking the build had worked, only to discover later that the ANE wouldn’t run on Mac because it hand’t actually signed it properly. To avoid requiring password in the future, you can check the “Always allow” option, but still run the build process a second time after doing so. And, always test that your ANE works by running it on your local machine before uploading to Steam.
- Running the build process will create the completed ANE at Users/userName/FRESteamWorks/lib/bin/FRESteamWorks.ane as well as an unpacked folder called FRESteamWorks.Unpacked.ane where you can see structure of what the ANE looks like. Inside this, you should see a folder for Linux-x86-64 containing your FRESteamWorks.so, a MacOS-x86-64 containing FRESteamWorks.framework, a Windows x86 folder containing FRESteamWorks.dll and a Windows-x86-64 containing FRESteamWorks-64.dll. Each folder also contains a library.swf. Note: Ensure that the file size of these files is greater than zero, otherwise, you may have forgotten to copy the files created in the prior steps to your bin folder. The MacOS build process will create placeholders if these files are missing with a 0KB size.
For more details, please see the contributing guide.
See LICENSE.