Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
gamestabled committed Mar 24, 2021
2 parents b65dab1 + f1505a3 commit 0cf23de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build-cia-3dsx:
runs-on: ubuntu-latest
container:
image: devkitpro/devkitarm
image: phlex/oot3dr-build-tools

steps:
- uses: actions/checkout@v2
Expand Down
37 changes: 4 additions & 33 deletions linux_build_rando.sh
Original file line number Diff line number Diff line change
@@ -1,49 +1,20 @@
#!/bin/bash

gather_required_files() {
echo "Our python version: "
python3 -V
sudo apt update && sudo apt install automake build-essential wget unzip zip -y
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev -y
sudo wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
sudo tar xzf Python-3.8.5.tgz
cd Python-3.8.5
sudo ./configure --enable-optimizations
sudo make install
cd ../
wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.17/makerom-v0.17-ubuntu_x86_64.zip
unzip makerom-v0.17-ubuntu_x86_64.zip
git clone https://github.com/Steveice10/bannertool.git
cd bannertool
git submodule update --init
make
unzip ./output/bannertool.zip
mv linux-x86_64/bannertool ../bannertoolexec
cd ..
wget https://github.com/dnasdw/3dstool/releases/download/v1.2.6/3dstool_linux_x86_64.tar.gz
tar -zxvf 3dstool_linux_x86_64.tar.gz
chmod +x bannertoolexec
chmod +x makerom
chmod + 3dstool
}

compile() {
# If building manually just replace SHA with your own text.
export commitHashShort=$(echo ${GITHUB_SHA::6})
sed -i "s/COMMITNUM/$commitHashShort/" ./source/menu.cpp
sed -i "s/COMMITNUM/$commitHashShort/" ./source/settings.cpp
make
./bannertoolexec makebanner -i ./banner.png -a ./audio.wav -o ./banner.bnr
./bannertoolexec makesmdh -s "Ocarina of Time 3D Randomizer" -l "A different Ocarina of Time experience" -p "Gamestabled & Gymnast86" -i icon.png -o ./icon.icn
./3dstool -cvtf romfs ./romfs.bin --romfs-dir ./romfs
./makerom -f cia -o OoT3D_Randomizer.cia -DAPP_ENCRYPTED=false -target t -exefslogo -elf ./OoT3D_Randomizer.elf -icon ./icon.icn -banner ./banner.bnr -rsf ./ootrando.rsf -romfs ./romfs.bin -major 1 -minor 0 -micro 1
bannertoolexec makebanner -i ./banner.png -a ./audio.wav -o ./banner.bnr
bannertoolexec makesmdh -s "Ocarina of Time 3D Randomizer" -l "A different Ocarina of Time experience" -p "Gamestabled & Gymnast86" -i icon.png -o ./icon.icn
3dstool -cvtf romfs ./romfs.bin --romfs-dir ./romfs
makerom -f cia -o OoT3D_Randomizer.cia -DAPP_ENCRYPTED=false -target t -exefslogo -elf ./OoT3D_Randomizer.elf -icon ./icon.icn -banner ./banner.bnr -rsf ./ootrando.rsf -romfs ./romfs.bin -major 1 -minor 0 -micro 1
}

clean_up() {
rm -rf bannertool* makerom* 3dstool* icon.icn ext_key.txt ignore_3dstool.txt banner.bnr romfs.bin
}

gather_required_files
compile
clean_up

0 comments on commit 0cf23de

Please sign in to comment.