diff --git a/Makefile b/Makefile index ce96bb276b..b2e49478a1 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ CFLAGS = -g -Wall .SUFFIXES: core: game renderers mod_ra mod_cnc tools: editor ralint seqed filex tsbuild utility -package: fixheader core editor utility winlaunch +package: fixheader core editor utility winlaunch gtklaunch mods: mod_ra mod_cnc all: core tools winlaunch clean: @@ -216,12 +216,13 @@ INSTALL_DIR = $(DESTDIR)$(datadir)/openra INSTALL = install INSTALL_PROGRAM = $(INSTALL) CORE = fileformats rcg rgl rnull game editor utility winlaunch -install: all +install: all gtklaunch @-echo "Installing OpenRA to $(INSTALL_DIR)" @$(INSTALL_PROGRAM) -d $(INSTALL_DIR) @$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR) @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc @$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(INSTALL_DIR)/mods/cnc + @$(INSTALL_PROGRAM) gtklaunch $(INSTALL_DIR) @-cp $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc @cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc @@ -251,19 +252,10 @@ install: all @echo "#!/bin/sh" > openra @echo "cd "$(datadir)"/openra" >> openra - @echo "mono "$(datadir)"/openra/OpenRA.Game.exe SupportDir=~/.openra \"$$""@\"" >> openra + @echo "./gtklaunch" >> openra @$(INSTALL_PROGRAM) -d $(BIN_INSTALL_DIR) @$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR) - @echo "OpenRA is now installed. You will now want to download" - @echo "http://open-ra.org/get-dependency.php?file=ra-packages and" - @echo "http://open-ra.org/get-dependency.php?file=cnc-packages" - @echo "and extract their contents to" - @echo "$(INSTALL_DIR)/mods/ra/packages and " - @echo "$(INSTALL_DIR)/mods/cnc/packages respectively." - @echo "It is also advised to install the contents of $(INSTALL_DIR)/thirdparty to the Mono Global Assembly Cache \ - with gacutil." - uninstall: @-rm -r $(INSTALL_DIR) @-rm $(DESTDIR)$(bindir)/openra diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 2c1cd59137..2015683f1a 100644 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -15,7 +15,7 @@ rm -rf root # Game files mkdir -p root/usr/bin/ -cp openra root/usr/bin/ +cp openra-bin root/usr/bin/openra mkdir -p root/usr/share/openra/ cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3 @@ -24,13 +24,11 @@ rm root/usr/share/openra/OpenRA.Launcher.exe # Desktop Icons mkdir -p root/usr/share/applications/ -sed "s/{VERSION}/$VERSION/" openra-ra.desktop > root/usr/share/applications/openra-ra.desktop -sed "s/{VERSION}/$VERSION/" openra-cnc.desktop > root/usr/share/applications/openra-cnc.desktop +sed "s/{VERSION}/$VERSION/" openra.desktop > root/usr/share/applications/openra.desktop # Menu entries mkdir -p root/usr/share/menu/ -cp openra-ra root/usr/share/menu/ -cp openra-cnc root/usr/share/menu/ +cp openra root/usr/share/menu/ # Icon images mkdir -p root/usr/share/pixmaps/ diff --git a/packaging/linux/deb/DEBIAN/control b/packaging/linux/deb/DEBIAN/control index 085c9ef863..5bdccb0bcb 100644 --- a/packaging/linux/deb/DEBIAN/control +++ b/packaging/linux/deb/DEBIAN/control @@ -4,7 +4,7 @@ Architecture: all Maintainer: Matthew Bowra-Dean Uploaders: Maikel van den Hout , Paul Chote Installed-Size: {SIZE} -Depends: libopenal1, mono-runtime, libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, zenity, wget, unzip +Depends: libopenal1, mono-runtime, libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, libmono-i18n2.0-cil Section: games Priority: extra Homepage: http://www.open-ra.org/ diff --git a/packaging/linux/deb/DEBIAN/postinst b/packaging/linux/deb/DEBIAN/postinst index 2faeb8d98b..d0d5f4dfe3 100755 --- a/packaging/linux/deb/DEBIAN/postinst +++ b/packaging/linux/deb/DEBIAN/postinst @@ -5,25 +5,3 @@ if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi # End automatically added section - -start_directory=$( pwd ) -cd /usr/share/openra - -anw=`zenity --question --text "Download and install RA packages?"; echo $?` -if [ $anw = 0 ] ; then - mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=ra-packages,/tmp/ra-packages.zip - mono OpenRA.Utility.exe --extract-zip=/tmp/ra-packages.zip,ra/packages/ - else - zenity --info --text "The Red Alert packages need to be manually installed before it will work.\nSee the OpenRA website for more information." - break -fi - - -anw=`zenity --question --text "Download and install C&C packages?"; echo $?` -if [ $anw = 0 ] ; then - mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=cnc-packages,/tmp/cnc-packages.zip - mono OpenRA.Utility.exe --extract-zip=/tmp/cnc-packages.zip,cnc/packages/ - else - zenity --info --text "The C&C packages need to be manually installed before it will work.\nSee the OpenRA website for more information." - break -fi diff --git a/packaging/linux/openra b/packaging/linux/openra index 7a862c550a..7556655771 100755 --- a/packaging/linux/openra +++ b/packaging/linux/openra @@ -1,3 +1,2 @@ -#!/bin/sh -cd /usr/share/openra -mono /usr/share/openra/OpenRA.Game.exe SupportDir=~/.openra "$@" \ No newline at end of file +?package(openra):needs="X11" section="Games/Simulation" title="OpenRA"\ +command="/usr/bin/openra" icon="/usr/share/pixmaps/openra.32.xpm" diff --git a/packaging/linux/openra-bin b/packaging/linux/openra-bin new file mode 100644 index 0000000000..6427a55f84 --- /dev/null +++ b/packaging/linux/openra-bin @@ -0,0 +1,3 @@ +#!/bin/sh +cd /usr/share/openra +./gtklaunch diff --git a/packaging/linux/openra-cnc b/packaging/linux/openra-cnc deleted file mode 100644 index be05d12ad4..0000000000 --- a/packaging/linux/openra-cnc +++ /dev/null @@ -1,2 +0,0 @@ -?package(openra):needs="X11" section="Games/Simulation" title="OpenRA - Command & Conquer"\ -command="/usr/bin/openra Game.Mods=cnc" icon="/usr/share/pixmaps/openra.32.xpm" diff --git a/packaging/linux/openra-cnc.desktop b/packaging/linux/openra-cnc.desktop deleted file mode 100644 index d476ed9e6a..0000000000 --- a/packaging/linux/openra-cnc.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -Version={VERSION} -Name=OpenRA - Command & Conquer -Comment=The OpenRA RTS engine running Command & Conquer -Icon=openra -Exec=/usr/bin/openra Game.Mods=cnc -Terminal=false -Categories=Game; diff --git a/packaging/linux/openra-ra b/packaging/linux/openra-ra deleted file mode 100644 index 26aceb86b1..0000000000 --- a/packaging/linux/openra-ra +++ /dev/null @@ -1,2 +0,0 @@ -?package(openra):needs="X11" section="Games/Simulation" title="OpenRA - Red Alert"\ -command="/usr/bin/openra Game.Mods=ra" icon="/usr/share/pixmaps/openra.32.xpm" diff --git a/packaging/linux/openra-ra.desktop b/packaging/linux/openra-ra.desktop deleted file mode 100644 index b56bc3b904..0000000000 --- a/packaging/linux/openra-ra.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -Version={VERSION} -Name=OpenRA - Red Alert -Comment=The OpenRA RTS engine running Red Alert -Icon=openra -Exec=/usr/bin/openra Game.Mods=ra -Terminal=false -Categories=Game; diff --git a/packaging/linux/openra.desktop b/packaging/linux/openra.desktop new file mode 100644 index 0000000000..fb67ce6548 --- /dev/null +++ b/packaging/linux/openra.desktop @@ -0,0 +1,11 @@ + +[Desktop Entry] +Type=Application +Version={VERSION} +Name=OpenRA +Comment=The OpenRA RTS engine launcher +Icon=openra +Exec=/usr/bin/openra +Terminal=false +Categories=Game; +Name[en_NZ]=openra.desktop diff --git a/packaging/linux/pkgbuild/PKGBUILD b/packaging/linux/pkgbuild/PKGBUILD index 1fdeb8fd50..b0e84ec461 100644 --- a/packaging/linux/pkgbuild/PKGBUILD +++ b/packaging/linux/pkgbuild/PKGBUILD @@ -15,7 +15,6 @@ conflicts=() replaces=() backup=() options=() -install=openra.install source=() noextract=() md5sums=() diff --git a/packaging/linux/pkgbuild/openra.install b/packaging/linux/pkgbuild/openra.install deleted file mode 100644 index fd42e5a09a..0000000000 --- a/packaging/linux/pkgbuild/openra.install +++ /dev/null @@ -1,35 +0,0 @@ -# arg 1: the new package version -post_install() { - cd $pkgdir/usr/share/openra - while true - do - read -s -n1 -p "Download and install RA packages? [Y/n]" - case $REPLY in - y|Y|"") - mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=ra-packages,/tmp/ra-packages.zip - mono OpenRA.Utility.exe --extract-zip=/tmp/ra-packages.zip,ra/packages/ - break;; - n|N) - echo "The RA packages will need to be manually extracted from http://open-ra.org/get-dependency.php?file=ra-packages \ - to /usr/share/openra/mods/ra/packages before the RA mod will work." - break;; - *) echo "Please enter y or n.";; - esac - done - - while true - do - read -s -n1 -p "Download and install C&C packages? [Y/n]" - case $REPLY in - y|Y|"") - mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=cnc-packages,/tmp/cnc-packages.zip - mono OpenRA.Utility.exe --extract-zip=/tmp/cnc-packages.zip,cnc/packages/ - break;; - n|N) - echo "The C&C packages will need to be manually extracted from http://open-ra.org/get-dependency.php?file=cnc-packages \ - to /usr/share/openra/mods/cnc/packages before the C&C mod will work." - break;; - *) echo "Please enter y or n.";; - esac - done -} diff --git a/packaging/linux/rpm/openra.spec b/packaging/linux/rpm/openra.spec index 1f4ad0e488..e3000c24f9 100644 --- a/packaging/linux/rpm/openra.spec +++ b/packaging/linux/rpm/openra.spec @@ -28,38 +28,4 @@ cp -r %{root} $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT -%post -cd $RPM_BUILD_ROOT/usr/share/openra -while true -do - read -s -n1 -p "Download and install RA packages? [Y/n]" - case $REPLY in - y|Y|"") - mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=ra-packages,/tmp/ra-packages.zip - mono OpenRA.Utility.exe --extract-zip=/tmp/ra-packages.zip,ra/packages/ - break;; - n|N) - echo "The RA packages will need to be manually extracted from http://open-ra.org/get-dependency.php?file=ra-packages \ - to /usr/share/openra/mods/ra/packages before the RA mod will work." - break;; - *) echo "Please enter y or n.";; - esac -done - -while true -do - read -s -n1 -p "Download and install C&C packages? [Y/n]" - case $REPLY in - y|Y|"") - mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=cnc-packages,/tmp/cnc-packages.zip - mono OpenRA.Utility.exe --extract-zip=/tmp/cnc-packages.zip,cnc/packages/ - break;; - n|N) - echo "The C&C packages will need to be manually extracted from http://open-ra.org/get-dependency.php?file=cnc-packages \ - to /usr/share/openra/mods/cnc/packages before the C&C mod will work." - break;; - *) echo "Please enter y or n.";; - esac -done - %files diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh index 67d6eac2ee..397263ea66 100755 --- a/packaging/osx/buildpackage.sh +++ b/packaging/osx/buildpackage.sh @@ -17,10 +17,11 @@ fi cp -rv ../../OpenRA.Launcher.Mac/build/Release/OpenRA.app OpenRA.app cp -rv $2/* "OpenRA.app/Contents/Resources/" || exit 3 -# Icon isn't used, and editor doesn't work, OpenRA.Launcher is Windows specific. +# Icon isn't used, and editor doesn't work, OpenRA.Launcher is Windows specific, gtklaunch is Linux specific. rm OpenRA.app/Contents/Resources/OpenRA.ico rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe rm OpenRA.app/Contents/Resources/OpenRA.Launcher.exe +rm OpenRA.app/Contents/Resources/gtklaunch # 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 b2cba0f2ee..38cc3f351c 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -28,7 +28,7 @@ find . -path "*.mdb" -delete # they are now installed to the game directory instead of placed in the gac FILES="OpenRA.Launcher.exe OpenRA.Game.exe OpenRA.Editor.exe OpenRA.Utility.exe OpenRA.Renderer.Cg.dll \ OpenRA.Renderer.Gl.dll OpenRA.Renderer.Null.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf \ -cg glsl mods/ra mods/cnc COPYING HACKING INSTALL" +cg glsl mods/ra mods/cnc COPYING HACKING INSTALL gtklaunch" echo "Copying files..." for i in $FILES; do