Jump to: navigation, search

Setting Up and Compiling the Newer Sources

Here are 3 tutorials to set up and compile the NewerSMBW source code, along with a few questions regarding the NewerSMBW source code.


If you keep getting "permission denied" errors, etc., you can simply type: su in the terminal and enter password when prompted to curcumivent all sudo commands, so you won't have to type sudo <command> everytime. If you're on Ubuntu Linux or Mac OS X, su doesn't work, so you'll need to type sudo -i instead.

NOTE: 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.


The estimated time to set up and compile the NewerSMBW source code is about 2 or 3 hours (depending on your computer specs, internet connection speed, etc).

Contents

Mac OS X (by Tempus, and heavily edited by 9211tr, updated/working in 2018)[edit | edit source]

This has been tested on Mac OS X 10.14 Mojave. It should also work on Mac OS X 10.9 (Mavericks) up to 10.13 (High Sierra) or any version higher than 10.14 Mojave.


Installing GCC[edit | edit source]

Install Xcode via the Mac App Store (if you're on older Mac OS X version {below 10.14 Mojave}, you'll 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"[edit | edit source]

Open the terminal (if you haven't) and type: cd /

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:

brew install cmake
brew install gnu-sed
brew install wget


Installing devkitPPC[edit | edit source]

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

wget -O devkitPPC.tar.xz https://github.com/devkitPro/buildscripts/releases/download/devkitPPC_r33/devkitPPC_r33-osx.tar.xz

Afterwards, in the terminal, type:

tar -xvf devkitPPC.tar.xz -C /
rm devkitPPC.tar.xz

Or you can manually download devkitPPC here: https://github.com/devkitPro/buildscripts/releases
And manually extract the devkitPPC .tar.xz file to the / directory.


Installing PyElfTools/PyYAML[edit | edit source]

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

easy_install pyelftools
easy_install pyyaml


Downloading the Newer Sources[edit | edit source]

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

svn co https://github.com/Treeki/NewerSMBW/branches/no-translations /NewerSMBW-no-translations

Or you can manually download the Newer Sources here: https://github.com/Treeki/NewerSMBW/tree/no-translations
And download the .zip file and extract it to the / directory.


Downloading and Patching Clang/LLVM (rev. 184655)[edit | edit source]

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

svn co -r 184655 http://llvm.org/svn/llvm-project/llvm/trunk /llvm
svn co -r 184655 http://llvm.org/svn/llvm-project/cfe/trunk /llvm/tools/clang
svn co -r 184655 http://llvm.org/svn/llvm-project/compiler-rt/trunk /llvm/projects/compiler-rt
cd /llvm/tools/clang
patch -p0 -i /NewerSMBW-no-translations/ClangPatches/clang_cw_patches_r184655.diff

mkdir /NewerSMBW-LLVM
mkdir /llvm/build
cd /llvm/build


Compiling Clang/LLVM (rev. 184655)[edit | edit source]

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

cmake -DLLVM_DEFAULT_TARGET_TRIPLE=powerpc-unknown-unknown-unknown -DPYTHON_EXECUTABLE=/usr/bin/python -DLLVM_TARGETS_TO_BUILD="PowerPC" -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/NewerSMBW-LLVM" /llvm
make
make install
cd /
rm -r /llvm

cd /NewerSMBW-no-translations/Kamek/
mv src/heapbar.S src/heapbar2.S
gsed -e '129d' src/heapbar2.S > src/heapbar.S
rm src/heapbar2.S
mkdir processed
mkdir NewerASM


NOTE: If you get an error saying Undefined symbols for architecture x86_64: "___msan_allocated_memory" and/or Undefined symbols for architecture x86_64: "___msan_unpoison", you might want to type these commands:

gsed -i 's/__msan_unpoison/\/\/__msan_unpoison/' /llvm/lib/Support/Compression.cpp
gsed -i 's/__msan_allocated_memory/\/\/__msan_allocated_memory/' /llvm/lib/Support/Allocator.cpp

to fix the errors, more information about these errors here.

Additionally, if you get an 'netinet/ip_mroute.h' file not found fatal error, you'll need to do modifications to some of the LLVM compiler-rt source files to fix this error.

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

chmod 666 /llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
chmod 666 /llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
chmod 666 /llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Open /llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc with the text editor and replace this text:

#if (SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC
  _(SIOCGETSGCNT, WRITE, struct_sioc_sg_req_sz);

with

#if (SANITIZER_LINUX && !SANITIZER_ANDROID)
  _(SIOCGETSGCNT, WRITE, struct_sioc_sg_req_sz);


Open /llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc with the text editor and:

Remove the text #include <netinet/ip_mroute.h>, then replace this text

#if !SANITIZER_ANDROID
  unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);

with

#if !SANITIZER_ANDROID && !SANITIZER_MAC
  unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);

Replace this text

#if (SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC
  unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;

with

#if (SANITIZER_LINUX && !SANITIZER_ANDROID)
  unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;


Open /llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h with the text editor and:

Replace this text

#if !SANITIZER_ANDROID
  extern unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);

with

#if !SANITIZER_ANDROID && !SANITIZER_MAC
  extern unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);

Replace this text

#if (SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC
  extern unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;

with

#if (SANITIZER_LINUX && !SANITIZER_ANDROID)
  extern unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;


More information about this error here.


Compiling Newer[edit | edit source]

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

sudo -i
cd /NewerSMBW-no-translations/Kamek
python tools/mapfile_tool.py
python tools/kamek.py NewerProjectKP.yaml --show-cmd --no-rels --use-clang --gcc-type=/devkitPPC/bin/powerpc-eabi --llvm-path=/NewerSMBW-LLVM/bin


Finishing[edit | edit source]

This will output a number of .bin files into the NewerASM folder. You'll need to rename them to their NewerSMBW readable names, so open the terminal (if you haven't) and type:

cd /NewerSMBW-no-translations/Kamek/NewerASM/
wget https://raw.githubusercontent.com/9211tr/NewerSrcSetupScriptsWSLandLinux/master/RenameNewerBinFiles.sh
chmod +x RenameNewerBinFiles.sh

Once you're done with that, at any time, simply type in the terminal:

sudo -i
cd /NewerSMBW-no-translations/Kamek/NewerASM/
./RenameNewerBinFiles.sh

and then go into the renamed folder in the NewerASM folder, then plop the renamed .bin files into the /NewerRes folder in the Newer pack, and you should be sailing! If you want to automate the process further, take a look at the makeNewerKP file in the Kamek folder in a text editor. Change the commands at the top to match the ones in the code block in the "Compiling Newer" section, and change the directory paths below to output directly to your test folder destination. You can integrate the script with wit and Dolphin, or with RiiFs to get ultra speedy testing runs.



Debian/Ubuntu Linux (by Grop, and heavily edited by 9211tr and slightly edited by RedStoneMatt, updated/working in 2018)[edit | edit source]

If you're using Ubuntu Linux, Ubuntu 17.04 (or earlier) is recommended, 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[edit | edit source]

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: https://ubuntuforums.org/showthread.php?t=2382832#post13732693). Open the terminal (if you haven't) and type: nano /etc/apt/sources.list

Go to line #2 of the file (using the arrow keys) and paste this code:

# EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ zesty main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ zesty-security main restricted universe multiverse

Then exit and save your changes. Open the terminal (if you haven't) and type:

cd /
apt-get update -y
apt-get upgrade -y

and restart your Debian/Ubuntu Linux machine.

If you get an error saying "Could not get lock /var/lib/dpkg/lock - open" when trying to run apt-get upgrade -y, just simply type this command: rm /var/lib/dpkg/lock and the error should be gone.


Installing GCC[edit | edit source]

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

cd /
apt-get install -y gcc
apt-get install -y make


Installing CMake[edit | edit source]

Open the terminal (if you haven't) and type: apt-get install -y cmake


Installing Subversion (SVN)[edit | edit source]

Open the terminal (if you haven't) and type: apt-get install -y subversion


Installing devkitPPC[edit | edit source]

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

wget -O devkitPPC.tar.xz https://github.com/devkitPro/buildscripts/releases/download/devkitPPC_r33/devkitPPC_r33-linux.tar.xz

Afterwards, in the terminal, type:

tar -xvf devkitPPC.tar.xz -C /
rm devkitPPC.tar.xz

Or you can manually download devkitPPC here: https://github.com/devkitPro/buildscripts/releases
And manually extract the devkitPPC .tar.xz file to the / directory.


Installing PyElfTools/PyYAML[edit | edit source]

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

apt-get install -y python-pip
pip install pyelftools
pip install pyyaml


Downloading the Newer Sources[edit | edit source]

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


Downloading and Patching Clang/LLVM (rev. 184655)[edit | edit source]

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

svn co -r 184655 http://llvm.org/svn/llvm-project/llvm/trunk /llvm
svn co -r 184655 http://llvm.org/svn/llvm-project/cfe/trunk /llvm/tools/clang
svn co -r 184655 http://llvm.org/svn/llvm-project/compiler-rt/trunk /llvm/projects/compiler-rt
cd /llvm/tools/clang
patch -p0 -i /NewerSMBW-no-translations/ClangPatches/clang_cw_patches_r184655.diff

mkdir /NewerSMBW-LLVM
mkdir /llvm/build
cd /llvm/build


Compiling Clang/LLVM (rev. 184655)[edit | edit source]

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

cmake -DLLVM_DEFAULT_TARGET_TRIPLE=powerpc-unknown-unknown-unknown -DPYTHON_EXECUTABLE=/usr/bin/python -DLLVM_TARGETS_TO_BUILD="PowerPC" -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/NewerSMBW-LLVM" /llvm
make
make install
cd /
rm -r /llvm

cd /NewerSMBW-no-translations/Kamek/
mv src/heapbar.S src/heapbar2.S
sed -e '129d' src/heapbar2.S > src/heapbar.S
rm src/heapbar2.S
mkdir processed
mkdir NewerASM


Compiling Newer[edit | edit source]

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

su
cd /NewerSMBW-no-translations/Kamek
python tools/mapfile_tool.py
python tools/kamek.py NewerProjectKP.yaml --show-cmd --no-rels --use-clang --gcc-type=/devkitPPC/bin/powerpc-eabi --llvm-path=/NewerSMBW-LLVM/bin

NOTE: If you're on Ubuntu, make sure to use sudo -i instead, as su doesn't work on Ubuntu.


Finishing[edit | edit source]

This will output a number of .bin files into the NewerASM folder. You'll need to rename them to their NewerSMBW readable names, so open the terminal (if you haven't) and type:

cd /NewerSMBW-no-translations/Kamek/NewerASM/
wget https://raw.githubusercontent.com/9211tr/NewerSrcSetupScriptsWSLandLinux/master/RenameNewerBinFiles.sh
chmod +x RenameNewerBinFiles.sh

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 sudo -i instead, as su doesn't work on Ubuntu):

su
cd /NewerSMBW-no-translations/Kamek/NewerASM/
./RenameNewerBinFiles.sh

and then go into the renamed folder in the NewerASM folder, then plop the renamed .bin files into the /NewerRes folder in the Newer pack, and you should be sailing! If you want to automate the process further, take a look at the makeNewerKP file in the Kamek folder in a text editor. Change the commands at the top to match the ones in the code block in the "Compiling Newer" section, and change the directory paths below to output directly to your test folder destination. You can integrate the script with wit and Dolphin, or with RiiFs to get ultra speedy testing runs.



Windows 10 WSL subsystem (by 9211tr, updated/working in 2018)[edit | edit source]

Requirements[edit | edit source]

- 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 (as I stated before). 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 Start Menu --> Settings --> System --> About: https://dl.dropbox.com/s/sf1v3lfudcon2e5/Compiling%20NewerSMBW%20Sources%20on%20Windows%2010_img1.png

If your PC is below build 14393.0 Version 1607, then I'd suggest you update your computer to the newest build. Since mine is build 17134.112 Version 1803 (as shown in the photo above; plus, I have the Fall Creators Update installed), it is higher than 14393.0 Version 1607, so I'm good to go.


Tutorial[edit | edit source]


Installing/Enabling the WSL subsystem:[edit | edit source]

Step 1[edit | edit source]

Go to Start Menu --> Settings --> Update & Security --> For Developers. Set it to Developer Mode.


Step 2[edit | edit source]

Go to the Cortana Menu (the circle icon near the Start Menu icon) and in the search box, type Turn Windows features on or off. Check the box that says Windows Subsystem for Linux and click OK. Once you're done enabling the WSL subsystem, restart your computer.


Step 3[edit | edit source]

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)[edit | edit source]

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:
https://dl.dropbox.com/s/teq36wgvrvvmzc8/Compiling%20NewerSMBW%20Sources%20on%20Windows%2010_img2.png

You'll get to choose 5 (or probably more, if you're reading this in future years) different Linux distros for the WSL subsystem. Choose only Ubuntu (not any other distro), in order for everything to work out properly.

Scroll down and click Related, look for and choose the Ubuntu 16.04 LTS distro (this is important and as I said before: Ubuntu 17.04 {or earlier} is recommended, versions above that use GLIBC 2.25 {or higher}, and that's incompatible with LLVM {as it results in compiliation errors when compiling LLVM}). Once you select the Ubuntu 16.04 LTS distro, hit Get to download it. When it's finished downloading, hit Launch (you can also choose to pin it to the Start Menu if you like): https://dl.dropbox.com/s/ejro133p7p9z1d6/Compiling%20NewerSMBW%20Sources%20on%20Windows%2010_img3.png
https://dl.dropbox.com/s/jm66w27o8cx9zyn/Compiling%20NewerSMBW%20Sources%20on%20Windows%2010_img4.png

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


Method 2: Command-line (installs a legacy version of the WSL subsystem)[edit | edit source]

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 and in the search box, type bash to install the WSL subsystem. If you get an error after typing bash, saying "Windows Subsystem for Linux has no installed distributions", either:

  • You go to the Cortana Menu and in the search box, type instead lxrun /install and hopefully, you shouldn't have any errors.
  • You have the Windows 10 Fall Creators Update, build 16215.0 or higher installed, and should instead use the Windows Store method.

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

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

Now type exit to exit out of the WSL subsystem. If you get an error saying that the "root" 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 and in the search box, type bash to launch the WSL subsystem. Normally, if the "root" 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

apt-get update -y
apt-get upgrade -y
exit

Go to the Cortana Menu and in the search box, type bash to launch the WSL subsystem, then type cd /


Setting up and Compiling the NewerSMBW sources:[edit | edit source]

Step 1[edit | edit source]

Type in: sh <(wget -O - https://raw.githubusercontent.com/9211tr/NewerSrcSetupScriptsWSLandLinux/master/NewerSMBWSrcSetup_WindowsWSL.sh)
And it'll prompt you on what you want to do, type install or simply i 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[edit | edit source]

Once the installation is complete/finished, it'll do a TEST compile on the NewerSMBW sources (to see if everything was installed/done properly) and once that's finished and no syntax errors (or whatever errors) occurred, you're all done. To simply compile NewerSMBW at any time, simply type in the commands:

cd /
./newersmbw_compile.sh --autorename

The --autorename option isn't required, but with the --autorename option, your compiled NewerSMBW .bin files will be automatically renamed to their NewerSMBW-readable names.


Step 3[edit | edit source]

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: C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu16.04onWindows_79rhkp1fndgsc\LocalState\rootfs
If you installed it via the Command-line method, then the folder is: C:\Users\%USERNAME%\AppData\Local\lxss\rootfs

Go to the <NewerSourcesFolder>\Kamek\NewerASM\, or if you used the --autorename option: <NewerSourcesFolder>\Kamek\NewerASM\renamed folder (where <NewerSourcesFolder> is the path or folder name to the NewerSMBW source code folder). You should see all the DLCode/DLRelocs/System .bin 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 .bin files to your /NewerRes folder in your NewerSMBW game patch folder and test your mods out!
>> If you haven't used the --autorename option, you'll need to manually rename the .bin files to their NewerSMBW-readable names before you drag them to the /NewerRes folder.



Questions[edit | edit source]


1: (Windows 10 WSL Subsystem Only) Can I uninstall the NewerSMBW sources?[edit | edit source]

Yes, run the script via the command: sh <(wget -O - https://raw.githubusercontent.com/9211tr/NewerSrcSetupScriptsWSLandLinux/master/NewerSMBWSrcSetup_WindowsWSL.sh) and type uninstall or simply u and it'll remove it, among the other tools/compilers/etc.

NOTE: 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.


2: (Windows 10 WSL Subsystem Only) Can I reinstall the NewerSMBW sources?[edit | edit source]

Uninstall it, FIRST (see question #1), and then install it back again.


3: Can I have multiple folders for the NewerSMBW sources?[edit | edit source]

NOTE: If you're on Ubuntu or Mac OS X, make sure to use sudo -i instead, as su doesn't work on Ubuntu or Mac OS X. Also if you're on Mac OS X, make sure to use gsed, for the GNU "SED" (stream editor application) instead, not sed, because sed 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:

su
cd /
cp -r NewerSMBW-no-translations <NewFolderName>

Or if you need an unmodified and fresh copy, you can simply redownload it by typing these commands:

su
cd /
svn co https://github.com/Treeki/NewerSMBW/branches/no-translations <NewFolderName>
mv <NewFolderName>/Kamek/src/heapbar.S <NewFolderName>/Kamek/src/heapbar2.S
sed -e '129d' <NewFolderName>/Kamek/src/heapbar2.S > <NewFolderName>/Kamek/src/heapbar.S
rm <NewFolderName>/Kamek/src/heapbar2.S
mkdir <NewFolderName>/Kamek/processed
mkdir <NewFolderName>/Kamek/NewerASM

(where <NewFolderName> is the folder name of the copy of the NewerSMBW sources folder).

NOTE: Do not have <NewFolderName> as NewerSMBW-no-translations or your current NewerSMBW sources will be OVERWRITTEN.


Copying the RenameNewerBinFiles.sh file (for Debian/Ubuntu Linux and Mac OS X Only)[edit | edit source]


Type these commands in the terminal:

cd <NewFolderName>/Kamek/NewerASM
wget https://raw.githubusercontent.com/9211tr/NewerSrcSetupScriptsWSLandLinux/master/RenameNewerBinFiles.sh
chmod +x RenameNewerBinFiles.sh


Copying the newersmbw_compile.sh file (for Windows 10 WSL Subsystem Only)[edit | edit source]


Type these commands in the WSL subsystem: cp newersmbw_compile.sh <NewFileName> (where <NewFileName> is the file name of the copy of the newersmbw_compile.sh 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 NewerSMBW-no-translations with <NewFolderName> and save the changes.

Now in the WSL subsystem, type: chmod +x <NewFileName>
If you want to compile the NewerSMBW sources easily, type: ./<NewFileName>