Compiling (Visual Studio Code)
- Open the root polyphase folder in VsCode (where this README is located).
- Install the C/C++ Extension Pack.
- Run the Polyphase Editor config (click the Run and Debug tab on the left, then in the drop down where the green Play button is, select
Polyphase Editor).
Compiling (Terminal)
- From the project's root directory (where this README is located)
cd Standalone - Run
make -f Makefile_Linux_Editor - Go back to the root directory
cd .. - Run
Standalone/Build/Linux/PolyphaseEditor.elfIt's important that the working directory is the root directory where the Engine and Standalone folders are located.
Packaging
- When packaging for any platform on a Windows machine, you will likely need to install Msys2 so that linux commands can be executed. This comes packaged along with devkitPro libraries, so you if you install the devkitPro libraries, you shouldn't need to worry about this.
- Packaging for Android requires installing Android Studio (Last tested with Android Studio 2022.2.1 Patch 2) with the following tools installed via the SDK Manager:
- Android SDK Build Tools: 34.0.0
- Android NDK (Side by side): 25.2.9519653
- CMake: 3.22.1
CMake Support
CMake support is currently a work-in-progress, and only Linux support has been implemented and tested. If you want to try building with CMake, here are some tips:
- Make sure you pull all submodules
git submodule update --init --recursive - Install pkg-config
sudo apt install pkg-config(debian/ubuntu), ` - Install vorbis dev libraries
sudo apt install libvorbis-dev
Docker
Polyphase includes a Docker build system for reproducible builds across all supported platforms. You can also use the Docker system to build Polyphase itself from source without installing any dependencies on your host machine. You can get more information about using the Docker build system at Documentation/Docker.md.
Requirements
- Install Docker from https://docs.docker.com/get-docker/
Build the Polyphase Docker Image
From your terminal, run:
# Clone the Polyphase repository if you haven't already, or to get the latest version
git clone https://github.com/polyphase-engine/polyphase-engine
# Move into the polyphase directory
cd polyphase-engine
# Build the Docker image
./Docker/build.sh
Packaging Games With Docker
To package your game using the Docker build system, run the following command from the root of your project directory (where your .octp file is located):
docker run --rm -v ./dist/3DS:/game -v .:/project polyphase-engine build-3ds
This command mounts your project directory to /project in the Docker container, and tells the system to export your file to ./dist. You should create the dist directory or whatever you want to export to beforehand or else the directory will be created by Docker and you will have to sudo chmod -R 777 ./dist to change permissions so you can access it.
or do a sudo rm -rf ./dist to delete the directory.
Available Docker Build Commands
build-linux- Build a Linux.elfexecutablebuild-gamecube- Build a GameCube.dolfilebuild-wii- Build a Wii.dolfilebuild-3ds- Build a Nintendo.3dsxROM