Skip to content

Commit a34b2ec

Browse files
authored
Merge pull request #3618 from cmitu/cgenius-updates3
cgenius: upgrade to 3.2.0 & misc module improvements
2 parents ca2f1c6 + b99374c commit a34b2ec

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)