GH-1096 make ubuntu package work on both 32bit and 64bit machines

This commit is contained in:
Petr Mrázek
2015-06-28 22:44:53 +02:00
parent d403d12d6a
commit bbba63eca5
7 changed files with 46 additions and 28 deletions

View File

@ -0,0 +1,11 @@
Package: multimc
Version: 1.1-1
Architecture: all
Maintainer: Petr Mrázek <peterix@gmail.com>
Section: games
Priority: optional
Installed-Size: 75
Depends: zenity, default-jre
Homepage: http://multimc.org
Description: A local install wrapper for MultiMC

View File

@ -0,0 +1,3 @@
#!/bin/sh
set -e
update-desktop-database

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -0,0 +1,32 @@
#!/bin/bash
INSTDIR=~/.multimc
if [ `getconf LONG_BIT` = "64" ]
then
PACKAGE="mmc-stable-lin64.tar.gz"
else
PACKAGE="mmc-stable-lin32.tar.gz"
fi
deploy() {
mkdir -p $INSTDIR
cd ${INSTDIR}
wget --progress=dot:force "http://files.multimc.org/downloads/${PACKAGE}" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --auto-close --auto-kill --title="Downloading MultiMC..."
tar -xzf ${PACKAGE} --transform='s,MultiMC/,,'
rm ${PACKAGE}
chmod +x MultiMC
./MultiMC
}
runmmc() {
cd ${INSTDIR}
./MultiMC
}
if [[ ! -f ${INSTDIR}/MultiMC ]]; then
deploy
else
runmmc
fi

View File

@ -0,0 +1,16 @@
[Desktop Entry]
Categories=Game;
Exec=/opt/multimc/run.sh
Icon=/opt/multimc/icon.svg
Keywords=game;
MimeType=
Name=MultiMC 5
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=