From 4331b691c0e4073402529c9de16fe57d38e3edfb Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 17 Oct 2018 09:28:19 -0700 Subject: [PATCH] Remove support for the glx binary. Fixes compile with DP from master. --- Docs/faq.md | 6 +- Makefile | 7 - misc/logos/xonotic-glx.desktop | 10 -- misc/tools/all/release.subr | 5 +- misc/tools/all/xonotic.subr | 18 +-- misc/tools/all/zsh_autocompletion/all/_all | 4 +- .../rsync-updater/update-to-autobuild.bat | 2 - .../tools/rsync-updater/update-to-release.bat | 2 - misc/tools/testbuild.sh | 4 - release.cmake | 3 - xonotic-linux-dedicated.sh | 2 +- xonotic-linux-glx.sh | 131 ------------------ xonotic-linux-sdl.sh | 131 +++++++++++++++++- 13 files changed, 141 insertions(+), 184 deletions(-) delete mode 100644 misc/logos/xonotic-glx.desktop delete mode 100755 misc/tools/testbuild.sh delete mode 100755 xonotic-linux-glx.sh mode change 120000 => 100755 xonotic-linux-sdl.sh diff --git a/Docs/faq.md b/Docs/faq.md index e515db4c..255a4099 100644 --- a/Docs/faq.md +++ b/Docs/faq.md @@ -3,7 +3,7 @@ **There is no need to install Xonotic!** The zip file you downloaded from the homepage has everything. All binaries to run the game on Linux, Windows and macOS are inside of it. Just unzip the archive and run the appropriate executable for your OS. -For example, on Windows or macOS you can start the game by double-clicking the Xonotic logo. On Linux you can run xonotic-linux-glx.sh or xonotic-linux-sdl.sh - whichever one works better on your hardware. +For example, on Windows or macOS you can start the game by double-clicking the Xonotic logo. On Linux you can run xonotic-linux-sdl.sh. ## Is there a Debian package available? @@ -85,7 +85,7 @@ Use our [issue tracker](http://gitlab.com/xonotic/xonotic-data.pk3dir/issues) on If you want to investigate further: -On Linux: In a xterm, cd into your Xonotic installation directory, start catchsegv ./xonotic-linux-686-sdl -condebug -developer > crash.txt 2>&1 and give the file crash.txt to the developers. Note that you can also use ./xonotic-linux-686-glx or if you have a 64bit system ./xonotic-linux-x86_64-sdl and ./xonotic-linux-x86_64-glx +On Linux: In a xterm, cd into your Xonotic installation directory, start catchsegv ./xonotic-linux64-sdl -condebug -developer > crash.txt 2>&1 and give the file crash.txt to the developers. On a 32bit system you should instead use ./xonotic-linux32-sdl. On Windows: Click Start->Run, and enter drwtsn32, click Ok in the next window, run Xonotic and wait for the crash. Then go to C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson there should be a file called "drwtsn32.log", give that file along with the engine's build date to the developers. You'll see that date when you open the ingame console (How do I open the console?). Note that some folders of that path may be hidden or have a translated name if you're using a non-english windows. @@ -116,7 +116,7 @@ An extensive list of maps is at [xonotic.co](http://xonotic.co) ## How can I place a shortcut to Xonotic on my Linux desktop? -Use the script xonotic-linux-sdl.sh or xonotic-linux-glx.sh instead of the binaries. The scripts will use the correct working directory, choose the right version (32 or 64 bit) and also allow you to start a extra X server. +Use the script xonotic-linux-sdl.sh instead of the binaries. The scripts will use the correct working directory, choose the right version (32 or 64 bit) and also allow you to start a extra X server. ## How do I open the console? diff --git a/Makefile b/Makefile index 72c16677..3db135a9 100644 --- a/Makefile +++ b/Makefile @@ -85,31 +85,25 @@ install-engine: install-engine-$(SUFFIX) .PHONY: install-engine-git install-engine-git: all-git $(INSTALL) -d $(DESTDIR)$(LIBDIR) - $(INSTALL) xonotic-linux-glx.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-glx.sh $(INSTALL) xonotic-linux-sdl.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-sdl.sh $(INSTALL) xonotic-linux-dedicated.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-dedicated.sh $(INSTALL) darkplaces/darkplaces-sdl $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-sdl - $(INSTALL) darkplaces/darkplaces-glx $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-glx $(INSTALL) darkplaces/darkplaces-dedicated $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-dedicated .PHONY: install-engine-zip-binary install-engine-zip-binary: all-zip-binary $(INSTALL) -d $(DESTDIR)$(LIBDIR) - $(INSTALL) xonotic-linux-glx.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-glx.sh $(INSTALL) xonotic-linux-sdl.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-sdl.sh $(INSTALL) xonotic-linux-dedicated.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-dedicated.sh $(INSTALL) xonotic-$(ARCH)-sdl $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-sdl - $(INSTALL) xonotic-$(ARCH)-glx $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-glx $(INSTALL) xonotic-$(ARCH)-dedicated $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-dedicated .PHONY: install-engine-zip-source install-engine-zip-source: all-zip-source $(INSTALL) -d $(DESTDIR)$(LIBDIR) - $(INSTALL) xonotic-linux-glx.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-glx.sh $(INSTALL) xonotic-linux-sdl.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-sdl.sh $(INSTALL) xonotic-linux-dedicated.sh $(DESTDIR)$(LIBDIR)/xonotic-linux-dedicated.sh $(INSTALL) source/darkplaces/darkplaces-sdl $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-sdl - $(INSTALL) source/darkplaces/darkplaces-glx $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-glx $(INSTALL) source/darkplaces/darkplaces-dedicated $(DESTDIR)$(LIBDIR)/xonotic-$(ARCH)-dedicated @@ -117,7 +111,6 @@ install-engine-zip-source: all-zip-source install-links: $(INSTALL) -d $(BINDIR) $(LN) -snf $(LIBDIR)/xonotic-linux-sdl.sh $(DESTDIR)$(BINDIR)/xonotic-sdl - $(LN) -snf $(LIBDIR)/xonotic-linux-glx.sh $(DESTDIR)$(BINDIR)/xonotic-glx $(LN) -snf $(LIBDIR)/xonotic-linux-dedicated.sh $(DESTDIR)$(BINDIR)/xonotic-dedicated diff --git a/misc/logos/xonotic-glx.desktop b/misc/logos/xonotic-glx.desktop deleted file mode 100644 index b8656f81..00000000 --- a/misc/logos/xonotic-glx.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Version=1.0 -Name=Xonotic (GLX) -Comment=a free open-source first person shooter -Icon=xonotic -Exec=xonotic-glx -Terminal=false -StartupNotify=false -Categories=Game; diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index 0b30a9bd..4fd05e9b 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -169,7 +169,7 @@ case "$cmd" in verbose date +%Y%m%d > Xonotic/stamp.txt verbose date +%Y%m%d > Xonotic/pk3stamp.txt fi - release_git_extract_dir "." "Xonotic" Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh xonotic-linux-dedicated.sh Makefile misc/buildfiles key_0.d0pk COPYING GPL-2 GPL-3 + release_git_extract_dir "." "Xonotic" Docs misc server xonotic-linux-sdl.sh xonotic-linux-dedicated.sh Makefile misc/buildfiles key_0.d0pk COPYING GPL-2 GPL-3 ( verbose cd Xonotic verbose mkdir data gmqcc source source/darkplaces source/gmqcc source/d0_blind_id mapping @@ -221,7 +221,6 @@ case "$cmd" in release_common good=true verbose "$SELF" release-getbinary Xonotic/xonotic-x86.exe || good=false - verbose "$SELF" release-getbinary Xonotic/xonotic-x86-wgl.exe || good=false verbose "$SELF" release-getbinary Xonotic/xonotic-x86-dedicated.exe || good=false $good ;; @@ -229,7 +228,6 @@ case "$cmd" in release_common good=true verbose "$SELF" release-getbinary Xonotic/xonotic.exe || good=false - verbose "$SELF" release-getbinary Xonotic/xonotic-wgl.exe || good=false verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || good=false $good ;; @@ -244,7 +242,6 @@ case "$cmd" in release_common good=true verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-sdl || good=false - verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-glx || good=false verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || good=false $good ;; diff --git a/misc/tools/all/xonotic.subr b/misc/tools/all/xonotic.subr index 3b9b3935..9118c505 100644 --- a/misc/tools/all/xonotic.subr +++ b/misc/tools/all/xonotic.subr @@ -83,11 +83,9 @@ case "$cmd" in esac done + TARGETS="sv-$debug sdl-$debug" if [ x"`uname`" = x"Darwin" ]; then - TARGETS="sv-$debug sdl-$debug" export CC="$CC -fno-reorder-blocks" - else - TARGETS="sv-$debug cl-$debug sdl-$debug" fi if [ $# -gt 0 ] && [ x"$1" = x"" ]; then @@ -104,9 +102,6 @@ case "$cmd" in sdl) TARGETS="$TARGETS sdl-$debug" ;; - glx|wgl) - TARGETS="$TARGETS cl-$debug" - ;; dedicated) TARGETS="$TARGETS sv-$debug" ;; @@ -322,16 +317,11 @@ case "$cmd" in client=-$1 shift ;; - sdl|glx) + sdl) USE_RLWRAP=no client=-$1 shift ;; - wgl) - USE_RLWRAP=no - client= - shift - ;; esac if ! [ -x "darkplaces/darkplaces$client" ]; then if [ -x "darkplaces/darkplaces$client.exe" ]; then @@ -383,9 +373,9 @@ case "$cmd" in fi ;; help) - $ECHO " $SELF compile [-c] [-qc] [-r|-p] [-0] [sdl|glx|wgl|dedicated]" + $ECHO " $SELF compile [-c] [-qc] [-r|-p] [-0] [sdl|dedicated]" $ECHO " $SELF update-maps" - $ECHO " $SELF run [sdl|glx|wgl|dedicated] options..." + $ECHO " $SELF run [sdl|dedicated] options..." $ECHO " $SELF compile-map mapname1 mapname2... (e.g. \"./all compile-map dance drain fuse\")" handled=false ;; diff --git a/misc/tools/all/zsh_autocompletion/all/_all b/misc/tools/all/zsh_autocompletion/all/_all index e1361989..8c99c313 100644 --- a/misc/tools/all/zsh_autocompletion/all/_all +++ b/misc/tools/all/zsh_autocompletion/all/_all @@ -44,12 +44,12 @@ case $state in # choose version and autocomplete cvars # possible TODO: check for OS and adapt to it _arguments \ - '1:Version:(sdl glx dedicated)' && ret=0 + '1:Version:(sdl dedicated)' && ret=0 ;; compile) _arguments \ - '1:Version:(sdl glx dedicated)' \ + '1:Version:(sdl dedicated)' \ "-0[don't use precompiled d0_blind_id]" \ '-c[clean all before building]' \ '-qc[clean QuakeC binaries]' \ diff --git a/misc/tools/rsync-updater/update-to-autobuild.bat b/misc/tools/rsync-updater/update-to-autobuild.bat index 9d6cbf11..911628c8 100644 --- a/misc/tools/rsync-updater/update-to-autobuild.bat +++ b/misc/tools/rsync-updater/update-to-autobuild.bat @@ -89,7 +89,6 @@ if "%ProgramFiles(x86)%" == "" goto bit32 :bit64 if not "%XONOTIC_INCLUDE_32BIT%" == "" goto endbit set excludes=%excludes% --exclude=/xonotic-x86.exe - set excludes=%excludes% --exclude=/xonotic-x86-wgl.exe set excludes=%excludes% --exclude=/xonotic-x86-dedicated.exe set excludes=%excludes% --exclude=/gmqcc/gmqcc.exe set excludes=%excludes% --exclude=/bin32 @@ -97,7 +96,6 @@ if "%ProgramFiles(x86)%" == "" goto bit32 goto endbit :bit32 set excludes=%excludes% --exclude=/xonotic.exe - set excludes=%excludes% --exclude=/xonotic-wgl.exe set excludes=%excludes% --exclude=/xonotic-dedicated.exe set excludes=%excludes% --exclude=/gmqcc/gmqcc-x64.exe set excludes=%excludes% --exclude=/bin64 diff --git a/misc/tools/rsync-updater/update-to-release.bat b/misc/tools/rsync-updater/update-to-release.bat index 9d6cbf11..911628c8 100644 --- a/misc/tools/rsync-updater/update-to-release.bat +++ b/misc/tools/rsync-updater/update-to-release.bat @@ -89,7 +89,6 @@ if "%ProgramFiles(x86)%" == "" goto bit32 :bit64 if not "%XONOTIC_INCLUDE_32BIT%" == "" goto endbit set excludes=%excludes% --exclude=/xonotic-x86.exe - set excludes=%excludes% --exclude=/xonotic-x86-wgl.exe set excludes=%excludes% --exclude=/xonotic-x86-dedicated.exe set excludes=%excludes% --exclude=/gmqcc/gmqcc.exe set excludes=%excludes% --exclude=/bin32 @@ -97,7 +96,6 @@ if "%ProgramFiles(x86)%" == "" goto bit32 goto endbit :bit32 set excludes=%excludes% --exclude=/xonotic.exe - set excludes=%excludes% --exclude=/xonotic-wgl.exe set excludes=%excludes% --exclude=/xonotic-dedicated.exe set excludes=%excludes% --exclude=/gmqcc/gmqcc-x64.exe set excludes=%excludes% --exclude=/bin64 diff --git a/misc/tools/testbuild.sh b/misc/tools/testbuild.sh deleted file mode 100755 index 51a07e05..00000000 --- a/misc/tools/testbuild.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cd nexuiz -../darkplaces/nexuiz-glx "$@" diff --git a/release.cmake b/release.cmake index 44b16eb8..8e40ad2c 100644 --- a/release.cmake +++ b/release.cmake @@ -58,17 +58,14 @@ if (0) message(STATUS "Downloading Darkplaces") getbinary(Xonotic/xonotic-x86.exe) - getbinary(Xonotic/xonotic-x86-wgl.exe) getbinary(Xonotic/xonotic-x86-dedicated.exe) getbinary(Xonotic/xonotic.exe) - getbinary(Xonotic/xonotic-wgl.exe) getbinary(Xonotic/xonotic-dedicated.exe) getbinary(Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin) # +x getbinary(Xonotic/xonotic-osx-dedicated) # +x getbinary(Xonotic/xonotic-linux64-sdl) # +x - getbinary(Xonotic/xonotic-linux64-glx) # +x getbinary(Xonotic/xonotic-linux64-dedicated) # +x endif () diff --git a/xonotic-linux-dedicated.sh b/xonotic-linux-dedicated.sh index 41f63aaf..f516fa9b 120000 --- a/xonotic-linux-dedicated.sh +++ b/xonotic-linux-dedicated.sh @@ -1 +1 @@ -xonotic-linux-glx.sh \ No newline at end of file +xonotic-linux-sdl.sh \ No newline at end of file diff --git a/xonotic-linux-glx.sh b/xonotic-linux-glx.sh deleted file mode 100755 index 137fc4ed..00000000 --- a/xonotic-linux-glx.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/sh - -path=`dirname "${0}"` -link=`readlink -f "${0}"` - -[ -n "${link}" ] && path=`dirname "${link}"` -cd "${path}" - -case "${0##*/}" in - *dedicated*) mode="dedicated" ;; - *sdl*) mode="sdl" ;; - *) mode="glx" ;; -esac - -case "$(uname -m)" in - i?86) arch="linux32" ;; # Not supported anymore but you can build your own. - *) arch="linux64" ;; -esac - -xonotic="xonotic-${arch}-${mode}" - -set -- ./${xonotic} "${@}" - -xserver= -xlayout= - -setdisplay() -{ - VALUE=$1 - VALUE=${VALUE#\"} - VALUE=${VALUE%\"} - case "$VALUE" in - :*) - ;; - *) - VALUE=:$VALUE - ;; - esac - VALUE="$VALUE/" - xserver="${VALUE%%/*}" - xserver=${xserver#:} - xlayout=${VALUE#*/} - xlayout=${xlayout%/} -} - -# now how do we execute it? -if [ -r ~/.xonotic/data/config.cfg ]; then - while read -r CMD KEY VALUE; do - case "$CMD:$KEY" in - seta:vid_x11_display) - setdisplay "$VALUE" - ;; - esac - done < ~/.xonotic/data/config.cfg -fi - -m=0 -for X in "$@"; do - case "$m:$X" in - 0:+vid_x11_display) - m=1 - ;; - 0:+vid_x11_display\ *) - setdisplay "${X#+vid_x11_display }" - ;; - 1:*) - setdisplay "$X" - m=0 - ;; - *) - ;; - esac -done - -case "$xserver" in - '') - ;; - *[!0-9]*) - echo "Not using display ':$xserver': evil characters" - ;; - *) - msg= - lf=' -' - prefix= - - # check for a listening X server on that socket - if netstat -nl | grep -F " /tmp/.X11-unix/X$xserver" >/dev/null; then - # X server already exists - export DISPLAY=:$xserver - prefix="DISPLAY=:$xserver " - msg=$msg$lf"- Running Xonotic on already existing display :$xserver" - else - set -- startx "$@" -fullscreen -- ":$xserver" - msg=$msg$lf"- Running Xonotic on a newly created X server :$xserver." - case "$xlayout" in - '') - ;; - *[!A-Za-z0-9]*) - echo >&2 "Not using layout '$xlayout': evil characters" - xlayout= - ;; - *) - set -- "$@" -layout "$xlayout" - msg=$msg$lf"- Using the ServerLayout section named $xlayout." - ;; - esac - fi - - echo "X SERVER OVERRIDES IN EFFECT:$msg" - echo - echo "Resulting command line:" - echo " $prefix$*" - echo - echo "To undo these overrides, edit ~/.xonotic/data/config.cfg and remove the line" - echo "starting with 'seta vid_x11_display'." - echo - echo - ;; -esac - -# if pulseaudio -if [ -z "$SDL_AUDIODRIVER" ]; then - if ps -C pulseaudio >/dev/null; then - if ldd /usr/lib/libSDL.so 2>/dev/null | grep pulse >/dev/null; then - export SDL_AUDIODRIVER=pulse - fi - fi -fi - -exec "$@" diff --git a/xonotic-linux-sdl.sh b/xonotic-linux-sdl.sh deleted file mode 120000 index 41f63aaf..00000000 --- a/xonotic-linux-sdl.sh +++ /dev/null @@ -1 +0,0 @@ -xonotic-linux-glx.sh \ No newline at end of file diff --git a/xonotic-linux-sdl.sh b/xonotic-linux-sdl.sh new file mode 100755 index 00000000..e2213715 --- /dev/null +++ b/xonotic-linux-sdl.sh @@ -0,0 +1,130 @@ +#!/bin/sh + +path=`dirname "${0}"` +link=`readlink -f "${0}"` + +[ -n "${link}" ] && path=`dirname "${link}"` +cd "${path}" + +case "${0##*/}" in + *dedicated*) mode="dedicated" ;; + *) mode="sdl" ;; +esac + +case "$(uname -m)" in + i?86) arch="linux32" ;; # Not supported anymore but you can build your own. + *) arch="linux64" ;; +esac + +xonotic="xonotic-${arch}-${mode}" + +set -- ./${xonotic} "${@}" + +xserver= +xlayout= + +setdisplay() +{ + VALUE=$1 + VALUE=${VALUE#\"} + VALUE=${VALUE%\"} + case "$VALUE" in + :*) + ;; + *) + VALUE=:$VALUE + ;; + esac + VALUE="$VALUE/" + xserver="${VALUE%%/*}" + xserver=${xserver#:} + xlayout=${VALUE#*/} + xlayout=${xlayout%/} +} + +# now how do we execute it? +if [ -r ~/.xonotic/data/config.cfg ]; then + while read -r CMD KEY VALUE; do + case "$CMD:$KEY" in + seta:vid_x11_display) + setdisplay "$VALUE" + ;; + esac + done < ~/.xonotic/data/config.cfg +fi + +m=0 +for X in "$@"; do + case "$m:$X" in + 0:+vid_x11_display) + m=1 + ;; + 0:+vid_x11_display\ *) + setdisplay "${X#+vid_x11_display }" + ;; + 1:*) + setdisplay "$X" + m=0 + ;; + *) + ;; + esac +done + +case "$xserver" in + '') + ;; + *[!0-9]*) + echo "Not using display ':$xserver': evil characters" + ;; + *) + msg= + lf=' +' + prefix= + + # check for a listening X server on that socket + if netstat -nl | grep -F " /tmp/.X11-unix/X$xserver" >/dev/null; then + # X server already exists + export DISPLAY=:$xserver + prefix="DISPLAY=:$xserver " + msg=$msg$lf"- Running Xonotic on already existing display :$xserver" + else + set -- startx "$@" -fullscreen -- ":$xserver" + msg=$msg$lf"- Running Xonotic on a newly created X server :$xserver." + case "$xlayout" in + '') + ;; + *[!A-Za-z0-9]*) + echo >&2 "Not using layout '$xlayout': evil characters" + xlayout= + ;; + *) + set -- "$@" -layout "$xlayout" + msg=$msg$lf"- Using the ServerLayout section named $xlayout." + ;; + esac + fi + + echo "X SERVER OVERRIDES IN EFFECT:$msg" + echo + echo "Resulting command line:" + echo " $prefix$*" + echo + echo "To undo these overrides, edit ~/.xonotic/data/config.cfg and remove the line" + echo "starting with 'seta vid_x11_display'." + echo + echo + ;; +esac + +# if pulseaudio +if [ -z "$SDL_AUDIODRIVER" ]; then + if ps -C pulseaudio >/dev/null; then + if ldd /usr/lib/libSDL.so 2>/dev/null | grep pulse >/dev/null; then + export SDL_AUDIODRIVER=pulse + fi + fi +fi + +exec "$@" -- 2.39.2