Setting Up and Compiling the Newer Sources

Here are 5 tutorials to set up and compile the NewerSMBW source code, along with a few questions regarding the NewerSMBW source code. If you get "permission denied" or "read-only filesystem" errors, see this here. The estimated time to set up and compile the NewerSMBW source code may take between 30 minutes and 2 hours, depending on your knowledge with the terminal, internet connection speed, etc.

Steps for Mac OS X
Credits and Release Information Original tutorial by Tempus, heavily edited by 9211tr, updated/working as of 2019. This has been tested on Mac OS X 10.15 Catalina. It should also work on Mac OS X 10.9 (Mavericks) up to 10.14 (Mojave) or any version higher than 10.15 Catalina.

Installing GCC
Install Xcode via the Mac App Store (if you're on an older Mac OS X version {below 10.15 Catalina}, you may have to go online and download the latest version of Xcode for whichever older Mac OS X version you have). Open Xcode once it's finished installing, read all the license agreements that pops up and agree to it.

Installing CMake, GNU "SED", and GNU "WGET"
Open the terminal (if you haven't already) and type: Install the package manager, "Homebrew", go to its website: https://brew.sh/, and copy the install command and paste and enter it in the terminal, then once it's finished installing, type:

Installing devkitPPC
Open the terminal (if you haven't already) and type: Afterwards, in the terminal, type: Or you can manually download devkitPPC here: https://github.com/devkitPro/buildscripts/releases And manually extract the devkitPPC  file to the   directory.

Installing PyElfTools/PyYAML
Open the terminal (if you haven't already) and type: NOTE: If you get an  fatal error (usually if you're on Mac OS X 10.15 Catalina), you may have to install the libyaml package and remove the   PyYAML   reference file. In the terminal, type: (where  is the name of the PyYAML   file, for example, " ").

Downloading the Newer Sources
Open the terminal (if you haven't already) and type: Or you can manually download the Newer Sources here: https://github.com/Treeki/NewerSMBW/tree/no-translations And download the  file and extract it to the   directory.

Downloading and Patching Clang/LLVM (rev. 184655)
Open the terminal (if you haven't already) and type:

Compiling Clang/LLVM (rev. 184655)
Open the terminal (if you haven't already) and type:

NOTE: If you get an error saying  and/or , you might want to type these commands: to fix the errors. More information about these errors here.

Additionally, if you get an  fatal error, you'll need to do modifications to 3 of the LLVM compiler-rt source files to fix this error. Open the terminal (if you haven't already) and type:

1st: Open  with the text editor and replace this text:   with

2nd: Open  with the text editor and: Remove the text, then replace this text   with

Afterwards, replace this text  with

3rd: Open  with the text editor and: Replace this text  with

Afterwards, replace this text  with

More information about this error here.

Compiling Newer
At any time, open the terminal (if you haven't already) and type:

Finishing
This will output a number of  files into the   folder. You'll need to rename them to their NewerSMBW readable names, so open the terminal (if you haven't already) and type:  Once you're done with that, at any time, simply type in the terminal:   and then go into the   folder in the   folder, then plop the renamed   files into the   folder in the Newer pack, and you should be sailing! If you want to automate the process further, take a look at the  file in the   folder in the text editor. Change the commands at the top to match the ones in the code block in the  section, and change the directory paths below to output directly to your test folder destination. You can integrate the script with WIT (Wiimm's ISO Tools), Dolphin Emulator, or with RiiFS to get ultra speedy testing runs.

Steps for Debian/Ubuntu Linux
Credits and Release Information Original tutorial by Grop, and heavily edited by 9211tr + slightly edited by RedStoneMatt, updated/working as of 2019. Debian 9.11.0 (or earlier) / Ubuntu 17.04 (or earlier) is needed, versions above that use GLIBC 2.25 (or higher), and that's incompatible with LLVM (as it results in compiliation errors when compiling LLVM). This method works on both a real computer and a virtual machine.

Keep in mind that you'll need to use the 64-bit (x86-64 or AMD64) version of Debian/Ubuntu Linux, since some of the necessary tools/programs needed for compiling NewerSMBW are no longer compatible with the 32-bit (i386 or i686) version.

Preparing apt-get
If you're on Ubuntu 17.04 ONLY, you'll need to do some changes to the apt-get sources to prevent errors (more information here). Open the terminal (if you haven't already) and type:

Go to line #2 of the file (using the arrow keys) and paste this code: Then exit and save your changes.

Afterwards, in the terminal, type:  and restart your Ubuntu Linux machine.

If you get an error saying  when trying to run , just simply type this command:   and the error should be gone.

Installing GCC
Open the terminal (if you haven't already) and type:

Installing CMake
Open the terminal (if you haven't already) and type:

Installing Subversion (SVN)
Open the terminal (if you haven't already) and type:

Installing devkitPPC
Open the terminal (if you haven't already) and type: Afterwards, in the terminal, type: Or you can manually download devkitPPC here: https://github.com/devkitPro/buildscripts/releases And manually extract the devkitPPC  file to the   directory.

Installing PyElfTools/PyYAML
Open the terminal (if you haven't already) and type:

Downloading the Newer Sources
Open the terminal (if you haven't already) and type: Or you can manually download the Newer Sources here: https://github.com/Treeki/NewerSMBW/tree/no-translations And download the  file and extract it to the   directory.

Downloading and Patching Clang/LLVM (rev. 184655)
Open the terminal (if you haven't already) and type:

Compiling Clang/LLVM (rev. 184655)
Open the terminal (if you haven't already) and type:

Compiling Newer
At any time, open the terminal (if you haven't already) and type: NOTE: If you're on Ubuntu, make sure to use  instead, as   doesn't work on Ubuntu.

Finishing
This will output a number of  files into the   folder. You'll need to rename them to their NewerSMBW readable names, so open the terminal (if you haven't already) and type:  Once you're done with that, at any time, simply type in the terminal (and again, if you're on Ubuntu, make sure to use   instead, as   doesn't work on Ubuntu):   and then go into the   folder in the   folder, then plop the renamed   files into the   folder in the Newer pack, and you should be sailing! If you want to automate the process further, take a look at the  file in the   folder in the text editor. Change the commands at the top to match the ones in the code block in the  section, and change the directory paths below to output directly to your test folder destination. You can integrate the script with WIT (Wiimm's ISO Tools), Dolphin Emulator, or with RiiFS to get ultra speedy testing runs.

Windows 10 WSL subsystem
Credits and Release Information Tutorial by 9211tr, updated/working as of 2019

Requirements
- Windows 10 Anniversary Update BUILD 14393.0, Version 1607 (or higher).

- The 64-bit (x64 or x86-64) version of Windows 10 + an x64-based processor on your computer, as the WSL subsystem requires this in order for it to enable, install, and work. It WILL NOT work on the 32-bit (x32 or x86) version of Windows 10 and/or an x86-based processor on your computer.

- An internet connection.

- At least 22 GB of free disk space.

HINT: To tell if your Windows 10 PC is 64-bit (and is running Anniversary Update BUILD 14393.0 Version 1607 or higher, and on an x64-based processor), go to the  -->   -->   -->

If your PC is below build 14393.0 Version 1607, then I'd suggest you update your computer to the newest build.

Step 1
Go to  -->   -->   -->   Set it to

Step 2
Go to the Cortana Menu (the circle icon near the Start Menu icon), or if you're on a newer build of Windows 10, the search box near the Start Menu icon. Type  Check the box that says   and click OK. Once you're done enabling the WSL subsystem, restart your computer.

Step 3
After restarting, we'll need to install the WSL subsystem (the WSL subsystem installation may take about 10 minutes to complete):

Method 1: Windows Store (installs a much improved version of the WSL subsystem, recommended)
NOTE: You need the Windows 10 Fall Creators Update, build 16215.0 or higher, in order to use this method, or it won't work.

Go to: https://aka.ms/wslstore, and the Microsoft Store should appear:

You'll get to choose 6 (or probably more, if you're reading this in the future) different Linux distros for the WSL subsystem. Choose Ubuntu (not any other distro), in order for everything to work out properly, but don't download that distro, since that distro is Ubuntu 18.04 LTS (this is important and as I said before: Ubuntu 17.04 {or earlier} is needed, versions above that use GLIBC 2.25 {or higher}, and that's incompatible with LLVM {as it results in compiliation errors when compiling LLVM}).

Scroll down and click, look for and choose the Ubuntu 16.04 LTS distro. Once you select the Ubuntu 16.04 LTS distro, hit  to download it. When it's finished downloading, hit  (you can also choose to pin it to the Start Menu if you like):

After hitting, it'll say that it's installing.

Method 2: Command-line (installs a legacy version of the WSL subsystem)
NOTE: This method is not recommended as it installs a legacy version of the WSL subsystem, but if you're not using the Windows 10 Fall Creators Update, build 16215.0 or higher, then this is the only method that will work.

Go to the Cortana Menu, or if you're on a newer build of Windows 10, the search box near the Start Menu icon. Type  to install the WSL subsystem. If you get an error after typing, saying   either: <ul style="list-style-type:square;"> <li>You go to the Cortana Menu, or if you're on a newer build of Windows 10, the search box. Type instead  and hopefully, you shouldn't have any errors.</li>

<li>You have the Windows 10 Fall Creators Update, build 16215.0 or higher installed, and should instead use the Windows Store method.</li> </ul>

Read the license agreement, and if you accept it, type  (for "Yes", to accept), and it will install.

Step 4
Once it's done installing, it will ask you for what the username should be called, just type  in all lowercase, and for the password (IF PROMPTED), that's all up to you.

Now type  to exit out of the WSL subsystem. If you get an error saying that the  username already exists, then close the WSL subsystem by hitting Ctrl-C on the keyboard, don't enter in a username.

Go to the Cortana Menu, or if you're on a newer build of Windows 10, the search box near the Start Menu icon. Type  to launch the WSL subsystem. Normally, if the  username already exists, it will instead use that username, but if it still prompts you to enter in the username, then you have no choice but to use a different username.

Type the commands:

Go to the Cortana Menu, or if you're on a newer build of Windows 10, the search box near the Start Menu icon. Type  to launch the WSL subsystem, then type

Step 1
Type in: And it'll prompt you on what you want to do, type  or simply   and hit ENTER on your keyboard, and it should start installing, and just wait for it to complete, so find something to do in the meantime, unless if you have the patience to watch the screen until the script is finished running. The script installs everything automatically, so there's no need for you to install anything manually.

Step 2
Once the installation is finished, it'll do a TEST compile on the NewerSMBW sources (to see if everything was installed properly) and once that's finished and no syntax errors (or whatever errors) occurred, you're all done. To compile NewerSMBW at any time, simply type in the commands: The  option isn't required, but with the   option, your compiled NewerSMBW   files will be automatically renamed to their NewerSMBW readable names.

Step 3
You'll need to go into the folder of where the WSL subsystem files are located. If you installed the WSL subsystem via the Windows Store method, then the folder is: If you installed it via the Command-line method, then the folder is:

Go to the, or if you used the   option:   folder. You should see all the DLCode/DLRelocs/System  files for US(NTSC)/EU(PAL)/JP(JPN) v1 and v2, if no syntax errors (or whatever errors occurred) when compiling the NewerSMBW sources.

Then drag the  files to your   folder in your NewerSMBW game patch folder and test your mods out! If you want to automate the process further, take a look at the  file in the   folder in the text editor. Change the commands at the top to match the ones in the code block in Step 2 of this tutorial, and change the directory paths below to output directly to your test folder destination. You can integrate the script with WIT (Wiimm's ISO Tools), Dolphin Emulator, or with RiiFS to get ultra speedy testing runs.

NOTE:</b> If you haven't used the  option, you'll need to manually rename the   files to their NewerSMBW readable names before you drag them to the   folder.

Windows 7 and later
Credits and Release Information Original tutorial by RedStoneMatt, heavily edited by 9211tr, updated/working as of 2019. This has also been tested on Windows 10. It should also work on Windows 8/8.1 or any Windows OS higher than Windows 10.

Requirements
- Windows 7 or later. Windows XP/Vista ARE NOT compatible.

- Python 2.7 (download here, and click on "Latest Python 2 Release").

- An internet connection.

Step 1
If you're on a 32-bit Windows OS (x32 or x86), download the Windows x86 MSI installer of Python 2.7. Otherwise if you're on a 64-bit Windows OS (x64 or x86-64), download the Windows x86-64 MSI installer of Python 2.7.

Once you're done downloading the MSI installer, follow the install instructions and install it in its default folder:.

Step 2
You need to upgrade "pip" (which is the Python 2.7 package manager), and install PyElfTools/PyYAML. Open the Windows Command Prompt, and type:

Step 3
Download this already-prepared  file of the NewerSMBW sources and extract it where you want.

Step 4
To compile NewerSMBW at any time, simply click on the  file (in the   folder of the extracted zip folder). Once the compilation is finished and no syntax errors (or whatever errors) occurred, you're all done. Your compiled NewerSMBW  files will be automatically renamed to their NewerSMBW readable names, and will be located in the   folder of the extracted zip folder.

If you want your  files to be outputed somewhere else, you can open the   file with any text editor and replace   on the 12th line with the path of the folder you want your   files to be outputed in.

1: How do I resolve the "permission denied" and "read-only filesystem" errors whenever I type a command in the terminal?
Type  for every command in the tutorial, and enter password when prompted. Even better, you can simply type  in the terminal to circumvent all   commands, so you won't have to type   everytime. If you're on Ubuntu Linux or Mac OS X,  doesn't work, so you'll need to type   instead.

NOTE:</b> If no text is shown when typing the password, it does not mean it's not working, the text is hidden so in case if anyone is watching the computer screen behind your back, they won't see your password.

If you're on Mac OS X and still getting "permission denied" errors, even after typing, this is due to Apple's System Integrity Protection (SIP) in Mac OS X 10.11 El Captain and later. You'll need to enter into recovery mode to disable it. To enter recovery mode: 1:</b> If you have multiple internal hard drive partitions/volumes alongside your Mac OS X partition/volume, you'll need to go into System Preferences (the gear icon in the dock, which is at the bottom of the screen), and click Startup Disk. 2:</b> Click the lock to make changes and select the disk where your Mac OS X partition/volume is, then restart your Mac. 3:</b> As soon when your Mac starts up, hold down Command-R on the keyboard until the Apple logo shows up, to enter recovery mode. 4:</b> In recovery mode, go to  -->. In the terminal, type, then restart your Mac to exit out of recovery mode.

If you're on Mac OS X and also are getting a "read-only filesystem" error, this is due to Mac OS X 10.15 Catalina having a separate read-only volume (for the  directory and critical system files) alongside the writable, user data volume. You'll need to disable Apple's System Integrity Protection (SIP), first, following the steps above. Afterwards, open the terminal (if you haven't already) and type, to make the   directory writable again.

This change will automatically be reverted when you restart your Mac. For it to be permanent (at least whenever you start the terminal), when the terminal is open (and you've clicked on the terminal window), go to  -->   -->   -->. Under the Startup section in the terminal preferences window, check the box that says  and. In the text box, type the command, and exit the terminal preferences window. Now everytime you start up the terminal, you'll always be able to modify the  directory.

2: (Windows 10 WSL Subsystem Only) Can I uninstall the NewerSMBW sources?
Yes, run the script via the command:  And type   or simply   and it'll remove it, among the other tools/compilers/etc.

NOTE:</b> This will remove everything in the NewerSMBW sources folder, so make sure you backup any source files/etc. from the NewerSMBW sources folder before uninstalling it.

3: (Windows 10 WSL Subsystem Only) Can I reinstall the NewerSMBW sources?
Uninstall it, FIRST (see question #2), and then install it back again.

4: Can I have multiple folders for the NewerSMBW sources?
NOTE:</b> If you're on Ubuntu or Mac OS X, make sure to use  instead, as   doesn't work on Ubuntu or Mac OS X. Also if you're on Mac OS X, make sure to use , for the GNU "SED" (stream editor application) instead, not  , because   on Mac OS X is a script editor application, not the GNU "SED" (stream editor application).

Yes, copy the existing folder by typing the commands:  Or if you need an unmodified and fresh copy, you can simply redownload it by typing these commands:   (where   is the folder name of the copy of the NewerSMBW sources folder). NOTE:</b> Do not have  as   or your current NewerSMBW sources will be OVERWRITTEN.

Copying the file (for Debian/Ubuntu Linux and Mac OS X Only)
Type these commands in the terminal:

Copying the file (for Windows 10 WSL Subsystem Only)
Type this command in the WSL subsystem:  (where   is the file name of the copy of the   file).

Then you'll need to modify the copy of the file with a text editor that supports the Unix (LF) line feed format (I would recommend PSPad if you don't have one), then replace the text  with   and save the changes.

Now in the WSL subsystem, type: If you want to compile the NewerSMBW sources easily, type: