Merge pull request #5252 from Mailaender/zenity
Added native Gtk+ crash dialogs on Linux
This commit is contained in:
13
Makefile
13
Makefile
@@ -66,7 +66,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755
|
||||
INSTALL_DATA = $(INSTALL) -m644
|
||||
|
||||
# program targets
|
||||
CORE = rsdl2 rnull game utility irc crashdialog
|
||||
CORE = rsdl2 rnull game utility irc
|
||||
TOOLS = editor tsbuild ralint
|
||||
|
||||
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
|
||||
@@ -253,11 +253,11 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
|
||||
#
|
||||
default: dependencies core
|
||||
|
||||
core: game renderers mods utility crashdialog
|
||||
core: game renderers mods utility ralint
|
||||
|
||||
tools: editor tsbuild ralint
|
||||
tools: editor tsbuild crashdialog
|
||||
|
||||
package: dependencies core editor docs version
|
||||
package: dependencies core editor crashdialog docs version
|
||||
|
||||
mods: mod_ra mod_cnc mod_d2k mod_ts
|
||||
|
||||
@@ -327,6 +327,11 @@ install-core: default
|
||||
@$(INSTALL_PROGRAM) thirdparty/MaxMind.GeoIP2.dll "$(DATA_INSTALL_DIR)"
|
||||
@$(INSTALL_PROGRAM) thirdparty/Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
|
||||
@$(INSTALL_PROGRAM) thirdparty/RestSharp.dll "$(DATA_INSTALL_DIR)"
|
||||
@$(CP) thirdparty/${platformdeps}/* "$(DATA_INSTALL_DIR)"
|
||||
|
||||
ifeq ($(shell uname),Linux)
|
||||
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
|
||||
endif
|
||||
|
||||
@echo "#!/bin/sh" > openra
|
||||
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra
|
||||
|
||||
@@ -129,6 +129,9 @@ namespace OpenRA
|
||||
).F(title, message, icon, logsButton, logsPath, faqButton, faqPath, quitButton);
|
||||
}
|
||||
|
||||
if (CurrentPlatform == PlatformType.Linux)
|
||||
process = "error-dialog.sh";
|
||||
|
||||
var psi = new ProcessStartInfo(process, args);
|
||||
psi.UseShellExecute = false;
|
||||
psi.CreateNoWindow = true;
|
||||
|
||||
3
error-dialog.sh
Executable file
3
error-dialog.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
ZENITY=`which zenity` || echo "OpenRA needs zenity installed to display a graphical error dialog. See ~/.openra. for log files."
|
||||
$ZENITY --question --title "OpenRA" --text "OpenRA has encountered a fatal error.\nLog Files are available in ~/.openra." --ok-label "Quit" --cancel-label "View FAQ" || xdg-open https://github.com/OpenRA/OpenRA/wiki/FAQ
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
# example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated for details
|
||||
Name="Dedicated-Server"
|
||||
Mod="ra"
|
||||
Dedicated="True"
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
#!/bin/sh
|
||||
# launch script (executed by Desura)
|
||||
exec mono OpenRA.Editor.exe "$@"
|
||||
@@ -1,2 +1,3 @@
|
||||
#!/bin/sh
|
||||
# launch script (executed by Desura)
|
||||
exec mono OpenRA.Game.exe Server.Dedicated=False Server.DedicatedLoop=False "$@"
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
# TODO choose the correct Game.Mod instead of crashing
|
||||
cd ${0%/*}
|
||||
exec mono OpenRA.Game.exe Launch.Replay="$@"
|
||||
@@ -21,15 +21,12 @@ cd ../..
|
||||
# Copy files for OpenRA.Game.exe and OpenRA.Editor.exe as well as all dependencies.
|
||||
make install-all prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
||||
|
||||
# Native library dependencies
|
||||
cp "$DEPSDIR"/* "$PWD/packaging/linux/$ROOTDIR/usr/lib/openra/" || exit 3
|
||||
|
||||
# Launch scripts (executed by Desura)
|
||||
cp *.sh "$PWD/packaging/linux/$ROOTDIR/usr/lib/openra/" || exit 3
|
||||
|
||||
# Icons and .desktop files
|
||||
make install-shortcuts prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR"
|
||||
|
||||
# Remove the WinForms dialog which is replaced with a native one provided by zenity
|
||||
rm $PWD/packaging/linux/$ROOTDIR/usr/lib/openra/OpenRA.CrashDialog.exe
|
||||
|
||||
# Documentation
|
||||
mkdir -p $PWD/packaging/linux/$ROOTDIR/usr/share/doc/openra/
|
||||
cp *.html $PWD/packaging/linux/$ROOTDIR/usr/share/doc/openra/
|
||||
|
||||
@@ -3,7 +3,7 @@ Version: {VERSION}
|
||||
Architecture: all
|
||||
Maintainer: Chris Forbes <chrisf@ijw.co.nz>
|
||||
Installed-Size: {SIZE}
|
||||
Depends: libopenal1, mono-runtime (>= 2.10), libmono-system-core4.0-cil, libmono-system-drawing4.0-cil, libmono-system-windows-forms4.0-cil, libfreetype6, libc6, libasound2, libgl1-mesa-glx, libgl1-mesa-dri
|
||||
Depends: libopenal1, mono-runtime (>= 2.10), libmono-system-core4.0-cil, libmono-system-drawing4.0-cil, libmono-system-windows-forms4.0-cil, libfreetype6, libc6, libasound2, libgl1-mesa-glx, libgl1-mesa-dri, xdg-utils, zenity
|
||||
Section: games
|
||||
Priority: extra
|
||||
Homepage: http://www.open-ra.org/
|
||||
|
||||
@@ -7,7 +7,7 @@ arch=('any')
|
||||
url="http://open-ra.org"
|
||||
license=('GPL3')
|
||||
groups=()
|
||||
depends=('mono' 'openal' 'mesa' 'freetype2' 'glibc' 'alsa-lib')
|
||||
depends=('mono' 'openal' 'mesa' 'freetype2' 'glibc' 'alsa-lib' 'xdg-utils' 'zenity')
|
||||
makedepends=('git' 'unzip' 'wget')
|
||||
optdepends=('gksu: Elevation for installing game packages on Gnome platforms'
|
||||
'kdesudo: Elevation for installing game packages on KDE platforms')
|
||||
|
||||
@@ -22,6 +22,8 @@ Requires: libdl.so.2
|
||||
Requires: libm.so.6
|
||||
Requires: libpthread.so.0
|
||||
Requires: librt.so.1
|
||||
Requires: xdg-utils
|
||||
Requires: zenity
|
||||
|
||||
Prefix: /usr
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
|
||||
@@ -16,9 +16,11 @@ fi
|
||||
cp -rv template.app OpenRA.app
|
||||
cp -rv $2/* $3/* "OpenRA.app/Contents/Resources/" || exit 3
|
||||
|
||||
# Icon isn't used, and editor doesn't work.
|
||||
# Remove unused icon
|
||||
rm OpenRA.app/Contents/Resources/OpenRA.ico
|
||||
# Remove broken WinForms applications
|
||||
rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe
|
||||
rm OpenRA.app/Contents/Resources/OpenRA.CrashDialog.exe
|
||||
|
||||
# Package app bundle into a zip and clean up
|
||||
zip OpenRA-$1 -r -9 OpenRA.app
|
||||
|
||||
@@ -21,7 +21,8 @@ make package
|
||||
# Remove the mdb files that are created during `make`
|
||||
find . -path "*.mdb" -delete
|
||||
|
||||
wget https://raw.github.com/wiki/OpenRA/OpenRA/Changelog.md
|
||||
rm Changelog.md
|
||||
wget https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md
|
||||
markdown Changelog.md > CHANGELOG.html
|
||||
markdown README.md > README.html
|
||||
markdown CONTRIBUTING.md > CONTRIBUTING.html
|
||||
|
||||
Reference in New Issue
Block a user