RetroPie / RetroPie-Setup

Shell script to set up a Raspberry Pi/Odroid/PC with RetroArch emulator and various cores
Other
10.06k stars 1.39k forks source link

Quake 3 build script for RetroPie - Help finishing off #401

Closed adskiremote closed 10 years ago

adskiremote commented 10 years ago

Hi,

I've started a bash script to build Quake II into RetroPie. But my knowledge of bash is a little fuzzy. So anyone who has time to look and correct any code would be appreciated.

Then can be included in the main RetroPie script.

I've included a modified build.sh file that can be downloaded from my domain - I'm happy to leave this on there indefinitely.

Please see the bash file I've written:

Building Quake 3 - RetroPie

Required packaes - sudo apt-get install git gcc build-essential libsdl1.2-dev

function sources_quake3() { rmDirExists "$rootdir/emulators/quake3src" gitPullOrClone "$rootdir/emulators/quake3src" git://github.com/raspberrypi/quake3.git
}

function build_quake3() { pushd "$rootdir/emulators/quake3src/quake3"

# Change the build.sh file
rm "$rootdir/emulators/quake3src/quake3/build.sh"

#Download new one
sudo cd "$rootdir/emulators/quake3src/quake3"
sudo wget "http://www.adskiremote.co.uk/projects/retropie/quake3/build.sh"
sudo chmod +x build.sh   
sudo ./build.sh

# Add user for no sudo run
usermod -a -G video [$USER]

# Move the build files to emulators/quake3/
mkdir "$rootdir/emulators/quake3"
cd "$rootdir/emulators/quake3src/quake3/build/release-linux-arm/"
mv * "$rootdir/emulators/quake3/"

# Delete the build directory
rm -r "$rootdir/emulators/quake3src/

# Get the demo paks and unzip
cd "$rootdir/emulators/quake3/baseq3"
wget http://dl.dropbox.com/u/1816557/Q3%20Demo%20Paks.zip
sudo mv Q3\ Demo\ Paks.zip Q3pak.zip
unzip Q3pak.zip -d "$rootdir/emulators/quake3/"
rm "$rootdir/emulators/quake3/baseq3/Q3pak.zip"

# Apply chmod to the files
cd "$rootdir/emulators/quake3"
chmod +x "$rootdir/emulators/quake3/ioq3ded.arm"
chmod +x "$rootdir/emulators/quake3/ioquake3.arm"

popd

}

adskiremote commented 10 years ago

You'll also need the bash script to place in ~/RetroPie/roms/ports/

I called mine quake3.sh

create the file by doing...

cd ~/RetroPie/roms/ports/ nano quake3.sh

Copy and past the below in...

!/bin/bash

LD_LIBRARY_PATH=lib /opt/retropie/emulators/quake3/ioquake3.arm

Save the nano file. chmod it to executable by typing...

chmod +x quake3.sh

Now start EmulationStation and it should appear in ports.

petrockblog commented 10 years ago

That looks great - I will include this soon!

How does the entry in /etc/emulationstation/es_systems.cfg look like?

adskiremote commented 10 years ago

I just added it in Ports so it shows as Quake3. Similar to Duke3D and Doom 1.

If you prefer I can create a separate theme for it and have it under its own menu item.

Let me know which is best.

petrockblog commented 10 years ago

All, right - I see!

petrockblog commented 10 years ago

I just added Quake III Arena to the script - thanks for the work!

adskiremote commented 10 years ago

Anytime - it was too much fun not to :-)