mirror of
https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux.git
synced 2026-05-07 14:35:58 +02:00
Add a dialog
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
# Author URI: https://cryinkfly.com
|
||||
# License: MIT
|
||||
# Copyright (c) 2020-2021
|
||||
# Time/Date: 19:00/06.08.2021
|
||||
# Version: 2.7
|
||||
# Time/Date: 14:00/08.08.2021
|
||||
# Version: 2.8
|
||||
##############################################################################
|
||||
|
||||
# DESCRIPTION
|
||||
@@ -66,7 +66,7 @@ function welcome_screen {
|
||||
HEIGHT=15
|
||||
WIDTH=60
|
||||
CHOICE_HEIGHT=2
|
||||
BACKTITLE="Installation of Autodesk Fusion360 - Version 2.7"
|
||||
BACKTITLE="Installation of Autodesk Fusion360 - Version 2.8"
|
||||
TITLE="Do you wish to install Autodesk Fusion 360?"
|
||||
MENU="Choose one of the following options:"
|
||||
|
||||
@@ -96,7 +96,7 @@ function select_your_os {
|
||||
HEIGHT=15
|
||||
WIDTH=60
|
||||
CHOICE_HEIGHT=10
|
||||
BACKTITLE="Installation of Autodesk Fusion360 - Version 2.7"
|
||||
BACKTITLE="Installation of Autodesk Fusion360 - Version 2.8"
|
||||
TITLE="Select your Linux distribution"
|
||||
MENU="Choose one of the following options:"
|
||||
|
||||
@@ -126,67 +126,57 @@ clear
|
||||
case $CHOICE in
|
||||
1)
|
||||
su -c 'zypper up && zypper rr https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Leap_15.2/ wine && zypper ar -cfp 95 https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Leap_15.2/ wine && zypper install p7zip-full curl wget wine cabextract' &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
2)
|
||||
su -c 'zypper up && zypper rr https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Leap_15.3/ wine && zypper ar -cfp 95 https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Leap_15.3/ wine && zypper install p7zip-full curl wget wine cabextract' &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
3)
|
||||
su -c 'zypper up && zypper install p7zip-full curl wget wine cabextract' &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
4)
|
||||
debian_based_1 &&
|
||||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ buster main' &&
|
||||
debian_based_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
5)
|
||||
debian_based_1 &&
|
||||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main' &&
|
||||
debian_based_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
6)
|
||||
debian_based_1 &&
|
||||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' &&
|
||||
debian_based_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
7)
|
||||
debian_based_1 &&
|
||||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ groovy main' &&
|
||||
debian_based_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
8)
|
||||
debian_based_1 &&
|
||||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ hirsute main' &&
|
||||
debian_based_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
9)
|
||||
fedora_based_1 &&
|
||||
sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/33/winehq.repo &&
|
||||
fedora_based_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
10)
|
||||
fedora_based_1 &&
|
||||
sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/34/winehq.repo &&
|
||||
fedora_based_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
11)
|
||||
archlinux_1
|
||||
@@ -196,23 +186,55 @@ case $CHOICE in
|
||||
;;
|
||||
13)
|
||||
void-linux &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
|
||||
esac
|
||||
}
|
||||
|
||||
function select_your_path {
|
||||
dialog --backtitle "Installation of Autodesk Fusion360 - Version 2.7" \
|
||||
--title "Description - Configure the installation location" \
|
||||
--msgbox 'Now you have to determine where you want to install Fusion 360 and then the .fusion360 folder will be created for you automatically. For examlble you can install it on a external usb-drive: /run/media/user/usb-drive/wine/.fusion360 or you install it into your home folder: /home/user/.fusion360).' 14 200
|
||||
|
||||
filename=$(dialog --stdout --title "Enter the installation path for Fusion 360:" --backtitle "Installation of Autodesk Fusion360 - Version 2.7" --fselect $HOME/ 14 100)
|
||||
HEIGHT=15
|
||||
WIDTH=60
|
||||
CHOICE_HEIGHT=2
|
||||
BACKTITLE="Installation of Autodesk Fusion360 - Version 2.8"
|
||||
TITLE="Choose setup type"
|
||||
MENU="Choose the kind of setup that best suits your needs."
|
||||
|
||||
OPTIONS=(1 "Standard - Install Autodesk Fusion 360 into your home folder. (/home/YOUR-USERNAME/.wine-prefixes/fusion360)"
|
||||
2 "Custom - Install Autodesk Fusion 360 to another place.")
|
||||
|
||||
CHOICE=$(dialog --clear \
|
||||
--backtitle "$BACKTITLE" \
|
||||
--title "$TITLE" \
|
||||
--menu "$MENU" \
|
||||
$HEIGHT $WIDTH $CHOICE_HEIGHT \
|
||||
"${OPTIONS[@]}" \
|
||||
2>&1 >/dev/tty)
|
||||
|
||||
clear
|
||||
case $CHOICE in
|
||||
1)
|
||||
winetricks-standard
|
||||
;;
|
||||
2)
|
||||
select_your_path_custom
|
||||
winetricks-custom
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
function select_your_path_custom {
|
||||
dialog --backtitle "Installation of Autodesk Fusion360 - Version 2.8" \
|
||||
--title "Description - Configure the installation location" \
|
||||
--msgbox 'Now you have to determine where you want to install Fusion 360 and then the .fusion360 folder will be created for you automatically. For examlble you can install it on a external usb-drive: /run/media/user/usb-drive/wine/.fusion360 or you install it into your home folder: /home/YOUR-USERNAME/.wine-prefixes/fusion360).' 14 200
|
||||
|
||||
filename=$(dialog --stdout --title "Enter the installation path for Fusion 360:" --backtitle "Installation of Autodesk Fusion360 - Version 2.8" --fselect $HOME/ 14 100)
|
||||
}
|
||||
|
||||
function program_exit {
|
||||
dialog --backtitle "Installation of Autodesk Fusion360 - Version 2.7" \
|
||||
dialog --backtitle "Installation of Autodesk Fusion360 - Version 2.8" \
|
||||
--title "TAutodesk Fusion 360 is completed." \
|
||||
--msgbox 'The installation of Autodesk Fusion 360 is completed and you can use it for your projects.' 14 200
|
||||
|
||||
@@ -249,7 +271,7 @@ function archlinux_1 {
|
||||
HEIGHT=15
|
||||
WIDTH=60
|
||||
CHOICE_HEIGHT=2
|
||||
BACKTITLE="Installation of Autodesk Fusion360 - Version 2.7"
|
||||
BACKTITLE="Installation of Autodesk Fusion360 - Version 2.8"
|
||||
TITLE="If you have enabled multilib repository?"
|
||||
MENU="Choose one of the following options:"
|
||||
|
||||
@@ -268,15 +290,13 @@ clear
|
||||
case $CHOICE in
|
||||
1)
|
||||
archlinux_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
2)
|
||||
sudo echo "[multilib]" >> /etc/pacman.conf &&
|
||||
sudo echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf &&
|
||||
archlinux_2 &&
|
||||
select_your_path &&
|
||||
winetricks
|
||||
select_your_path
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -289,7 +309,33 @@ function void-linux {
|
||||
sudo xbps-install -Sy wine wine-mono wine-gecko winetricks p7zip curl cabextract samba ppp
|
||||
}
|
||||
|
||||
function winetricks {
|
||||
function winetricks-standard {
|
||||
clear
|
||||
mkdir -p /home/$USER/.wine-prefixes/fusion360 &&
|
||||
cd /home/$USER/.wine-prefixes/fusion360 &&
|
||||
wget -N https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks &&
|
||||
chmod +x winetricks &&
|
||||
WINEPREFIX=/home/$USER/.wine-prefixes/fusion360 sh winetricks -q corefonts msxml4 msxml6 vcrun2017 fontsmooth=rgb win8 &&
|
||||
mkdir -p fusion360-download &&
|
||||
cd fusion360-download &&
|
||||
wget -N https://dl.appstreaming.autodesk.com/production/installers/Fusion%20360%20Admin%20Install.exe -O Fusion360.exe &&
|
||||
WINEPREFIX=/home/$USER/.wine-prefixes/fusion360 wine Fusion360.exe -p deploy -g -f log.txt --quiet &&
|
||||
WINEPREFIX=/home/$USER/.wine-prefixes/fusion360 wine Fusion360.exe -p deploy -g -f log.txt --quiet &&
|
||||
mkdir -p "/home/$USER/.wine-prefixes/fusion360/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform" &&
|
||||
cd "/home/$USER/.wine-prefixes/fusion360/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform" &&
|
||||
mkdir -p Options &&
|
||||
cd Options &&
|
||||
wget -N https://raw.githubusercontent.com/cryinkfly/Fusion-360---Linux-Wine-Version-/main/files/NMachineSpecificOptions.xml &&
|
||||
# # Because the location varies depending on the Linux distro!
|
||||
mkdir -p "/home/$USER/.wine-prefixes/fusion360/drive_c/users/$USER/Application Data/Autodesk/Neutron Platform" &&
|
||||
cd "/home/$USER/.wine-prefixes/fusion360/drive_c/users/$USER/Application Data/Autodesk/Neutron Platform" &&
|
||||
mkdir -p Options &&
|
||||
cd Options &&
|
||||
wget -N https://raw.githubusercontent.com/cryinkfly/Fusion-360---Linux-Wine-Version-/main/files/NMachineSpecificOptions.xml &&
|
||||
program_exit
|
||||
}
|
||||
|
||||
function winetricks-custom {
|
||||
clear
|
||||
mkdir -p $filename &&
|
||||
cd $filename &&
|
||||
@@ -301,10 +347,17 @@ function winetricks {
|
||||
wget -N https://dl.appstreaming.autodesk.com/production/installers/Fusion%20360%20Admin%20Install.exe -O Fusion360.exe &&
|
||||
WINEPREFIX=$filename wine Fusion360.exe -p deploy -g -f log.txt --quiet &&
|
||||
WINEPREFIX=$filename wine Fusion360.exe -p deploy -g -f log.txt --quiet &&
|
||||
mkdir -p "$filename/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform" &&
|
||||
cd "$filename/drive_c/users/$USER/AppData/Roaming/Autodesk/Neutron Platform" &&
|
||||
mkdir -p Options &&
|
||||
cd Options &&
|
||||
wget -N https://raw.githubusercontent.com/cryinkfly/Fusion-360---Linux-Wine-Version-/main/files/NMachineSpecificOptions.xml &&
|
||||
# # Because the location varies depending on the Linux distro!
|
||||
mkdir -p "$filename/drive_c/users/$USER/Application Data/Autodesk/Neutron Platform" &&
|
||||
cd "$filename/drive_c/users/$USER/Application Data/Autodesk/Neutron Platform" &&
|
||||
mkdir -p Options &&
|
||||
cd Options &&
|
||||
wget -N https://raw.githubusercontent.com/cryinkfly/Fusion-360---Linux-Wine-Version-/main/files/NMachineSpecificOptions.xml &&
|
||||
program_exit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user