Lunos2

Building Pokediamond (WSL - Ubuntu 18.04)

Aug 28th, 2020 (edited)
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. Note: If you already have WSL set up, go to the Step 10.
  2.  
  3. 1) Enable WSL if you haven't done it already by going to Windows PowerShell and typing:
  4. Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  5. Let it run and restart your PC once it's done.
  6.  
  7. 2) Go to the Microsoft Store and download Ubuntu 18.04 from there.
  8. Alternatively, you can download the distro outside of the store as a .appx package from the Ubuntu Wiki.
  9. https://wiki.ubuntu.com/WSL#Installing_Ubuntu_on_WSL_by_sideloading_the_.appx
  10.  
  11. 3) Introduce the following commands, one at a time. It's gonna take a lot of waiting. You'll also need to press the Y key, choose Yes and press Enter at some point.
  12. sudo apt update
  13. sudo apt upgrade
  14.  
  15. 4) sudo apt install build-essential git libpng-dev libarchive13 pkg-config
  16. Press Y and wait until it finishes.
  17.  
  18. 5) Download devkitpro's installer for Linux (devkitpro-pacman.amd64.deb).
  19. https://github.com/devkitPro/pacman/releases
  20.  
  21. 6) Put it in your Desktop, a folder or wherever and go there using the "cd" command.
  22.  
  23. 7) sudo dpkg -i devkitpro-pacman.amd64.deb
  24.  
  25. 8) Run the following commands:
  26. sudo dkp-pacman -Sy
  27. sudo dkp-pacman -S gba-dev
  28.  
  29. 9) Close WSL and open it again, so it can recognize the variables created by devkitpro.
  30.  
  31. 10) Go to your regular work folder or make one if you don't have one.
  32. I personally like to keep my stuff in C:\Users\Lunos\Decomps, so imma head there by using "cd /mnt/c/Users/Lunos/Decomps"
  33.  
  34. 11) git clone https://github.com/pret/pokediamond
  35.  
  36. 12) Download the MWCC compiler right here: https://cdn.discordapp.com/attachments/698589325620936736/845499146982129684/mwccarm.zip
  37.  
  38. 13) Extract the folder and toss the mwccarm containing 2 folders and a license.dat file into C:\cygwin64\home\USER\pokediamond\tools
  39.  
  40. 14) Download the Nitro SDK right here: https://cdn.discordapp.com/attachments/698589325620936736/722822401963851797/NitroSDK-3_2-060901.7z
  41.  
  42. 15) Extract the folder and go to C:\Users\USER\Desktop\NitroSDK-3_2-060901\tools
  43.  
  44. 16) Throw the bin folder there into C:\cygwin64\home\USER\pokediamond\tools
  45.  
  46. 17) Go back to C:\Users\Lunos\Desktop\NitroSDK-3_2-060901 and from there go to include\nitro\specfiles
  47. Once there:
  48. *-Grab the ARM7-TS.lcf.template file and drop it in C:\cygwin64\home\USER\pokediamond\arm7
  49. *-Grab the ARM9-TS.lcf.template file and drop it in C:\cygwin64\home\USER\pokediamond\arm9
  50.  
  51. 18) Make a new Environment Variable (Win+R > rundll32.exe sysdm.cpl,EditEnvironmentVariables).
  52. Its name will be "LM_LICENSE_FILE" and the variable value will be the path to the license.dat file in Pokediamond's folder.
  53. Ex: C:\Users\Lunos\Decomps\pokediamond\tools\mwccarm\license.dat
  54.  
  55. Make another one, call it "MWCIncludes" and give it whatever value you want, just don't leave it empty.
  56. This is to skip some irrelevant warning messages.
  57.  
  58. 19) Add the paths to mwccarm\1.2\sp2p3 and mwccarm\2.0\sp1 present in your Pokediamond folder to Windows' PATH Variable.
  59. In my case, they look like this: https://i.imgur.com/QlHdCA0.png
  60.  
  61. 20) Go back to WSL and then just
  62. cd pokediamond
  63. make -jN
  64. Note: "N" stands for the number of CPU Threads you want to assign to the compiler. The more threads, the faster it'll go.
  65.  
  66. And that's pretty much it.
Add Comment
Please, Sign In to add comment