summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Enste2020-04-19 13:44:12 +0200
committerFrederik Enste2020-04-19 13:44:12 +0200
commit1fdabdedbcf43fdab8c01cc602b6b2a7ab0d86b5 (patch)
treedfffb63094569bc8f6a0ed9e682ec66a6cf4771a
parentd96648770da98ff3c59a6469d7ab8abc9bf73526 (diff)
downloadaur-1fdabdedbcf43fdab8c01cc602b6b2a7ab0d86b5.tar.gz
fixed texture import errors
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD6
-rw-r--r--materialize-bin.install6
-rwxr-xr-xmaterialize-bin.sh47
4 files changed, 46 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f13b660b2916..58d5770d5cbf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,7 +16,7 @@ pkgbase = materialize-bin
source = materialize-bin.desktop
sha256sums = b0f6e3a905781e85dcd7db2383646bce51b8984ab93d1e3d13be42d5bea8904a
sha256sums = 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986
- sha256sums = ed9dcdab4071a854a460bfa56a79738895e2ca6cd7641d1928d160984c0619bd
+ sha256sums = efd19915c8ae21f9b4031ccfe4be3bad741040af0379f848be08e9a20d4d54ff
sha256sums = d1247c77728c389d385c7c830802d9bcbb1c20be9b98136b815188c8c3d79cbe
pkgname = materialize-bin
diff --git a/PKGBUILD b/PKGBUILD
index 10a6ab82ec9a..917ab078f5ae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,4 @@
# Maintainer: Frederik Enste <frederik at fenste dot de>
-# Maintainer: t00manysecrets <frederik at fenste dot de>
pkgname=materialize-bin
pkgver=1.78
@@ -17,7 +16,7 @@ source=("http://boundingboxsoftware.com/materialize/download/Materialize_${pkgve
install="${pkgname}.install"
sha256sums=('b0f6e3a905781e85dcd7db2383646bce51b8984ab93d1e3d13be42d5bea8904a'
'3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986'
- 'ed9dcdab4071a854a460bfa56a79738895e2ca6cd7641d1928d160984c0619bd'
+ 'efd19915c8ae21f9b4031ccfe4be3bad741040af0379f848be08e9a20d4d54ff'
'd1247c77728c389d385c7c830802d9bcbb1c20be9b98136b815188c8c3d79cbe')
build() {
@@ -37,4 +36,7 @@ package() {
# install start script
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
+
+ # install desktop
+ install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}
diff --git a/materialize-bin.install b/materialize-bin.install
index cfd4e9fc977e..96c2a2ad1e27 100644
--- a/materialize-bin.install
+++ b/materialize-bin.install
@@ -1,6 +1,8 @@
post_install() {
update-desktop-database -q /usr/share/applications
- echo 'Please execute "materialize-bin --init" afterwards to initialize the wineprefix'
+ echo ' '
+ echo 'Before running materialize-bin please execute "materialize-bin --init" for every user who wants to use this software.'
+ echo ' '
}
post_upgrade() {
@@ -8,7 +10,7 @@ post_upgrade() {
}
post_remove() {
- post_install $1
+ update-desktop-database -q /usr/share/applications
}
# vim:set ts=2 sw=2 et:
diff --git a/materialize-bin.sh b/materialize-bin.sh
index 3a376d3f3b6e..92de5419f462 100755
--- a/materialize-bin.sh
+++ b/materialize-bin.sh
@@ -1,20 +1,47 @@
#! /bin/bash
-set -e
+
+pkgname="materialize-bin"
+pkgexec="Materialize.exe"
+pkgdir="/opt/${pkgname}"
+pkguser="${HOME}/.${pkgname}"
arg=$1
if [[ "${arg}" == "--init" ]]; then
+
+ echo "Initializing local symlink directory..."
+ mkdir --parents --verbose "${pkguser}"
+ find -L "${pkguser}" -type l -delete
+ cp --update --recursive --symbolic-link --verbose "${pkgdir}/"* "${pkguser}/"
+
echo "Initializing wineprefixe for materialize..."
- echo 'If the initialization failes run "winetricks prefix=materialize-bin annihilate" and rerun "materialize-bin --init"'
- echo ' '
- echo ' '
- winetricks -q prefix=materialize-bin arch=64 vcrun2019 corefonts
+ winetricks -q prefix=${pkgname} arch=64 win10 dxvk160 vcrun2019 corefonts
+ if [[ $? -ne 0 ]]; then
+ echo 'The initialization failed. Try running "materialize-bin --annihilate" and rerun "materialize-bin --init".'
+ exit 1
+ fi
+
exit 0
-elif [[ -z "${arg}" ]]; then
- cd "/opt/materialize-bin"
- WINEPREFIX="$HOME/.local/share/wineprefixes/materialize-bin" wine Materialize.exe
+
+elif [[ "${arg}" == "--annihilate" ]]; then
+
+ winetricks -q prefix=${pkgname} annihilate
exit $?
+
+elif [[ -z "${arg}" ]]; then
+
+ WINEPREFIX="$HOME/.local/share/wineprefixes/materialize-bin" wine "${pkguser}/${pkgexec}"
+ code=$?
+ if [[ ${code} -ne 0 ]]; then
+ echo 'The program returned an exit code not equal to 0. Did you already run "materialize-bin --init"?'
+ fi
+ exit ${code}
+
fi
-echo "Unexpected argument."
-echo "Use --init to initialize the wineprefix or none to start the program." \ No newline at end of file
+echo "Unexpected argument: ${arg}"
+echo " "
+echo "Options: "
+echo " Without options the main program is launched."
+echo " --init Initializes the wineprefix for this program."
+echo " --annihilate Annihilates the wineprefix for this program."