Setting Up and Compiling the Newer Sources

Here are the 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 3 hours, depending on your computer specs, knowledge with the terminal, internet connection speed, etc.

Credits and Release Information
Original tutorial by Tempus, and heavily edited by User:9211tr. Updated/working as of 2020.

This has been tested on macOS 10.15 Catalina. It should also work on OS X 10.9 Mavericks up to macOS 10.14 Mojave, or (but untested) on any version later than 10.15 Catalina.

Installing GCC
Install Xcode via the Mac App Store (if you're on an earlier macOS version {below 10.15 Catalina}, you may have to go online and download the latest version of Xcode for whichever earlier macOS 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, copy the install command, and paste/enter it into 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 macOS 10.15 Catalina), you may have to install the libyaml package, remove the   PyYAML   reference file, and reinstall PyYAML. In the terminal, type: (where  is the name of the PyYAML   reference file, for example,  ).

Downloading the NewerSMBW Sources
Open the terminal (if you haven't already) and type: Or you can manually download the NewerSMBW Sources here: https://github.com/Newer-Team/NewerSMBW/tree/no-translations And download the  file and extract it to the   directory. NOTE: If you get an error saying  (usually if you're on macOS 10.15 Catalina), you may have to install the subversion (SVN) package with "Homebrew" instead. In the terminal, type: More information about this error here.

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:

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

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

Afterwards, replace this text  with

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

Afterwards, replace this text  with

More information about this error here.

Compiling NewerSMBW
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 drag the renamed   files into 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 the  section, and change the directory paths below to output directly to your test folder destination. You can integrate the script with WIT (Wiimms ISO Tools), Dolphin Emulator, or with RiiFS to get ultra speedy testing runs.

Credits and Release Information
Original tutorial by Grop, and heavily edited by User:9211tr + slightly edited by User:RedStoneMatt. Updated/working as of 2020.

Debian 9.13.0 (or earlier) / Ubuntu 17.04 (or earlier) is needed, versions above that use GLIBC 2.25 or later, and that's incompatible with LLVM (as it results in compilation errors when compiling LLVM).

Also, 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 computer.

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 NewerSMBW Sources
Open the terminal (if you haven't already) and type: Or you can manually download the NewerSMBW Sources here: https://github.com/Newer-Team/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 NewerSMBW
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,</b> make sure to use  instead, as   doesn't work on Ubuntu): and then go into the  folder in the   folder, then drag the renamed   files into 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 the  section, and change the directory paths below to output directly to your test folder destination. You can integrate the script with WIT (Wiimms ISO Tools), Dolphin Emulator, or with RiiFS to get ultra speedy testing runs.

Credits and Release Information
Original tutorial by User:RedStoneMatt, and heavily edited by User:9211tr. Updated/working as of 2020.

This has also been tested on Windows 10. It should also work on Windows 8, 8.1, or (but untested) on any version later than Windows 10.

Requirements
- Windows 7 or later

- Python 2.7.x (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  installer file of Python 2.7.x. Otherwise if you're on a 64-bit Windows OS (x64 or x86-64), download the Windows x86-64   installer file of Python 2.7.x.

Once you're done downloading the  installer file, follow the install instructions.

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

Step 3
Download this already-prepared .zip file of the NewerSMBW sources and extract it to. Right-click on and edit the  file (in the   folder) and replace all occurrences of   with.

Step 4
To compile NewerSMBW at any time, simply click on the  file (in the   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 at the   folder.

Credits and Release Information
Tutorial by User:9211tr. Updated/working as of 2020.

Requirements
- Windows 10 Anniversary Update BUILD 14393.0 Version 1607 or later

- 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 computer is 64-bit, running Anniversary Update BUILD 14393.0 Version 1607 or later, and on an x64-based processor, go to the  -->   -->   -->  :



If you're below build 14393.0 Version 1607, then I'd suggest you update your computer to the latest 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 later 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 installation may take about 10 minutes to complete):

Method 1: Windows Store (installs a much improved version of the WSL subsystem, recommended)
NOTE:</b> You need the Windows 10 Fall Creators Update, build 16215.0 or later, 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 a later version of Ubuntu (this is important and as I said before: Ubuntu 17.04 {or earlier} is needed, versions above that use GLIBC 2.25 or later, and that's incompatible with LLVM {as it results in compilation errors when compiling LLVM}). Scroll down and click, look for and choose the Ubuntu 16.04 LTS distro. If it's not shown, go here. 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:</b> 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 later, then this is the only method that will work.

Go to the Cortana Menu, or if you're on a later 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 later 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 later 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
If you're getting  and   errors with the Ubuntu 16.04 LTS distro, then try launching it again and see if it installs successfully. If it doesn't, restart your computer and reinstall the Ubuntu 16.04 LTS distro. Once it's successfully installed, 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 later 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: to update the current utilities/packages in the WSL subsystem.

Go to the Cortana Menu, or if you're on a later 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. It should start installing, so find something to do in the meantime, unless if you have the patience to watch the screen and wait 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 and done 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  folder, 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 into 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 (Wiimms 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 into the   folder.

Credits and Release Information
Original tutorial by User:Nin0 2257, and heavily edited by User:9211tr. Updated/working as of 2020.

This has been tested on Windows 10 Pro Version 1903 64-bit, and Windows 10 Home Version 2004 64-bit. Also, both Newer Super Mario All-Stars Revived (NSMASR) and NSMBWer have their own files for Riivolution and are incompatible with the files from NewerSMBW, including its object files, layout files, etc.

Requirements
- Windows 10 or later

- Python 3.4.x or later (download here, and click on "Latest Python 3 Release", if you need to use Python 3.4.x, scroll down on the "Stable Releases" section and go to "Python 3.4.4")

- PyLauncher (download here, needed for some programs requiring Python 2.7.x and some requiring Python 3.4.x when it comes to NewerSMBW modding)

- get-pip for Python 3.4.x (download here, needed only for installing the latest supported version of "pip" for Python 3.4.x {which is "pip" version 19.1.1}</b>)

- devkitPPC r33 or earlier (download here)

- An internet connection

- The NSMASR sources by User:H1dd3nM1nd (CLF78), or the NSMBWer sources by User:Danster64 (download the  file of the NSMASR sources here, or the   file of the NSMBWer sources here)



Step 1
For Python, download the Windows x86  installer file (if you're on a 32-bit Windows OS {x32 or x86}), or the Windows x86-64   installer file (if you're on a 64-bit Windows OS {x64 or x86-64}).

For PyLauncher, download the  installer file (if you're on a 32-bit Windows OS {x32 or x86}), or the   installer file (if you're on a 64-bit Windows OS {x64 or x86-64}).

Once you're done downloading the  installer files, follow the install instructions. For devkitPPC, download the  file (if you're on a 32-bit Windows OS {x32 or x86}), or the   file (if you're on a 64-bit Windows OS {x64 or x86-64}).

Step 2
If you're on Python 3.4.x only,</b> you need to upgrade "pip" (which is the Python package manager) to the latest supported version for Python 3.4.x (which is "pip" version 19.1.1). Place the  file into the   folder. Open the Windows Command Prompt (if you haven't already) and type: If you're on Python 3.5 or later,</b> you can simply upgrade "pip" to the latest version by typing After upgrading, install PyElfTools/PyYAML. In the Windows Command Prompt, type:

Step 3
Extract the NSMASR or NSMBWer  file to. The folder for the NSMASR sources should be called, and the folder for the NSMBWer sources should be called. Then extract the devkitPPC  file to the   folder of the NSMASR or NSMBWer sources folder, as shown below:



Step 4
Create a folder called, in the   folder of the NSMASR or NSMBWer sources folder. For NSMASR only,</b> copy the  file (in the   folder, if the file exists) into the   folder, as shown below:



NOTE:</b> In earlier revisions of the NSMASR sources, it wasn't copied into the folder automatically, so it had to be done manually. User:H1dd3nM1nd (CLF78) said he copied the contents inside the  file into another one, so the problem may already be fixed in later revisions of the NSMASR sources.

Step 5
Right-click on and edit the  file in the   folder of the NSMASR or NSMBWer sources folder. You can either edit the path to your own Dolphin Emulator game path (marked in the first picture below), or in the  section of the file, change the   part to   to stop it from moving your compiled   files altogether (marked in the second picture below):



If you have multiple Python versions, make sure that the  file uses Python 3.4.x or later. If you have PyLauncher and your standard Python version is 2.7.x, you can simply replace all occurrences of  (in the   file) to. For NSMASR only,</b> download the CodeWarrior files: <ul style="list-style-type:square;"> <li> (if it shows up as text, right-click and click   or similar, to download the file)</li> <li> </li> <li> </li> <li> </li> <li> </li> </ul> and place them into the  folder of the NSMASR sources folder. Then replace all occurrences of  (in the   file) to. When you're done editing the  file, save your changes. To compile NSMASR or NSMBWer at any time, click on the  file (in the   folder of the NSMASR or NSMBWer sources folder). Once the compilation is finished and no syntax errors (or whatever errors) occurred, you're all done. Your compiled  files will be automatically renamed to their readable names, and will be located at the   folder (in the NSMASR sources folder), or the   folder (in the NSMBWer sources folder).

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 macOS,  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 macOS and still getting "permission denied" errors, even after typing, this is due to Apple's System Integrity Protection (SIP) in OS X 10.11 El Capitan 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 macOS 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 macOS partition/volume is, then restart your Mac. 3:</b> As soon as 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 macOS and also are getting a "read-only filesystem" error, this is due to macOS 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?
<b style="color:#FF0000;">NOTE:</b> If you're on Ubuntu Linux or macOS, make sure to use  instead, as   doesn't work on Ubuntu or macOS. Also if you're on macOS, make sure to use, for the GNU "SED" (stream editor application) instead, not  , because   on macOS 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). <b style="color:#FF0000;">NOTE:</b> Do not have  as   or your current NewerSMBW sources will be OVERWRITTEN.

Copying the file (for Debian/Ubuntu Linux and macOS 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: