-
Notifications
You must be signed in to change notification settings - Fork 7
/
installer.sh
64 lines (59 loc) · 2.46 KB
/
installer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#! /bin/bash
cd "$(dirname "$0")"
export WINEPREFIX=$(pwd);
if [ "$#" -ne 1 ]; then
echo "${0}: usage: installer.sh (1 for setup | 2 to install latest dxvk | 3 to run Fusion )"
exit 1
fi
case "${1}" in #switch case for the program's argument
"1")
tar -xzf installer.tar.gz;
winetricks corefonts vcrun2017 win7;
#winetricks corefonts winhttp wininet vcrun2017 win7;
echo -e "\n\n"
echo "----------------------------------------------------------"
echo "Set virtual desktop if you want"
echo "----------------------------------------------------------"
winecfg
echo -e "\n\n"
echo "----------------------------------------------------------"
echo "Wait for streamer.exe to be done downloading/installing..."
echo "Watch "$WINEPREFIX"/drive_c/users/"$USER"/Local Settings/Application Data/Autodesk/webdeploy/"
echo "And wait until a \"production\" folder appears with 2 populated subfolders"
echo "----------------------------------------------------------"
export WINEPREFIX=$(pwd);
deskVar=$(xdg-user-dir DESKTOP) # takes care of symlink that the installer doesn't like
deskVar="${deskVar##*/}"
symPath="$WINEPREFIX""/drive_c/users/""$USER"
tempVar=$(mktemp)
tempFile=$(mktemp)
find -P $symPath -maxdepth 1 -type l -exec echo -n "{} -> " \; -exec readlink {} \; > $tempVar;
grep "$deskVar" $tempVar > $tempFile;
while IFS="" read -r line || [ -n "$line" ]; do
line=${line%% ->*}
echo $line
rm -rf "$line"
mkdir "$line"
done < $tempFile;
wine ./installer/streamer.exe
;;
"2")
if [ ! -d dxvkInstaller ]; then
curl -s https://api.github.com/repos/doitsujin/dxvk/releases/latest | grep ".tar.gz" | cut -d : -f 2,3 | tr -d \" | wget -qi -
tar -xvf dxvk-*.tar.gz
rm dxvk-*.tar.gz
mv dxvk-* dxvkInstaller
dxvkInstaller/setup_dxvk.sh install
echo "DXVK installed!";
else
dxvkInstaller/setup_dxvk.sh uninstall
rm -rf dxvkInstaller
echo "DXVK uninstalled!";
fi
;;
"3")
export WINEPREFIX=$(pwd);
wine $WINEPREFIX"/drive_c/users/"$USER"/Local Settings/Application Data/Autodesk/webdeploy/production/6a0c9611291d45bb9226980209917c3d/FusionLauncher.exe";
;;
esac
exit