Building


Patience is required: Currently SquirrelJME is in active development and although it can run and produce binaries, there are limitations to consider. Currently only a limited set of programs may be ran on SquirrelJME.


SquirrelJME requires the following before it can be built:

Notes on Running

SquirrelJME uses a simplified error system which starts with a two capital letter prefix followed by two digits and letters.

Installing Java

SquirrelJME requires a Java 8 virtual machine in order to build itself. Gradle is used as well however it is available through Gradle Wrapper.

AdoptOpenJDK (Windows, Linux, and Mac OS X)

AdoptOpenJDK is the recommended way to build and setup SquirrelJME as it has long-term support and is easy to setup. You will need at least a Java 8 variant of AdoptOpenJDK.

Please note that Java 11 may be used as well.

Oracle's JDK (Windows, Linux, and Mac OS X)

Oracle's JDK supports modern systems and can be downloaded from:

Ensure that you download and install the JDK.

If running on ReactOS/Windows/Wine, make sure that the PATH environment variables refers to the JDK's binary directory:

Common Linux Distributions

If you use a common and popular Linux distribution it likely has a JDK available.

IntelliJ IDEA (Optional)

SquirrelJME is developed on IntelliJ Ultimate, however Community Edition may still be used. This makes development easier and more integrated along with whatever code you write or contribute will match the style that is set in SquirrelJME.

Installing C++ Compiler

Common Linux Distributions

For the C++ Compiler which is needed for testing:

Windows

For Gradle to detect a C++ compiler, it needs either Microsoft Visual Studio or a GCC installation via Cygwin, or a GCC installation via Mingw-w64.

More information is located at https://docs.gradle.org/current/userguide/building_cpp_projects.html#windows.

Microsoft Visual Studio

Microsoft's Visual Studio may be used by Gradle to compile the code, note that it only uses the compiler tool from the installation (no GUI is needed).

Mingw-w64

You can use Mingw-w64 as well, it is a freely available compiler.

Cygwin

You can also download Cygwin at: https://www.cygwin.com/.

Mac OS X

You must install XCode, more information on XCode is at https://developer.apple.com/xcode/. Alternatively there is a command line tool to install the XCode command line utilities for example if you are using Brew:

Build Environment

The main interaction with the SquirrelJME build environment is with Gradle which manages anything related to building and testing. All builds are performed through Gradle Wrapper which is used as the following:

Gradle uses tasks of which multiple may be specified accordingly, such as running the tests within the repository:

RetroArch

Building for RetroArch uses the makefilelibretro makefile. As such building SquirrelJME for your current system involves using the alternative makefile.

Docker

In the root directory, execute the command:

This will create an image that you will be able to use to execute one of the built-in virtual machines.

Development Virtual Machines

For development purposes you may use the virtual machines provided by the SquirrelJME run-time. Modules within SquirrelJME have tasks which allow them to be ran accordingly.

Note that the test task is not supported and will throw an exception, it is not able to reliably test within SquirrelJME.

The following System properties are available:

Building ROMs

Full ROMs can be built with the following tasks, note that test ROMs contain all the testing libraries and are generally used to ensure things are working:

Full Suite Virtual Machines

There is a task which initializes a full suite of SquirrelJME, including every module. This can be used to run a specific program within SquirrelJME's environment through Gradle.

There are system properties that are available and can be used to modify the behavior: