Updated linux packaging scripts to remove the need for post install actions and to use the launcher.
This commit is contained in:
committed by
Chris Forbes
parent
a3e67611e6
commit
ecea2471ca
16
Makefile
16
Makefile
@@ -10,7 +10,7 @@ CFLAGS = -g -Wall
|
|||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
core: game renderers mod_ra mod_cnc
|
core: game renderers mod_ra mod_cnc
|
||||||
tools: editor ralint seqed filex tsbuild utility
|
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
|
mods: mod_ra mod_cnc
|
||||||
all: core tools winlaunch
|
all: core tools winlaunch
|
||||||
clean:
|
clean:
|
||||||
@@ -216,12 +216,13 @@ INSTALL_DIR = $(DESTDIR)$(datadir)/openra
|
|||||||
INSTALL = install
|
INSTALL = install
|
||||||
INSTALL_PROGRAM = $(INSTALL)
|
INSTALL_PROGRAM = $(INSTALL)
|
||||||
CORE = fileformats rcg rgl rnull game editor utility winlaunch
|
CORE = fileformats rcg rgl rnull game editor utility winlaunch
|
||||||
install: all
|
install: all gtklaunch
|
||||||
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
|
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
|
||||||
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
|
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
|
||||||
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
|
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
|
||||||
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(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 $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc
|
||||||
@cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc
|
@cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc
|
||||||
@@ -251,19 +252,10 @@ install: all
|
|||||||
|
|
||||||
@echo "#!/bin/sh" > openra
|
@echo "#!/bin/sh" > openra
|
||||||
@echo "cd "$(datadir)"/openra" >> 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) -d $(BIN_INSTALL_DIR)
|
||||||
@$(INSTALL_PROGRAM) -m +rx openra $(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:
|
uninstall:
|
||||||
@-rm -r $(INSTALL_DIR)
|
@-rm -r $(INSTALL_DIR)
|
||||||
@-rm $(DESTDIR)$(bindir)/openra
|
@-rm $(DESTDIR)$(bindir)/openra
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ rm -rf root
|
|||||||
|
|
||||||
# Game files
|
# Game files
|
||||||
mkdir -p root/usr/bin/
|
mkdir -p root/usr/bin/
|
||||||
cp openra root/usr/bin/
|
cp openra-bin root/usr/bin/openra
|
||||||
mkdir -p root/usr/share/openra/
|
mkdir -p root/usr/share/openra/
|
||||||
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
|
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
|
||||||
|
|
||||||
@@ -24,13 +24,11 @@ rm root/usr/share/openra/OpenRA.Launcher.exe
|
|||||||
|
|
||||||
# Desktop Icons
|
# Desktop Icons
|
||||||
mkdir -p root/usr/share/applications/
|
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.desktop > root/usr/share/applications/openra.desktop
|
||||||
sed "s/{VERSION}/$VERSION/" openra-cnc.desktop > root/usr/share/applications/openra-cnc.desktop
|
|
||||||
|
|
||||||
# Menu entries
|
# Menu entries
|
||||||
mkdir -p root/usr/share/menu/
|
mkdir -p root/usr/share/menu/
|
||||||
cp openra-ra root/usr/share/menu/
|
cp openra root/usr/share/menu/
|
||||||
cp openra-cnc root/usr/share/menu/
|
|
||||||
|
|
||||||
# Icon images
|
# Icon images
|
||||||
mkdir -p root/usr/share/pixmaps/
|
mkdir -p root/usr/share/pixmaps/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Architecture: all
|
|||||||
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
||||||
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>, Paul Chote <sleipnir@sleipnirstuff.com>
|
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>, Paul Chote <sleipnir@sleipnirstuff.com>
|
||||||
Installed-Size: {SIZE}
|
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
|
Section: games
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Homepage: http://www.open-ra.org/
|
Homepage: http://www.open-ra.org/
|
||||||
|
|||||||
@@ -5,25 +5,3 @@ if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
|
|||||||
update-menus
|
update-menus
|
||||||
fi
|
fi
|
||||||
# End automatically added section
|
# 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
|
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
#!/bin/sh
|
?package(openra):needs="X11" section="Games/Simulation" title="OpenRA"\
|
||||||
cd /usr/share/openra
|
command="/usr/bin/openra" icon="/usr/share/pixmaps/openra.32.xpm"
|
||||||
mono /usr/share/openra/OpenRA.Game.exe SupportDir=~/.openra "$@"
|
|
||||||
|
|||||||
3
packaging/linux/openra-bin
Normal file
3
packaging/linux/openra-bin
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd /usr/share/openra
|
||||||
|
./gtklaunch
|
||||||
@@ -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"
|
|
||||||
@@ -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;
|
|
||||||
@@ -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"
|
|
||||||
@@ -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;
|
|
||||||
11
packaging/linux/openra.desktop
Normal file
11
packaging/linux/openra.desktop
Normal file
@@ -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
|
||||||
@@ -15,7 +15,6 @@ conflicts=()
|
|||||||
replaces=()
|
replaces=()
|
||||||
backup=()
|
backup=()
|
||||||
options=()
|
options=()
|
||||||
install=openra.install
|
|
||||||
source=()
|
source=()
|
||||||
noextract=()
|
noextract=()
|
||||||
md5sums=()
|
md5sums=()
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
|
||||||
@@ -28,38 +28,4 @@ cp -r %{root} $RPM_BUILD_ROOT
|
|||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
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
|
%files
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ fi
|
|||||||
cp -rv ../../OpenRA.Launcher.Mac/build/Release/OpenRA.app OpenRA.app
|
cp -rv ../../OpenRA.Launcher.Mac/build/Release/OpenRA.app OpenRA.app
|
||||||
cp -rv $2/* "OpenRA.app/Contents/Resources/" || exit 3
|
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.ico
|
||||||
rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe
|
rm OpenRA.app/Contents/Resources/OpenRA.Editor.exe
|
||||||
rm OpenRA.app/Contents/Resources/OpenRA.Launcher.exe
|
rm OpenRA.app/Contents/Resources/OpenRA.Launcher.exe
|
||||||
|
rm OpenRA.app/Contents/Resources/gtklaunch
|
||||||
|
|
||||||
# Package app bundle into a zip and clean up
|
# Package app bundle into a zip and clean up
|
||||||
zip OpenRA-$1 -r -9 OpenRA.app
|
zip OpenRA-$1 -r -9 OpenRA.app
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ find . -path "*.mdb" -delete
|
|||||||
# they are now installed to the game directory instead of placed in the gac
|
# 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 \
|
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 \
|
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..."
|
echo "Copying files..."
|
||||||
for i in $FILES; do
|
for i in $FILES; do
|
||||||
|
|||||||
Reference in New Issue
Block a user