Let's try make a Wii U Toolchain / SDK for creating rpx/rpl.
Go to file
2018-06-21 10:19:47 +01:00
cafe cmake: Cleanup some CMake stuff. 2018-06-15 13:59:55 +01:00
docs Prefix structsize macros with WUT_ 2018-06-20 11:05:16 +01:00
include Add zlib headers from zlib 1.2.5 2018-06-21 10:19:47 +01:00
libraries Prefix structsize macros with WUT_ 2018-06-20 11:05:16 +01:00
samples samples: Update swkbd sample to use VPADChan enum 2018-06-18 12:36:06 +01:00
share cmake: Remove -std=c++17 from wut_enable_stdcpp 2018-06-18 21:13:06 +01:00
tests Add some compile tests. 2018-06-18 10:26:37 +01:00
tools cmake: Cleanup some CMake stuff. 2018-06-15 13:59:55 +01:00
.gitignore Update .gitignore 2018-06-13 17:35:50 +01:00
.gitmodules Add zlib as a submodule. 2018-05-25 13:57:47 +01:00
.travis.yml Build tests on travis 2018-06-18 10:29:30 +01:00
CMakeLists.txt Cleanup some CMake stuff 2018-06-14 11:44:23 +01:00
LICENSE.md Create LICENSE.md 2015-12-27 02:16:34 +00:00
README.md Update README.md 2018-06-15 10:45:41 +01:00

Build Status

wut

Let's try make a Wii U Toolchain / SDK for creating rpx/rpl.

Licensed under the terms of the GNU General Public License, version 2 or later (GPLv2+).

Install

Grab the latest release extract to a folder, then export that folder as WUT_ROOT.

For example:

wget https://github.com/decaf-emu/wut/releases/download/1.0.0-alpha/wut.linux64.7z
mkdir wut && cd wut
7z x ../wut.linux64.7z
export WUT_ROOT=$PWD

Usage

See samples for examples of how to use wut.

The share/wut.cmake file provides several helpers for your build:

  • wut_create_rpx(target.rpx executable) - Will create an .rpx file from your CMake target generated by add_executable
  • wut_enable_newlib(target) - Links against the wut implementation of newlib, this is useful for using any function from the C standard library
  • wut_enable_stdcpp(target) - Links against the wut implementation of stdcpp, this is useful for using any function from the C++ standard library. This will call wut_enable_newlib if you have not already done so.
  • wut_default_malloc(target) - By default newlib will allocate 90% of the default heap for use with sbrk & malloc, if this is unacceptable to you then you should use this as it replaces the newlib malloc functions which ones which redirect to the CafeOS default heap functions such as MEMAllocFromDefaultHeap.
  • wut_enable_devoptab_sd(target) - This links in wutdevoptab_sd which is useful for using the libc file functions with paths such as fopen("sd:/file.txt", "r") to read files from the sd card

A minimal CMakeLists.txt file for a C++ project might look like:

cmake_minimum_required(VERSION 3.2)
project(helloworld_cpp CXX)
include("${WUT_ROOT}/share/wut.cmake" REQUIRED)

add_executable(helloworld_cpp
   main.cpp)

wut_enable_stdcpp(helloworld_cpp)
wut_create_rpx(helloworld_cpp.rpx helloworld_cpp)

Which you would compile with

export DEVKITPPC=/opt/devkitpro/devkitPPC
export WUT_ROOT=<path/to/install>
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake ../
make

Building

Requires:

Building on Windows

Use WSL and then follow the Linux instructions.

For example, if you installed Ubuntu 18.04 then you might setup your environment like:

sudo apt install cmake zlib1g-dev gcc g++ build-essentials
wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
sudo dpkg -i devkitpro-pacman.deb
sudo ln -s /proc/mounts /etc/mtab
sudo dkp-pacman -S devkitPPC wiiload

Building on Linux / MacOS

export DEVKITPPC=/opt/devkitpro/devkitPPC
git clone --recursive https://github.com/decaf-emu/wut.git
cd wut
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=<path/to/install> ../
make install
export WUT_ROOT=<path/to/install>

Then for any wut project you want to build you must use the wut.toolchain.cmake script:

cd ../samples/helloworld
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake ../
make