Install sfhx and sfgml libraries from the downloaded package.
To do so, use haxelib's dev command to set paths to both libraries
haxelib dev sfhx <downloaded directory>/sfhx/sfhx-dev haxelib dev sfgml <downloaded directory>/sfgml/sfgml-dev
If you install the package from itch.io app, you can set this to itch subdirectory to have the libraries auto-update.
You can also just copy the sfgml/sfhx directories to Haxe's lib directory (when updating, probably remove the old copies first).
- Add a new extension to your project (right-click on Extensions section) and add a blank GML file to it. The extension and it's file can be named anyhow.
and like so on GMS2
Then switch to Compiler Options tab, and add the following Additional Compiler Options:
And add the folowing to Libraries:
If targetting GMS2, add the following to Directives:
Directives is also where you add your option=value pairs for toggling things from Compiler directives section.
- If not using FlashDevelop, build your project like
haxe -debug -lib sfhx -lib sfgml -cp SourceDirectory -js ExtensionPath._ -main MainClass -dce full
and add any additional -D directives (e.g. -D sfgml-next) in there.
- Upon compiling the Haxe project, the GML extension in the GM project will be updated with new code, and you'll be able to use it's functions.