This repository has been archived by the owner on Jun 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
PatchFusion360Installer.sh
executable file
·72 lines (62 loc) · 1.82 KB
/
PatchFusion360Installer.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
65
66
67
68
69
70
71
72
#!/bin/bash
# This script downloads the Fusion360 Installer and patches it to be able to install it with wine
# Armin Schlegel <armin.schlegel@gmx.de>, 20.08.2019
#
# usage: ./PatchFusion360Installer.sh <target-directory-from-cwd> <verbose>
# example: ./PatchFusion360Installer.sh install_files
# example: ./PatchFusion360Installer.sh tmp 1
scriptdir="$(dirname $(readlink -f $0))"
if [ "$1" ]
then
TEMP_PATH=$(pwd)"/"
TEMP_PATH+=$1
fi
TEMP_PATH+="/tmp/fusion360/"
mkdir -p $TEMP_PATH | true
cd $TEMP_PATH
TEMP=$(mktemp -d -p $TEMP_PATH)
chmod -R 755 $TEMP
if [ -z "$(which 7z)" ]
then
echo Cannot find 7z
echo You may install it with:
echo sudo apt install 7z
exit 1
fi
if [ -z "$(which wget)" ]
then
echo Cannot find wget
echo You may install it with:
echo sudo apt install wget
exit 1
fi
# downloading and extracting the installer
cd $TEMP
wget "https://dl.appstreaming.autodesk.com/production/installers/Fusion%20360%20Client%20Downloader.exe" > /dev/null 2>&1
if [ "$2" ]
then
echo Extracting file Fusion 360 Client Downloader.exe
fi
7z x "Fusion 360 Client Downloader.exe" > /dev/null 2>&1
# patching platform.py
cd $TEMP
wget "https://raw.githubusercontent.com/python/cpython/3.7/Lib/platform.py" > /dev/null 2>&1
sed -i '/maj, min, build = /c\ maj, min, build = winver[:3]' platform.py
sed -i "/return uname().system/c\ return 'Windows'" platform.py
sed -i "/return uname().release/c\ return '7'" platform.py
sed -i "/return uname().version/c\ return '6.1.7601'" platform.py
if [ "$2" ]
then
echo Patched lines are:
cat platform.py | grep "maj, min, build ="
cat platform.py | grep "return 'Windows'"
cat platform.py | grep "return '7'"
cat platform.py | grep "return '6.1.7601'"
fi
# finished
if [ -z "$2" ]
then
echo $TEMP
else
echo Please run 'wine streamer.exe' from $TEMP
fi