From c633ec33a859affb02a01f06b0c43e3a728b1cd2 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 18 Aug 2019 16:53:12 +1000 Subject: [PATCH] Restore the GLX binary on Linux systems --- Docs/faq.md | 6 +++--- Makefile | 7 +++++++ misc/logos/xonotic-glx.desktop | 10 ++++++++++ misc/tools/all/release.subr | 5 ++++- misc/tools/all/xonotic.subr | 17 ++++++++++++++--- misc/tools/all/zsh_autocompletion/all/_all | 4 ++-- release.cmake | 1 + xonotic-linux-dedicated.sh | 2 +- xonotic-linux-glx.sh | 1 + xonotic-linux-sdl.sh | 1 + 10 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 misc/logos/xonotic-glx.desktop create mode 100644 xonotic-linux-glx.sh diff --git a/Docs/faq.md b/Docs/faq.md index 255a4099..e515db4c 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-sdl.sh. +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. ## 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-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 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 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 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 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. ## How do I open the console? diff --git a/Makefile b/Makefile index a9d6a22c..2c77a917 100644 --- a/Makefile +++ b/Makefile @@ -85,25 +85,31 @@ 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 @@ -111,6 +117,7 @@ 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 new file mode 100644 index 00000000..b8656f81 --- /dev/null +++ b/misc/logos/xonotic-glx.desktop @@ -0,0 +1,10 @@ +[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 4fd05e9b..0b30a9bd 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-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-glx.sh 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,6 +221,7 @@ 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 ;; @@ -228,6 +229,7 @@ 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 ;; @@ -242,6 +244,7 @@ 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 1dd14a9a..b9ddd8a3 100644 --- a/misc/tools/all/xonotic.subr +++ b/misc/tools/all/xonotic.subr @@ -83,9 +83,13 @@ 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" + elif [ -n "$WE_HATE_OUR_USERS" ]; then + TARGETS="sv-$debug sdl-$debug" + else + TARGETS="sv-$debug cl-$debug sdl-$debug" fi if [ $# -gt 0 ] && [ x"$1" = x"" ]; then @@ -102,6 +106,9 @@ case "$cmd" in sdl) TARGETS="$TARGETS sdl-$debug" ;; + glx) + TARGETS="$TARGETS cl-$debug" + ;; dedicated) TARGETS="$TARGETS sv-$debug" ;; @@ -321,6 +328,10 @@ case "$cmd" in sdl) shift ;; + glx) + client=-$1 + shift + ;; esac if ! [ -x "darkplaces/darkplaces$client" ]; then @@ -373,9 +384,9 @@ case "$cmd" in fi ;; help) - $ECHO " $SELF compile [-c] [-qc] [-r|-p] [-0] [-1] [sdl|dedicated]" + $ECHO " $SELF compile [-c] [-qc] [-r|-p] [-0] [-1] [sdl|glx|dedicated]" $ECHO " $SELF update-maps" - $ECHO " $SELF run [sdl|dedicated] options..." + $ECHO " $SELF run [sdl|glx|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 7a1a4ca2..7cd8ec2e 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 dedicated)' && ret=0 + '1:Version:(sdl glx dedicated)' && ret=0 ;; compile) _arguments \ - '1:Version:(sdl dedicated)' \ + '1:Version:(sdl glx dedicated)' \ "-0[don't use precompiled d0_blind_id]" \ "-1[don't compile d0_blind_id]" \ '-c[clean all before building]' \ diff --git a/release.cmake b/release.cmake index 8e40ad2c..e1c41973 100644 --- a/release.cmake +++ b/release.cmake @@ -66,6 +66,7 @@ if (0) 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 f516fa9b..41f63aaf 120000 --- a/xonotic-linux-dedicated.sh +++ b/xonotic-linux-dedicated.sh @@ -1 +1 @@ -xonotic-linux-sdl.sh \ No newline at end of file +xonotic-linux-glx.sh \ No newline at end of file diff --git a/xonotic-linux-glx.sh b/xonotic-linux-glx.sh new file mode 100644 index 00000000..f516fa9b --- /dev/null +++ b/xonotic-linux-glx.sh @@ -0,0 +1 @@ +xonotic-linux-sdl.sh \ No newline at end of file diff --git a/xonotic-linux-sdl.sh b/xonotic-linux-sdl.sh index e2213715..e4ae857e 100755 --- a/xonotic-linux-sdl.sh +++ b/xonotic-linux-sdl.sh @@ -8,6 +8,7 @@ cd "${path}" case "${0##*/}" in *dedicated*) mode="dedicated" ;; + *glx*) mode="glx" ;; *) mode="sdl" ;; esac -- 2.39.2