NOTE Building executables via command line requires you to have logged in to the IDE.
In addition to building your project through the IDE, GameMaker allows you to build your projects through a command-line interface using the many options and commands described below. You can use this to build your project, test it and deploy it to multiple platforms by running one batch file, and to set up continuous integration through an automation server such as Jenkins.
This is done by running the Igor.exe executable present within your runtime folder and passing in the options and commands listed on this page.
By default, Igor can be found in:
NOTE You must have logged into the IDE with your account at least once before attempting command line building.
To set up CI building on a machine, you will need to do the following:
Here are the options that you can use while running the Igor executable:
Option | Description |
---|---|
/lf=[licence_plist_file] | The full path to the licence file, either from the IDE or from the Access Key service To retrieve the licence from the IDE, the paths are as follows: Windows: %appdata%\GameMakerStudio2\<user_name>_<number>\licence.plist macOS: ~/.config/GameMakerStudio2/<user_name>_<number>/licence.plist |
/uf=[user_folder] | The user folder used for retrieving licence information, alternative to /lf On Windows, this will be: %appdata%\GameMakerStudio2\<user_name>_<number> On macOS, this will be: ~/.config/GameMakerStudio2/<user_name>_<number> |
/rp=[runtime_root] | The root folder of the runtime |
/project=[project_YYP_file] | The full path to the project's .yyp file |
/cache=[cache_dir_path] | The cache directory to use (defaults to \cache in the current directory) |
/temp=[temp_dir_path] | The temporary directory to use (defaults to c:\temp) |
/of=[output_filename] | The filename of the output executable without the extension, e.g. C:/output/game, which would output the executable at C:/output/game.zip (or a different file format depending on the platform) If this is not specified, a directory named output will be created in the same directory as the .bat file (or where the command is running from), containing the extracted build files |
/tf=[target_file] | The actual file name of the ZIP file or NSIS installer that is created |
/config=[configName] | The name of the configuration to use (defaults to Default) |
/runtime=YYC|VM | The output type (either YYC or VM), defaults to VM |
/j=[NumCPUs] | The number of CPUs to use during the build process |
/df=[devices_json_file] | The path to your devices.json file, required when building to other devices. On Windows, this will be: %appdata%\GameMakerStudio2\<user_name>_<number>\devices.json On macOS, this will be: ~/.config/GameMakerStudio2/<user_name>_<number>/devices.json |
/device=[device_name_from_IDE] | The name of the target device to build to, as set up in the IDE |
/launch | Launch the executable on the target device after building; same as the "Create Executable and Launch" option in the IDE |
The /lf option requires a path to your licence.plist file, which can be retrieved from your GameMaker installation after you've logged into the IDE, as described in the table above.
However, if you don't have access to an IDE installation, you can request an access key from the GameMaker website, and generate a licence.plist file from it.
Here is a step-by-step example for running a game on Windows:
Below you can find examples of build commands for all platforms:
Cleaning GX.games project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- OperaGX Clean
Running GX.games:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- OperaGX Run
Cleaning Windows project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- Windows Clean
Building VM for Windows -- Run, PackageZip and PackageNsis:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- Windows Run
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] -- Windows PackageZip
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] -- Windows PackageNsis
Building YYC for Windows-- Run, PackageZip and PackageNsis:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /runtime=YYC -- Windows Run
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC -- Windows PackageZip
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC -- Windows PackageNsis
IMPORTANT On Mac you will need to use mono to run Igor, so you will need to write mono before all your commands, e.g.: mono Igor.exe [options]
Cleaning macOS project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- Mac Clean
Building VM for macOS while on a Mac:
NOTE Use PackageZip to build a ZIP file, and PackageDMG to build a DMG. These examples use PackageZip.
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] -- Mac PackageZip
Building VM for macOS while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- Mac PackageZip
Building YYC for macOS while on a Mac:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC -- Mac PackageZip
Building YYC for macOS while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- Mac PackageZip
Cleaning Linux project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- Linux Clean
Building VM for Linux while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- Linux Package
Building YYC for Linux while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- Linux Package
Cleaning HTML5 project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- HTML5 Clean
Building HTML5 folder (make sure to specify a target folder with /tf):
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_folder] -- HTML5 folder
Building VM for iOS while on a Mac:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] -- ios Package
Building VM for iOS while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- ios Package
Building YYC for iOS while on a Mac:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC -- ios Package
Building YYC for iOS while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- ios Package
Cleaning Android project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- Windows Clean
Building an Android APK using VM:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] -- Android Package
Building an Android APK using YYC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC -- Android Package
Cleaning tvOS project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- tvos Clean
Building VM for tvOS while on a Mac:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] -- tvos Package
Building VM for tvOS while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- tvos Package
Building YYC for tvOS while on a Mac:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC -- tvos Package
Building YYC for tvOS while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- tvos Package
Cleaning PS4 project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- ps4 Clean
Building VM for PS4 while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- ps4 Package
Building YYC for PS4 while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- ps4 Package
Cleaning PS5 project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- ps5 Clean
Building VM for PS5 while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- ps5 Package
Building YYC for PS5 while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- ps5 Package
Cleaning Xbox One project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- XBoxOne Clean
Building VM for Xbox One while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- XBoxOne Package
Building YYC for Xbox One while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- XBoxOne Package
Xbox Series X/SXbox Series X/S
Cleaning Xbox Series X/S project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- XBoxOneSeriesXS Clean
Building VM for Xbox Series X/S:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- XBoxOneSeriesXS Package
Building YYC for Xbox Series X/S:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- XBoxOneSeriesXS Package
Cleaning Switch project:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] -- Switch Clean
Building VM for Switch while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /device=[device_IDE_Name] -- Switch Package
Building VM for YYC while on a PC:
Igor.exe /uf=[user_folder] /rp=[runtime_path] /project=[project_YYP_file] /cache=[cache_dir_path] /temp=[temp_dir_path] /of=[output_filename] /tf=[target_file] /runtime=YYC /device=[device_IDE_Name] -- Switch Package
Here are the options that can be used with the Igor runtime:
Option | Description |
---|---|
/uf=[user_folder] | Set the user folder used for retrieving licence information so GameMaker knows which modules can be installed |
/lf=[license_file] | Set the direct path to a licence file, can be used as an alternative to setting a user folder (/uf) |
/ru=[runtime_url] | Set the URL to fetch runtime information from (defaults to the stable release) |
/rp=[runtime_root] | Set the local runtime install folder to list the installed runtimes or install new runtimes |
Here are the commands that can be used with the Igor runtime:
Igor.exe [command]
Command | Description |
---|---|
Runtime List | Lists the runtimes available on a feed (version number, date/time of build) |
Runtime ListInstalled [-directory] | Lists the runtimes available in the current folder (directory=full path to the folder) You can specify a directory to look in, but if it's not specified it will default to the current directory This also checks whether there is a receipt.json file and a manifest folder inside the directory (making sure that it's actually a runtime) |
Runtime Info [-version] | Prints out information about the most recent runtime on the given feed; also needs a licence file to show information regarding the modules available for the user version can either by a string used to search through the feed titles (e.g.: "739" would show information for all builds containing 739 in their version numbers), or it can be all to show information for all feeds It will list the modules with the .zip file names for each module |
Runtime Install [-version] | Installs the latest runtime from the given feed using the given version as a search filter; if that is not specified, it defaults to the latest version. It will get all the modules that the user has on their licence. |
Runtime Verify [-folder=.] | Calculates the checksums for all the installed files and compares them to the checksums written into the manifest folder. You can specify a folder to check, however if that is not specified it will default to the current directory. This will flag any files where the checksums don't match, files that are missing and files that should not be there. Do note that the manifest files themselves are not verified and a user can alter the manifest files to match the installed ones. |
Runtime FetchLicences [-ak] [-of] | Generates a licence.plist file (-of) from an access key (-ak), see Access Key |
Here are the options that can be used for testing your builds with Igor:
Option | Description |
---|---|
/uf=[user_folder] | Set the user folder used for retrieving licence information so GameMaker knows which modules can be installed |
/lf=[license_file] | Set a direct path to a licence file, can be used as an alternative to setting a user folder (/uf) |
/df=[device_file] | Set a direct path to a devices.json file, can be used as an alternative to setting a user folder (/uf) |
/timeout=[number_of_seconds_to_wait] | The timeout to use for the test in seconds, defaults to 120 seconds; the test will be stopped after this timeout is over and will be marked as failed |
/waittime=[number_of_seconds_to_wait] | Number of seconds to wait in the main loop before declaring the test as passed, defaults to 30 seconds |
/device=[device_name] | Used to look up the device name in the user folder's devices.json file |
/target=[list_of_targets] | Comma-separated list of targets in the PLATFORM|DEVICE format, e.g.: /target="Windows|Local,HTML|Firefox" If you specify all, the tests will attempt to run for every device in the devices.json file |
There is one command that you can use to run tests with Igor:
Igor.exe Tests RunTests [test_directory/test_filename]
You must specify either a test directory or a test file name.
The tests.json file must have the following format:
Here is an example of a tests.json file:
[
{
"name" : "Game Idea Windows",
"path" : "C:/scratch/GameIdea.yyz",
"platform" : "Windows",
"command" : "Run",
"timeout" : "500",
"waittime" : "30"
},
{
"name" : "Platformer Game Windows",
"path" : "C:/Users/<MY USERNAME>/Documents/GameMakerStudio2/Platformer Game/PlatformerGame.yyp",
"target" : "Windows|Local,HTML5|selenium:firefox,PS4|Default",
"command" : "Run"
},
{
"name" : "Puzzle Game Windows",
"path" : "C:/Users/<MY USERNAME>/Documents/GameMakerStudio2/Puzzle Game/PuzzleGame.yyp",
"platform" : "HTML5",
"command" : "Run",
"device" : "selenium:chrome"
}
]