|
@@ -0,0 +1,49 @@
|
|
|
+#!/bin/bash
|
|
|
+set -euo pipefail
|
|
|
+set -x
|
|
|
+GAME=the_neverhood
|
|
|
+cleanup(){
|
|
|
+ echo "Cleaning up..."
|
|
|
+
|
|
|
+ set +euo pipefail
|
|
|
+ docker cp the_neverhood_the-neverhood_1:/home/wineuser/.wine-win95/system.reg $DIR/system.reg
|
|
|
+ #diff -u wine_prefix/system.reg{.old,} >> $DIR/saved_games.patch
|
|
|
+ #diff -u system.reg{.old,} >> $DIR/saved_games.patch
|
|
|
+ #sudo rm -rf wine_prefix
|
|
|
+ #sudo rm -rf the_neverhood_data
|
|
|
+ #sudo rm -f the_neverhood.sh
|
|
|
+}
|
|
|
+DIR=$(pwd)
|
|
|
+mkdir -p /tmp/${GAME}
|
|
|
+cd /tmp/${GAME}
|
|
|
+trap cleanup INT QUIT EXIT
|
|
|
+#cp $DIR/pulseaudio-client.conf .
|
|
|
+echo "Uncompressing game..."
|
|
|
+#tar xf $DIR/wine_prefix.tar.xz
|
|
|
+#cp $DIR/system.reg system.reg
|
|
|
+
|
|
|
+sudo cp ${DIR}/system.reg $DIR/system.reg.$(date +%Y%m%d-%H%M%S)
|
|
|
+#sudo cp system.reg system.reg.old
|
|
|
+
|
|
|
+# system.reg has the game saves
|
|
|
+# so we patch in our game saves
|
|
|
+# and take a snapshot of current
|
|
|
+# system.reg
|
|
|
+#cp wine_prefix/system.reg $DIR/system.reg.$(date +%Y%m%d-%H%M%S)
|
|
|
+#patch --verbose -p0 < $DIR/saved_games.patch
|
|
|
+
|
|
|
+#cp system.reg $DIR/system.reg.$(date +%Y%m%d-%H%M%S)
|
|
|
+#patch --verbose -p1 < $DIR/saved_games.patch
|
|
|
+#cp system.reg{,.old}
|
|
|
+
|
|
|
+#tar xf $DIR/the_neverhood_data.tar.xz
|
|
|
+cp $DIR/docker-compose.yml .
|
|
|
+#cp $DIR/run.sh .
|
|
|
+sudo cp $DIR/the_neverhood.sh .
|
|
|
+#echo "Setting permissions..."
|
|
|
+#sudo chown -R 1010:1010 wine_prefix
|
|
|
+#sudo chown -R 1010:1010 the_neverhood.sh
|
|
|
+#sudo chown $(id -u):1010 /run/user/$(id -u)/pulse/native
|
|
|
+echo "Starting docker container..."
|
|
|
+docker-compose up
|
|
|
+#./run.sh
|