[Tutorial] How to compile WiiFlow on Mac OS X

Step-by-step Wii tutorials: mod your Wii, install the Homebrew Channel, cIOS and a USB Loader, back up and unbrick your console.
User avatar
Ayatus
Gamer
Members
Posts: 846
Joined: Tue 3 Aug 2010 17:08
Wi-Fi: Non

[Tutorial] How to compile WiiFlow on Mac OS X

Post by Ayatus »

Automatically translated from French.

During a conversation on the #wiiflow channel, a member mentioned having trouble compiling WiiFlow on Mac OS X, which intrigued me, so I set out to deploy this OS in a virtual machine to see what's going on.

Not being particularly keen on installing Xcode, I found a way to get access to the compilation and versioning tools. Once downloaded and installed, let's get to the serious stuff.

Setting up the environment:

The whole procedure will be done from a terminal.

We start by making sure we're in our user directory:

Code: Select all

cd ~
Then we create the development directory and move into it:

Code: Select all

mkdir WiiFlow && cd WiiFlow
Downloading and extracting libogc and devkitPPC:

Code: Select all

curl -O https://open-wiiflow-mod.googlecode.com/files/libogc_svn_r4902.zip
curl -O https://freefr.dl.sourceforge.net/project/devkitpro/devkitPPC/devkitPPC_r26-osx.tar.bz2
unzip libogc_svn_r4902.zip -d devkitpro
tar -xjf devkitPPC_r26-osx.tar.bz2 -C devkitpro
Creating and saving the environment variables:

Code: Select all

echo 'export PATH=/opt/subversion/bin:$PATH
export DEVKITPRO=/Users/$USER/WiiFlow/devkitpro
export DEVKITPPC=$DEVKITPRO/devkitPPC' >> ~/.profile
. ~/.profile
Creating a working copy of the WiiFlow sources

Code: Select all

svn co https://open-wiiflow-mod.googlecode.com/svn/trunk/ wiiflow-src
Compiling:

We start by moving into the directory of our working copy:

Code: Select all

cd wiiflow-src
Since Mac OS X doesn't like -u, we'll need to edit two files so that the compilation goes well.

Code: Select all

sed -i -e 's/@mv -u/@mv/' Makefile
sed -i -e 's/date +%Y%m%d%H%M -u/date -u +%Y%m%d%H%M/' scripts/svnrev.sh
All that's left is to run the compilation:

Code: Select all

make
Going further:

Miscellaneous.
  • Cleaning up between two compilations:

    Code: Select all

    make clean
  • Speeding up compilation by running several processes in parallel with a multi-core processor, here a quad-core:

    Code: Select all

    make -j5
  • Updating the working copy:

    Code: Select all

    svn up
  • Reverting the changes made to the working copy's files:

    Code: Select all

    svn revert -R .
  • Updating the working copy to revision n:

    Code: Select all

    svn up -r n
And finally, a script to place at the root of the working copy:

Code: Select all

#!/bin/bash
make clean
svn revert -R . && svn up
sed -i -e 's/@mv -u/@mv/' Makefile
sed -i -e 's/date +%Y%m%d%H%M -u/date -u +%Y%m%d%H%M/' scripts/svnrev.sh
d1=`date +%s`
make -j5
echo -e "\033[00;31m compilé en $((`date +%s`-$d1))s\033[00m" 
User avatar
Oops
God Member
Members
Posts: 7083
Joined: Thu 2 Apr 2009 00:35
Wi-Fi: Oui
CFW Wii: Wii vendu
Type de DS: 3DS
Linker DS: R4i GOLD 3DS (r4ids.cn)
CFW PS3: ode a venir
Type PSP: Fat
Firmware PSP: 6.60 pro-B10
lecteurxbox: LiteOn
Firmware lecteur Xbox360: LT+3.0 rgh2 coolrunn
Dashboard: 3.775
Location: 17 et 95

Re: [Tutorial] How to compile WiiFlow on Mac OS X

Post by Oops »

Automatically translated from French.

It's so beautiful that for once I'd run out and buy a mac to test :mrgreen:
:accord: :74:

Everything for Wii · Wii U · Switch