diff options
author | Sandy Carter | 2015-08-17 17:42:05 -0400 |
---|---|---|
committer | Sandy Carter | 2015-08-17 17:42:05 -0400 |
commit | 643341cbda9ff0c7df1d090cbebde7a01e2ec0f5 (patch) | |
tree | bd2cf09106719140000702f984a71e8e0b032f5e | |
download | aur-643341cbda9ff0c7df1d090cbebde7a01e2ec0f5.tar.gz |
Initial heroes-of-might-and-magic-3 package
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 108 | ||||
-rw-r--r-- | gog-heroes-of-might-and-magic-3-complete-edition.install | 4 | ||||
-rwxr-xr-x | heroes-of-might-and-magic-3-complete-edition | 13 | ||||
-rwxr-xr-x | heroes-of-might-and-magic-3-complete-edition-campaign-editor | 11 | ||||
-rwxr-xr-x | heroes-of-might-and-magic-3-complete-edition-map-editor | 11 |
6 files changed, 175 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f880b7513870 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = gog-heroes-of-might-and-magic-3-complete-edition + pkgdesc = Heroes of Might & Magic III and its expansions: Armageddon's Blade and The Shadow of Death (with HD patch) + pkgver = 2.0.1.17 + pkgrel = 1 + url = https://www.gog.com/game/heroes_of_might_and_magic_3_complete_edition + arch = i686 + arch = x86_64 + groups = games + license = custom + makedepends = lgogdownloader-git + depends = wine + source = setup_homm3_complete_2.0.0.16.exe::gogdownloader://heroes_of_might_and_magic_3_complete_edition/en1installer1 + source = patch_heroes_of_might_and_magic_3_complete_2.0.1.17.exe::gogdownloader://heroes_of_might_and_magic_3_complete_edition/en1patch1 + source = https://sites.google.com/site/heroes3hd/files/HoMM3%20HD%20Latest.zip + source = heroes-of-might-and-magic-3-complete-edition + source = heroes-of-might-and-magic-3-complete-edition-map-editor + source = heroes-of-might-and-magic-3-complete-edition-campaign-editor + source = gog-heroes-of-might-and-magic-3-complete-edition.install + sha256sums = d90bed0fd7e5338045f5f9983fdc7390297025ac1accdbc2f9bbec217a066468 + sha256sums = 9c6ca90dacc621f0bb333a3f5fb6df8b06af2afee571beea14782c989177ff5a + sha256sums = 2b341cd4a0353bb988753ff8c13a8b40cb553dcb494451ed2c1cd6522ab5f4bd + sha256sums = 79d941eec1f590cd416b568b1b619ad7ed40230d3ddaf1cc7de1cb97ea9f1f4d + sha256sums = bc5f57dd8fe1c4cb9bc4f144eea686a61ccc19e5020e446796f8f4c79014c8be + sha256sums = f7b58168872ce04bfad2ef151632762d29735f3e165bc5c4cf887df68de62ed2 + sha256sums = 6c6d7f19bcca181ee5c1c51c9f15e8d12d95e1feabcd676d1a41fc377f050d37 + +pkgname = gog-heroes-of-might-and-magic-3-complete-edition + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6cca855ae2e7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,108 @@ +pkgname=gog-heroes-of-might-and-magic-3-complete-edition +pkgver=2.0.1.17 +pkgrel=1 +_gamename=${pkgname#gog-} +_gamename_=${_gamename//-/_} +_unpatchedver=2.0.0.16 + +pkgdesc="Heroes of Might & Magic III and its expansions: Armageddon's Blade and The Shadow of Death (with HD patch)" +arch=("i686" "x86_64") +url="https://www.gog.com/game/heroes_of_might_and_magic_3_complete_edition" +license=("custom") +groups=("games") + +source=("setup_homm3_complete_${_unpatchedver}.exe::gogdownloader://${_gamename_}/en1installer1" + "patch_${_gamename_%_edition}_${pkgver}.exe::gogdownloader://${_gamename_}/en1patch1" + "https://sites.google.com/site/heroes3hd/files/HoMM3%20HD%20Latest.zip" + "${_gamename}" + "${_gamename}-map-editor" + "${_gamename}-campaign-editor" + "${pkgname}.install") +sha256sums=('d90bed0fd7e5338045f5f9983fdc7390297025ac1accdbc2f9bbec217a066468' + '9c6ca90dacc621f0bb333a3f5fb6df8b06af2afee571beea14782c989177ff5a' + '2b341cd4a0353bb988753ff8c13a8b40cb553dcb494451ed2c1cd6522ab5f4bd' + '79d941eec1f590cd416b568b1b619ad7ed40230d3ddaf1cc7de1cb97ea9f1f4d' + 'bc5f57dd8fe1c4cb9bc4f144eea686a61ccc19e5020e446796f8f4c79014c8be' + 'f7b58168872ce04bfad2ef151632762d29735f3e165bc5c4cf887df68de62ed2' + '6c6d7f19bcca181ee5c1c51c9f15e8d12d95e1feabcd676d1a41fc377f050d37') +depends=(wine) + +# Register lgogdownloader as a download agent +DLAGENTS+=('gogdownloader::/usr/bin/lgogdownloader --download-file=%u -o %o') + +# Must be a version > 2.24 after commit 5c9488f +makedepends=(lgogdownloader-git) + +build() { + export WINEDEBUG=-all + export WINEPREFIX="$srcdir"/tmp/env + export XDG_DATA_HOME="$srcdir"/tmp/local + + install -m755 -d "$srcdir"/tmp "$srcdir"/tmp/env "$srcdir"/tmp/local + msg "Running GOG installer" + wine "$srcdir"/setup_homm3_complete_${_unpatchedver}.exe /verysilent + # Unfortunately, /verysilent doesn't prevent the installation is successful + # messagebox from showing up and blocking. Manual intervention is required + msg "Installing patches (don't launch game yet)" + wine "${srcdir}"/patch_${_gamename_%_edition}_${pkgver}.exe /verysilent + msg "Installing HD patch" + wine "${srcdir}/HoMM3 HD 3.808f build 10.exe" /verysilent + msg "Extracting HKEY_LOCAL_MACHINE registry" + regedit -e ${srcdir}/local_machine.reg "HKEY_LOCAL_MACHINE\Software\New World Computing" + sed -i 's,C:\\\\GOG Games\\\\Heroes of Might and Magic 3 Complete,Z:\\\\opt\\\\gog\\\\heroes-of-might-and-magic-3-complete-edition,g' local_machine.reg +} + +package() { + # Install registry configuration + install -Dm644 ${srcdir}/local_machine.reg ${pkgdir}/usr/share/${pkgname}/local_machine.reg + + # Install license + install -Dm644 "${srcdir}/tmp/env/drive_c/GOG Games/Heroes of Might and Magic 3 Complete/EULA.txt" "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE + + # Install game + install -m755 -d "${pkgdir}"/opt/gog/ + cp -r "${srcdir}/tmp/env/drive_c/GOG Games/Heroes of Might and Magic 3 Complete" ${pkgdir}/opt/gog/${pkgname#gog-} + # Remove unneeded files + rm -rf ${pkgdir}/opt/gog/${pkgname#gog-}/unins* + rm -rf ${pkgdir}/opt/gog/${pkgname#gog-}/*.lnk + # Give group write access to Data (to enable h3mmaped.exe) + chown :games ${pkgdir}/opt/gog/${_gamename#gog-}/Data/* + chmod g+w ${pkgdir}/opt/gog/${_gamename#gog-}/Data/* + # Give group write access to HD3 launcher config + for conf in _HD3_Data/HD3_Launcher.ini _HD3_Data/Settings/sod.ini + do + touch ${pkgdir}/opt/gog/${_gamename#gog-}/${conf} + chown :games ${pkgdir}/opt/gog/${_gamename#gog-}/${conf} + chmod g+w ${pkgdir}/opt/gog/${_gamename#gog-}/${conf} + done + + # Install .desktop file and icons + install -Dm644 "${srcdir}/tmp/local/applications/wine/Programs/GOG.com/Heroes of Might and Magic 3 Complete/Heroes of Might and Magic 3 Complete.desktop" ${pkgdir}/usr/share/applications/${_gamename}.desktop + install -Dm644 "${srcdir}/tmp/local/applications/wine/Programs/GOG.com/Heroes of Might and Magic 3 Complete/Heroes 3 Map Editor.desktop" ${pkgdir}/usr/share/applications/${_gamename}-map-editor.desktop + install -Dm644 "${srcdir}/tmp/local/applications/wine/Programs/GOG.com/Heroes of Might and Magic 3 Complete/Heroes 3 Campaign Editor.desktop" ${pkgdir}/usr/share/applications/${_gamename}-campaign-editor.desktop + for res in 16 32 48 256 + do + install -Dm644 ${srcdir}/tmp/local/icons/hicolor/${res}x${res}/apps/3679_gfw_high.0.png ${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${_gamename}.png + done + for res in 16 32 48 64 + do + install -Dm644 ${srcdir}/tmp/local/icons/hicolor/${res}x${res}/apps/0500_h3maped.0.png ${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${_gamename}-map-editor.png + install -Dm644 ${srcdir}/tmp/local/icons/hicolor/${res}x${res}/apps/472F_h3ccmped.0.png ${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${_gamename}-campaign-editor.png + done + # Edit out wine jumbled entries from .desktop file + for file in ${_gamename} ${_gamename}-map-editor ${_gamename}-campaign-editor + do + sed -i "/^Path=\|^Version=\|^Terminal=\|^Categories/d" ${pkgdir}/usr/share/applications/${file}.desktop + sed -i "s,^\(Exec=\|Icon=\).*,\1${file}," ${pkgdir}/usr/share/applications/${file}.desktop + printf "Version=${pkgver}\nTerminal=false\nCategories=Game;\n" >> ${pkgdir}/usr/share/applications/${file}.desktop + done + + # Install startup scripts + install -m755 -d ${pkgdir}/usr/bin + for file in ${_gamename} ${_gamename}-map-editor ${_gamename}-campaign-editor + do + install -m755 ${srcdir}/${file} ${pkgdir}/usr/bin + done +} + +# vim:set ts=2 sw=2 et: diff --git a/gog-heroes-of-might-and-magic-3-complete-edition.install b/gog-heroes-of-might-and-magic-3-complete-edition.install new file mode 100644 index 000000000000..bef9c1d5530f --- /dev/null +++ b/gog-heroes-of-might-and-magic-3-complete-edition.install @@ -0,0 +1,4 @@ +post_install() { + echo "Make sure to add user to the \"games\" group with" + echo " # gpasswd -a USER games" +} diff --git a/heroes-of-might-and-magic-3-complete-edition b/heroes-of-might-and-magic-3-complete-edition new file mode 100755 index 000000000000..64d8387f7b19 --- /dev/null +++ b/heroes-of-might-and-magic-3-complete-edition @@ -0,0 +1,13 @@ +#!/bin/bash +unset WINEPREFIX +export WINEPREFIX="$HOME"/.gog-heroes-of-might-and-magic-3-complete-edition +export WINEDEBUG=-all +if [ ! -d "$WINEPREFIX" ] +then + mkdir -p "$WINEPREFIX" + wineboot -i + regedit /usr/share/gog-heroes-of-might-and-magic-3-complete-edition/local_machine.reg +fi +cd /opt/gog/heroes-of-might-and-magic-3-complete-edition +#wine Heroes3.exe "$@" +wine HD3_Launcher.exe "$@" diff --git a/heroes-of-might-and-magic-3-complete-edition-campaign-editor b/heroes-of-might-and-magic-3-complete-edition-campaign-editor new file mode 100755 index 000000000000..d832aaee48bd --- /dev/null +++ b/heroes-of-might-and-magic-3-complete-edition-campaign-editor @@ -0,0 +1,11 @@ +#!/bin/bash +unset WINEPREFIX +export WINEPREFIX="$HOME"/.gog-heroes-of-might-and-magic-3-complete-edition +export WINEDEBUG=-all +if [ ! -d "$WINEPREFIX" ] +then + mkdir -p "$WINEPREFIX" + wineboot -i + regedit /usr/share/gog-heroes-of-might-and-magic-3-complete-edition/local_machine.reg +fi +wine /opt/gog/heroes-of-might-and-magic-3-complete-edition/h3ccmped.exe "$@" diff --git a/heroes-of-might-and-magic-3-complete-edition-map-editor b/heroes-of-might-and-magic-3-complete-edition-map-editor new file mode 100755 index 000000000000..4cc7f85127d7 --- /dev/null +++ b/heroes-of-might-and-magic-3-complete-edition-map-editor @@ -0,0 +1,11 @@ +#!/bin/bash +unset WINEPREFIX +export WINEPREFIX="$HOME"/.gog-heroes-of-might-and-magic-3-complete-edition +export WINEDEBUG=-all +if [ ! -d "$WINEPREFIX" ] +then + mkdir -p "$WINEPREFIX" + wineboot -i + regedit /usr/share/gog-heroes-of-might-and-magic-3-complete-edition/local_machine.reg +fi +wine /opt/gog/heroes-of-might-and-magic-3-complete-edition/h3maped.exe "$@" |