diff options
author | Lucas Melo | 2022-08-31 21:44:31 -0300 |
---|---|---|
committer | Lucas Melo | 2022-08-31 21:44:31 -0300 |
commit | f92ae95351228d00b94fe5c5b0287c99bbbdf05e (patch) | |
tree | a0dfb85d66a932f77a85aaddb46e69dfefc97493 | |
parent | f080ae8dae0bcef4f72f10bb639073cb81ea1bca (diff) | |
download | aur-f92ae95351228d00b94fe5c5b0287c99bbbdf05e.tar.gz |
Fixing crashes.
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rwxr-xr-x | clonehero | 20 |
3 files changed, 17 insertions, 20 deletions
@@ -1,7 +1,7 @@ pkgbase = clonehero-ptb pkgdesc = Public test build for Clone Hero. Clone Hero is a free rhythm game, which can be played with any 5 or 6 button guitar controller, game controllers, or just your standard computer keyboard. pkgver = v1.0.0.3747 - pkgrel = 1 + pkgrel = 2 url = https://clonehero.net/ install = clonehero.install arch = x86_64 @@ -11,6 +11,7 @@ pkgbase = clonehero-ptb depends = sdl2 optdepends = discord: Discord rich presence support conflicts = clonehero + options = !strip source = clonehero-linux_v1.0.0.3747.tar.xz::https://pubdl.clonehero.net/ptb/v1.0.0.3747-master/clonehero-linux.tar.xz source = clonehero.desktop source = clonehero.install @@ -18,6 +19,6 @@ pkgbase = clonehero-ptb sha256sums = 05f501d0caa03d26fb6397b6afa5f52fd10575fb714e33f1e854dc2d17472eff sha256sums = 6d6d3e8e08ba65fedcc07a2d4ef8d5f6eabd4aec20dbc7e0febc6d58faff72bf sha256sums = a2a4829d71d91d106a9c756d6323bfbf505e2757c83abba199a661728dccde9a - sha256sums = c15846bf8deb9089c1d0c600ab1d53aecaae0f054c308626d2c1038935f38ad1 + sha256sums = 8f2c08c9789dd36dc54b3df88959a742aee1a0c926569d892ed6d254ceb17c1c pkgname = clonehero-ptb @@ -2,7 +2,7 @@ pkgname=clonehero-ptb pkgver=v1.0.0.3747 -pkgrel=1 +pkgrel=2 pkgdesc=\ 'Public test build for Clone Hero. Clone Hero is a free rhythm game, which '\ 'can be played with any 5 or 6 button guitar controller, game controllers, '\ @@ -23,15 +23,19 @@ sha256sums=( '05f501d0caa03d26fb6397b6afa5f52fd10575fb714e33f1e854dc2d17472eff' '6d6d3e8e08ba65fedcc07a2d4ef8d5f6eabd4aec20dbc7e0febc6d58faff72bf' 'a2a4829d71d91d106a9c756d6323bfbf505e2757c83abba199a661728dccde9a' - 'c15846bf8deb9089c1d0c600ab1d53aecaae0f054c308626d2c1038935f38ad1' + '8f2c08c9789dd36dc54b3df88959a742aee1a0c926569d892ed6d254ceb17c1c' ) install=clonehero.install +# Stripping causes crashes/softlocks at runtime, with the error log complaining +# about corrupted files, so we'll disable it entirely. +options=(!strip) + package() { install -Dm644 clonehero.desktop "$pkgdir/usr/share/applications/clonehero.desktop" install -Dm755 clonehero "$pkgdir/usr/bin/clonehero" - cd "$srcdir/clonehero-linux" || exit 1 - find . -type f -exec install -Dm644 "{}" "$pkgdir/opt/clonehero/{}" \; + cd "$srcdir/clonehero-linux" + find . -type f -exec install -Dm644 '{}' "$pkgdir/opt/clonehero/{}" \; chmod +x "$pkgdir/opt/clonehero/clonehero" install -Dm644 'clonehero_Data/Resources/UnityPlayer.png' "$pkgdir/usr/share/pixmaps/clonehero.png" } diff --git a/clonehero b/clonehero index ad5ae0f92e06..2bad7c7b8202 100755 --- a/clonehero +++ b/clonehero @@ -14,20 +14,12 @@ if ! cd "$dir"; then exit 1 fi -# Executable *must* be in a writable directory. -# The game is probably trying to write to files relative to the executable's -# path rather than the working directory. -# This way a link does not work, as the game seemingly dereferences it and tries -# to write inside /opt/clonehero. -if ! cp /opt/clonehero/clonehero clonehero; then - echo "Failed to copy 'clonehero' to '$dir/clonehero'" - exit 1 -fi - -# And then we link everything else we can avoid copying. -for f in UnityPlayer.so clonehero_Data; do - if ! ln -sfT "/opt/clonehero/$f" "$f"; then - echo "Failed to link '$f' to '$dir/$f'" +# We have to copy the required files to get the game to run in a local user +# directory. Symbolic linking leads to runtime errors, running with a different +# working directory than the binary doesn't work either. +for f in clonehero_Data clonehero UnityPlayer.so; do + if ! cp -rf "/opt/clonehero/$f" "$dir/$f"; then + echo "Failed to copy '$f' to '$dir/$f'" exit 1 fi done |