Skip to content

Commit 8c58eff

Browse files
committed
adding GZdoom
1 parent a673b5e commit 8c58eff

File tree

2 files changed

+173
-0
lines changed

2 files changed

+173
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#!/usr/bin/env bash
2+
3+
# This file is part of The RetroPie Project
4+
#
5+
# The RetroPie Project is the legal property of its developers, whose names are
6+
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
7+
#
8+
# See the LICENSE.md file at the top-level directory of this distribution and
9+
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
10+
#
11+
12+
rp_module_id="gzdoom-system"
13+
rp_module_desc="GZDoom System - Yes the real GZDoom on Pi, running in GLES"
14+
rp_module_licence="GPL3 https://raw.githubusercontent.com/drfrag666/gzdoom/master/LICENSE"
15+
rp_module_repo="git https://github.com/Exarkuniv/gzdoom-Pi.git master"
16+
rp_module_section="exp"
17+
rp_module_flags=""
18+
19+
function depends_gzdoom-system() {
20+
getDepends g++ make cmake libsdl2-dev git zlib1g-dev libbz2-dev libjpeg-dev libfluidsynth-dev libgme-dev libopenal-dev libmpg123-dev libsndfile1-dev libgtk-3-dev timidity nasm libgl1-mesa-dev tar libsdl1.2-dev libglew-dev libvpx-dev libvulkan-dev
21+
22+
}
23+
24+
function sources_gzdoom-system() {
25+
gitPullOrClone "$md_build"
26+
}
27+
28+
function build_gzdoom-system() {
29+
if [ ! -f "/usr/lib/arm-linux-gnueabihf/libzmusic.so" ]; then
30+
gitPullOrClone "$md_build/zmusic" https://github.com/coelckers/ZMusic.git
31+
cd $md_build/zmusic
32+
mkdir build
33+
cd build
34+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
35+
make
36+
make install
37+
rm -r $md_build/zmusic
38+
39+
fi
40+
41+
mkdir $md_build/build
42+
cd $md_build/build
43+
c="$(lscpu -p | grep -v '#' | sort -u -t , -k 2,4 | wc -l)" ; [ "$c" -eq 0 ] && c=1
44+
rm -f output_sdl/liboutput_sdl.so &&
45+
if [ -d ../fmodapi44464linux ]; then
46+
f="-DFMOD_LIBRARY=../fmodapi44464linux/api/lib/libfmodex${a}-4.44.64.so \
47+
-DFMOD_INCLUDE_DIR=../fmodapi44464linux/api/inc"; else
48+
f='-UFMOD_LIBRARY -UFMOD_INCLUDE_DIR'; fi &&
49+
cmake .. -DCMAKE_BUILD_TYPE=Release
50+
make -j4
51+
52+
}
53+
54+
function install_gzdoom-system() {
55+
md_ret_files=(
56+
'build/brightmaps.pk3'
57+
'build/gzdoom'
58+
'build/gzdoom.pk3'
59+
'build/lights.pk3'
60+
'build/game_support.pk3'
61+
'build/soundfonts'
62+
'build/game_widescreen_gfx.pk3'
63+
'README.md'
64+
)
65+
}
66+
67+
function game_data_gzdoom-system() {
68+
mkRomDir "doom"
69+
if [[ ! -f "$romdir/doom/doom1.wad" ]]; then
70+
wget "$__archive_url/doom1.wad" -O "$romdir/doom/doom1.wad"
71+
fi
72+
73+
if [[ ! -f "$romdir/doom/freedoom1.wad" ]]; then
74+
wget "https://github.com/freedoom/freedoom/releases/download/v0.12.1/freedoom-0.12.1.zip"
75+
unzip freedoom-0.12.1.zip
76+
mv freedoom-0.12.1/*.wad "$romdir/doom"
77+
rm -rf freedoom-0.12.1
78+
rm freedoom-0.12.1.zip
79+
fi
80+
}
81+
82+
function configure_gzdoom-system() {
83+
mkUserDir "$home/.config"
84+
setConfigRoot ""
85+
addEmulator 1 "gzdoom" "doom" "$md_inst/gzdoom +set vid_preferbackend 3 -iwad %ROM%"
86+
addSystem "doom" "DOOM" ".pk3 .wad"
87+
88+
moveConfigDir "$home/.config/gzdoom" "$md_conf_root/gzdoom"
89+
90+
[[ "$md_mode" == "install" ]] && game_data_gzdoom-system
91+
[[ "$md_mode" == "remove" ]] && return
92+
}

scriptmodules/ports/gzdoom.sh

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/usr/bin/env bash
2+
3+
# This file is part of The RetroPie Project
4+
#
5+
# The RetroPie Project is the legal property of its developers, whose names are
6+
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
7+
#
8+
# See the LICENSE.md file at the top-level directory of this distribution and
9+
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
10+
#
11+
12+
rp_module_id="gzdoom"
13+
rp_module_desc="GZDoom - Yes the real GZDoom on Pi, running in GLES"
14+
rp_module_licence="GPL3 https://raw.githubusercontent.com/drfrag666/gzdoom/master/LICENSE"
15+
rp_module_repo="git https://github.com/Exarkuniv/gzdoom-Pi.git master"
16+
rp_module_section="exp"
17+
rp_module_flags=""
18+
19+
function depends_gzdoom-system() {
20+
getDepends g++ make cmake libsdl2-dev git zlib1g-dev libbz2-dev libjpeg-dev libfluidsynth-dev libgme-dev libopenal-dev libmpg123-dev libsndfile1-dev libgtk-3-dev timidity nasm libgl1-mesa-dev tar libsdl1.2-dev libglew-dev libvpx-dev libvulkan-dev
21+
22+
}
23+
24+
function sources_gzdoom-system() {
25+
gitPullOrClone "$md_build"
26+
}
27+
28+
function build_gzdoom-system() {
29+
if [ ! -f "/usr/lib/arm-linux-gnueabihf/libzmusic.so" ]; then
30+
gitPullOrClone "$md_build/zmusic" https://github.com/coelckers/ZMusic.git
31+
cd $md_build/zmusic
32+
mkdir build
33+
cd build
34+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
35+
make
36+
make install
37+
rm -r $md_build/zmusic
38+
39+
fi
40+
mkdir -pv build
41+
cd build
42+
c="$(lscpu -p | grep -v '#' | sort -u -t , -k 2,4 | wc -l)" ; [ "$c" -eq 0 ] && c=1
43+
rm -f output_sdl/liboutput_sdl.so &&
44+
if [ -d ../fmodapi44464linux ]; then
45+
f="-DFMOD_LIBRARY=../fmodapi44464linux/api/lib/libfmodex${a}-4.44.64.so \
46+
-DFMOD_INCLUDE_DIR=../fmodapi44464linux/api/inc"; else
47+
f='-UFMOD_LIBRARY -UFMOD_INCLUDE_DIR'; fi &&
48+
cmake .. -DCMAKE_BUILD_TYPE=Release
49+
make -j4
50+
51+
}
52+
53+
54+
function install_gzdoom() {
55+
md_ret_files=(
56+
'build/brightmaps.pk3'
57+
'build/gzdoom'
58+
'build/gzdoom.pk3'
59+
'build/lights.pk3'
60+
'build/game_support.pk3'
61+
'build/soundfonts'
62+
'build/game_widescreen_gfx.pk3'
63+
'README.md'
64+
)
65+
}
66+
67+
function add_games_gzdoom() {
68+
local params=("+fullscreen 1")
69+
local launcher_prefix="DOOMWADDIR=$romdir/ports/doom"
70+
71+
_add_games_lr-prboom "$launcher_prefix $md_inst/$md_id +set vid_preferbackend 3 -iwad %ROM%"
72+
}
73+
74+
function configure_gzdoom() {
75+
mkRomDir "ports/doom"
76+
moveConfigDir "$home/.config/$md_id" "$md_conf_root/doom"
77+
78+
[[ "$md_mode" == "install" ]] && game_data_lr-prboom
79+
80+
add_games_${md_id}
81+
}

0 commit comments

Comments
 (0)