@@ -48,6 +48,12 @@ function depends_dolphin() {
4848 else
4949 depends+=(qtbase5-private-dev)
5050 fi
51+ # on KMS use x11 to start the emulator
52+ isPlatform " kms" && depends+=(xorg matchbox-window-manager)
53+
54+ # if using the latest version, add SDL2 as dependency, since it's mandatory
55+ [[ " $( _get_commit_dolphin) " == " " ]] && depends+=(libsdl2-dev)
56+
5157 getDepends " ${depends[@]} "
5258}
5359
@@ -58,8 +64,8 @@ function sources_dolphin() {
5864function build_dolphin() {
5965 mkdir build
6066 cd build
61- # use the bundled 'speexdsp' libs, distro versions before 1.2.1 produce a 'cmake' error
62- cmake .. -DBUNDLE_SPEEX=ON -DCMAKE_INSTALL_PREFIX=" $md_inst "
67+ # use the bundled 'speexdsp' libs, distro versions before 1.2.1 trigger a 'cmake' error
68+ cmake .. -DBUNDLE_SPEEX=ON -DENABLE_AUTOUPDATE=OFF -DENABLE_ANALYTICS=OFF -DUSE_DISCORD_PRESENCE=OFF - DCMAKE_INSTALL_PREFIX=" $md_inst "
6369 make clean
6470 make
6571 md_ret_require=" $md_build /build/Binaries/dolphin-emu"
@@ -74,23 +80,40 @@ function configure_dolphin() {
7480 mkRomDir " gc"
7581 mkRomDir " wii"
7682
77- moveConfigDir " $home /.dolphin-emu" " $md_conf_root /gc"
83+ local launch_prefix
84+ isPlatform " kms" && launch_prefix=" XINIT-WM:"
85+
86+ addEmulator 0 " $md_id " " gc" " $launch_prefix$md_inst /bin/dolphin-emu-nogui -e %ROM%"
87+ addEmulator 1 " $md_id -gui" " gc" " $launch_prefix$md_inst /bin/dolphin-emu -b -e %ROM%"
88+ addEmulator 0 " $md_id " " wii" " $launch_prefix$md_inst /bin/dolphin-emu-nogui -e %ROM%"
89+ addEmulator 1 " $md_id -gui" " wii" " $launch_prefix$md_inst /bin/dolphin-emu -b -e %ROM%"
90+
91+ addSystem " gc"
92+ addSystem " wii"
7893
94+ [[ " $md_mode " == " remove" ]] && return
95+
96+ moveConfigDir " $home /.config/dolphin-emu" " $md_conf_root /gc/Config"
97+ mkUserDir " $md_conf_root /gc/Config"
98+ # preset a few options on a first installation
7999 if [[ ! -f " $md_conf_root /gc/Config/Dolphin.ini" ]]; then
80- mkdir -p " $md_conf_root /gc/Config"
81100 cat > " $md_conf_root /gc/Config/Dolphin.ini" << _EOF_
82101[Display]
83- FullscreenResolution = Auto
102+ FullscreenDisplayRes = Auto
84103Fullscreen = True
104+ RenderToMain = True
105+ KeepWindowOnTop = True
106+ [Interface]
107+ ConfirmStop = False
85108_EOF_
86- chown -R $user :$user " $md_conf_root /gc/Config"
109+ fi
110+ # use the GLES(3) render path on platforms where it's available
111+ if [[ ! -f " $md_conf_root /gc/Config/GFX.ini" ]] && isPlatform " gles3" ; then
112+ cat > " $md_conf_root /gc/Config/GFX.ini" << _EOF2_
113+ [Settings]
114+ PreferGLES = True
115+ _EOF2_
87116 fi
88117
89- addEmulator 1 " $md_id " " gc" " $md_inst /bin/dolphin-emu-nogui -e %ROM%"
90- addEmulator 0 " $md_id -gui" " gc" " $md_inst /bin/dolphin-emu -b -e %ROM%"
91- addEmulator 1 " $md_id " " wii" " $md_inst /bin/dolphin-emu-nogui -e %ROM%"
92- addEmulator 0 " $md_id -gui" " wii" " $md_inst /bin/dolphin-emu -b -e %ROM%"
93-
94- addSystem " gc"
95- addSystem " wii"
118+ chown -R $user :$user " $md_conf_root /gc/Config"
96119}
0 commit comments