diff --git a/Makefile b/Makefile index 5ab9c331f5..cdfb51620b 100644 --- a/Makefile +++ b/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 diff --git a/OpenRA.Game/Platform.cs b/OpenRA.Game/Platform.cs index be1e52f53b..d8a30889b0 100644 --- a/OpenRA.Game/Platform.cs +++ b/OpenRA.Game/Platform.cs @@ -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; diff --git a/error-dialog.sh b/error-dialog.sh new file mode 100755 index 0000000000..371ea3f178 --- /dev/null +++ b/error-dialog.sh @@ -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 \ No newline at end of file diff --git a/launch-dedicated.sh b/launch-dedicated.sh index 780770d769..51285222df 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -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" diff --git a/launch-editor.sh b/launch-editor.sh index f700b0ff9c..c390cb1ae0 100755 --- a/launch-editor.sh +++ b/launch-editor.sh @@ -1,2 +1,3 @@ #!/bin/sh +# launch script (executed by Desura) exec mono OpenRA.Editor.exe "$@" \ No newline at end of file diff --git a/launch-game.sh b/launch-game.sh index ae207f3f9b..090f030f69 100755 --- a/launch-game.sh +++ b/launch-game.sh @@ -1,2 +1,3 @@ #!/bin/sh +# launch script (executed by Desura) exec mono OpenRA.Game.exe Server.Dedicated=False Server.DedicatedLoop=False "$@" \ No newline at end of file diff --git a/launch-replay.sh b/launch-replay.sh index 2190b61bb6..6c1af06098 100755 --- a/launch-replay.sh +++ b/launch-replay.sh @@ -1,3 +1,4 @@ #!/bin/bash +# TODO choose the correct Game.Mod instead of crashing cd ${0%/*} exec mono OpenRA.Game.exe Launch.Replay="$@" \ No newline at end of file diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 7498cccf26..cc38f3f577 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -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/ diff --git a/packaging/linux/deb/DEBIAN/control b/packaging/linux/deb/DEBIAN/control index 0252c2ea77..ef487f9cbf 100644 --- a/packaging/linux/deb/DEBIAN/control +++ b/packaging/linux/deb/DEBIAN/control @@ -3,7 +3,7 @@ Version: {VERSION} Architecture: all Maintainer: Chris Forbes 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/ diff --git a/packaging/linux/pkgbuild/PKGBUILD b/packaging/linux/pkgbuild/PKGBUILD index 030b4b4801..dcbb1f1555 100644 --- a/packaging/linux/pkgbuild/PKGBUILD +++ b/packaging/linux/pkgbuild/PKGBUILD @@ -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') diff --git a/packaging/linux/rpm/openra.spec b/packaging/linux/rpm/openra.spec index 81c946331e..1267d459ad 100644 --- a/packaging/linux/rpm/openra.spec +++ b/packaging/linux/rpm/openra.spec @@ -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 diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh index c076f31894..d5c943a208 100755 --- a/packaging/osx/buildpackage.sh +++ b/packaging/osx/buildpackage.sh @@ -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 diff --git a/packaging/package-all.sh b/packaging/package-all.sh index d151e95847..5feda0b25a 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -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