Skip to content

Commit b99374c

Browse files
committed
cgenius: upgrade to 3.2.0 & misc module improvements
Updated to the latest stable version (3.2.0), with mostly bugfixes and stability changes. Scriptmodule changes: * changed the build to be in a separate folder * removed the install prefix since it's unused * removed the `gcc` workaround since it's not needed anymore * added a minimal config to configure the games location * removed the gamesdir symlink, not needed with the above modifications. Should prevent copying errors when backing up the SMB folders since the `games` config sub-folder was a symlink outside the `config` share.
1 parent 05776a1 commit b99374c

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

scriptmodules/ports/cgenius.sh

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
rp_module_id="cgenius"
1313
rp_module_desc="Commander Genius - Modern Interpreter for the Commander Keen Games (Vorticon and Galaxy Games)"
1414
rp_module_licence="GPL2 https://raw.githubusercontent.com/gerstrong/Commander-Genius/master/COPYRIGHT"
15-
rp_module_repo="git https://gitlab.com/Dringgstein/Commander-Genius.git v3.0.8"
15+
rp_module_repo="git https://gitlab.com/Dringgstein/Commander-Genius.git v3.2.0"
1616
rp_module_section="exp"
1717

1818
function depends_cgenius() {
@@ -21,23 +21,20 @@ function depends_cgenius() {
2121

2222
function sources_cgenius() {
2323
gitPullOrClone
24-
25-
# use -O2 on older GCC due to segmentation fault when compiling with -O3
26-
if compareVersions $__gcc_version lt 6; then
27-
sed -i "s/ADD_DEFINITIONS(-O3)/ADD_DEFINITIONS(-O2)/" src/CMakeLists.txt
28-
fi
2924
}
3025

3126
function build_cgenius() {
32-
cmake -DBUILD_COSMOS=1 -DCMAKE_INSTALL_PREFIX="$md_inst" -DNOTYPESAVE=on
27+
rmdir -fr build
28+
mkdir -p build && cd build
29+
cmake -DBUILD_COSMOS=1 -DNOTYPESAVE=on ..
3330
make
34-
md_ret_require="$md_build/src/CGeniusExe"
31+
md_ret_require="$md_build/build/src/CGeniusExe"
3532
}
3633

3734
function install_cgenius() {
3835
md_ret_files=(
3936
'vfsroot'
40-
'src/CGeniusExe'
37+
'build/src/CGeniusExe'
4138
)
4239
}
4340

@@ -47,5 +44,18 @@ function configure_cgenius() {
4744
mkRomDir "ports/$md_id"
4845

4946
moveConfigDir "$home/.CommanderGenius" "$md_conf_root/$md_id"
50-
moveConfigDir "$md_conf_root/$md_id/games" "$romdir/ports/$md_id"
47+
48+
[[ $md_mode == "remove" ]] && return
49+
50+
# Create a minimal config file so the Commander can find the games
51+
local config="$(mktemp)"
52+
cat > "$config" << _INI_
53+
[FileHandling]
54+
EnableLogfile = false
55+
SearchPath1 = \${HOME}/.CommanderGenius
56+
SearchPath2 = .
57+
SearchPath3 = $romdir/ports/$md_id
58+
_INI_
59+
copyDefaultConfig "$config" "$md_conf_root/$md_id/cgenius.cfg"
60+
5161
}

0 commit comments

Comments
 (0)