2021-10-21 20:22:44 +02:00
#!/bin/bash
####################################################################################################
# Name: Autodesk Fusion 360 - Setup Wizard (Linux) #
2021-11-09 10:25:59 +01:00
# Description: With this file you can install Autodesk Fusion 360 on Linux. #
2021-10-21 20:22:44 +02:00
# Author: Steve Zabka #
# Author URI: https://cryinkfly.com #
# License: MIT #
# Copyright (c) 2020-2021 #
2021-11-27 17:33:43 +01:00
# Time/Date: 17:30/27.11.2021 #
# Version: 1.6.2 #
2021-10-21 20:22:44 +02:00
####################################################################################################
###############################################################################################################################################################
# DESCRIPTION IN DETAIL #
###############################################################################################################################################################
# With the help of my setup wizard, you will be given a way to install Autodesk Fusion 360 with some extensions on #
# Linux so that you don't have to use Windows or macOS for this program in the future! #
# #
# Also, my setup wizard will guides you through the installation step by step and will install some required packages. #
# #
# The next one is you have the option of installing the program directly on your system or you can install it on an external storage medium. #
# #
# But it's important to know, you must to purchase the licenses directly from the manufacturer of Autodesk Fusion 360, when you will work with them on Linux! #
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Window Title (Setup Wizard)
program_name = "Autodesk Fusion 360 for Linux - Setup Wizard"
# Reset the driver-value for the installation of Autodesk Fusion 360!
driver_used = 0
# Reset the logfile-value for the installation of Autodesk Fusion 360!
f360path_log = 0
2021-10-21 20:22:44 +02:00
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# ALL LOG-FUNCTIONS ARE ARRANGED HERE: #
2021-10-21 20:22:44 +02:00
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Provides information about setup actions during installation.
function setupact-log {
2021-11-23 10:00:25 +01:00
# mkdir -p "$HOME/.wineprefixes/fusion360/logfiles"
# exec 3>&1 4>&2
# trap 'exec 2>&4 1>&3' 0 1 2 3
# exec 1> $HOME/.wineprefixes/fusion360/logfiles/setupact.log 2>&1
# echo `date`
2021-11-21 13:20:13 +01:00
mkdir -p " $HOME /.wineprefixes/fusion360/logfiles "
2021-11-23 10:00:25 +01:00
exec 5> $HOME /.wineprefixes/fusion360/logfiles/setupact.log
BASH_XTRACEFD = "5"
set -x
2021-10-21 20:22:44 +02:00
}
2021-11-23 09:21:27 +01:00
# Check if already exists a Autodesk Fusion 360 installation on your system.
function setupact-check-f360 {
f360_path = " $HOME /.wineprefixes/fusion360/logfiles/f360-path.log " # Search for f360-path.log file.
if [ -f " $f360_path " ] ; then
cp " $HOME /.wineprefixes/fusion360/logfiles/f360-path.log " data/logfiles
mv data/logfiles/f360-path.log data/logfiles/f360-path
setupact-modify-f360 # Modify a exists Wineprefix of Autodesk Fusion 360.
2021-10-21 20:22:44 +02:00
else
2021-11-23 09:21:27 +01:00
f360path_log = 1
setupact-select-f360-path # Install a new Wineprefix of Autodesk Fusion 360.
2021-10-21 20:22:44 +02:00
fi
}
2021-11-23 09:21:27 +01:00
# Save the path of the Wineprefix of Autodesk Fusion 360 into the f360-path.log file.
function setupact-log-f360-path {
if [ $f360path_log -eq 1 ] ; then
echo " $wineprefixname " >> $HOME /.wineprefixes/fusion360/logfiles/f360-path.log
2021-10-22 14:40:53 +02:00
fi
2021-10-21 20:22:44 +02:00
}
2021-11-23 09:21:27 +01:00
###############################################################################################################################################################
# THE INITIALIZATION OF DEPENDENCIES STARTS HERE: #
2021-10-21 20:22:44 +02:00
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Create the structure for the installation of Autodesk Fusion 360.
function setupact-structure {
2021-10-21 20:22:44 +02:00
mkdir -p data/extensions
mkdir -p data/fusion360
mkdir -p data/logfiles
mkdir -p data/locale
mkdir -p data/locale/cs-CZ
mkdir -p data/locale/de-DE
mkdir -p data/locale/en-US
mkdir -p data/locale/es-ES
mkdir -p data/locale/fr-FR
mkdir -p data/locale/it-IT
mkdir -p data/locale/ja-JP
mkdir -p data/locale/ko-KR
mkdir -p data/locale/zh-CN
mkdir -p data/winetricks
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Load the locale files for the setup wizard.
function setupact-load-locale {
2021-10-21 20:22:44 +02:00
wget -N -P data/locale https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/scripts/stable-branch/data/locale/locale.sh
chmod +x data/locale/locale.sh
. data/locale/locale.sh
}
function load-locale-cs {
. data/locale/cs-CZ/locale-cs.sh
}
function load-locale-de {
. data/locale/de-DE/locale-de.sh
}
function load-locale-en {
. data/locale/en-US/locale-en.sh
}
function load-locale-es {
. data/locale/es-ES/locale-es.sh
}
function load-locale-fr {
. data/locale/fr-FR/locale-fr.sh
}
function load-locale-it {
. data/locale/it-IT/locale-it.sh
}
function load-locale-ja {
. data/locale/ja-JP/locale-ja.sh
}
function load-locale-ko {
. data/locale/ko-KR/locale-ko.sh
}
function load-locale-zh {
. data/locale/zh-CN/locale-zh.sh
}
###############################################################################################################################################################
# Load newest winetricks version for the Setup Wizard!
2021-11-23 09:21:27 +01:00
function setupact-load-winetricks {
2021-10-21 20:34:52 +02:00
wget -N -P data/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
2021-10-21 20:22:44 +02:00
chmod +x data/winetricks/winetricks
2021-11-23 09:21:27 +01:00
}
2021-10-21 20:22:44 +02:00
###############################################################################################################################################################
# Load newest Autodesk Fusion 360 installer version for the Setup Wizard!
2021-11-23 09:21:27 +01:00
function setupact-load-f360exe {
f360exe = " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/fusion360/Fusion360installer.exe " # Search for a existing installer of Autodesk Fusion 360
if [ -f " $f360exe " ] ; then
echo "Autodesk Fusion 360 installer exist!"
else
wget https://dl.appstreaming.autodesk.com/production/installers/Fusion%20360%20Admin%20Install.exe -O Fusion360installer.exe
mv Fusion360installer.exe data/fusion360/Fusion360installer.exe
fi
}
###############################################################################################################################################################
# ALL FUNCTIONS FOR DXVK AND OPENGL START HERE: #
###############################################################################################################################################################
function setupact-dxvk-opengl-1 {
if [ $driver_used -eq 2 ] ; then
WINEPREFIX = $wineprefixname sh data/winetricks/winetricks -q dxvk
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/opengl_dxvk/DXVK.reg
WINEPREFIX = $wineprefixname wine regedit.exe DXVK.reg
fi
}
function setupact-dxvk-opengl-2 {
if [ $driver_used -eq 2 ] ; then
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/opengl_dxvk/DXVK.xml
mv DXVK.xml NMachineSpecificOptions.xml
else
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/opengl_dxvk/OpenGL.xml
mv OpenGL.xml NMachineSpecificOptions.xml
fi
}
function setupact-dxvk-opengl-3 {
if [ $driver_used -eq 2 ] ; then
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/opengl_dxvk/DXVK.xml
mv DXVK.xml NMachineSpecificOptions.xml
else
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/opengl_dxvk/OpenGL.xml
mv OpenGL.xml NMachineSpecificOptions.xml
fi
}
###############################################################################################################################################################
# ALL FUNCTIONS FOR WINE AND WINETRICKS START HERE: #
###############################################################################################################################################################
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
# Autodesk Fusion 360 will now be installed using Wine and Winetricks.
function setupact-f360install {
2021-11-27 17:33:43 +01:00
WINEPREFIX = $wineprefixname sh data/winetricks/winetricks -q atmlib gdiplus corefonts cjkfonts msxml4 msxml6 vcrun2017 fontsmooth = rgb winhttp win10
2021-11-23 09:21:27 +01:00
# We must install cjkfonts again then sometimes it doesn't work in the first time!
WINEPREFIX = $wineprefixname sh data/winetricks/winetricks -q cjkfonts
setupact-dxvk-opengl-1
WINEPREFIX = $wineprefixname wine data/fusion360/Fusion360installer.exe -p deploy -g -f log.txt --quiet
WINEPREFIX = $wineprefixname wine data/fusion360/Fusion360installer.exe -p deploy -g -f log.txt --quiet
mkdir -p " $wineprefixname /drive_c/users/ $USER /AppData/Roaming/Autodesk/Neutron Platform/Options "
cd " $wineprefixname /drive_c/users/ $USER /AppData/Roaming/Autodesk/Neutron Platform/Options "
setupact-dxvk-opengl-2
mkdir -p " $wineprefixname /drive_c/users/ $USER /Application Data/Autodesk/Neutron Platform/Options "
cd " $wineprefixname /drive_c/users/ $USER /Application Data/Autodesk/Neutron Platform/Options "
2021-11-23 10:43:11 +01:00
setupact-dxvk-opengl-3
2021-11-23 09:21:27 +01:00
setupact-f360-launcher
setupact-log-f360-path
2021-11-23 10:43:11 +01:00
setupact-f360extensions
setupact-completed
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Create a launcher for your Wineprefix of Autodesk Fusion 360.
function setupact-f360-launcher {
if [ $f360_launcher -eq 1 ] ; then
rm $HOME /.local/share/applications/wine/Programs/Autodesk/Autodesk\ Fusion\ 360.desktop
wget -P $HOME /.local/share/applications/wine/Programs/Autodesk https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/desktop-starter/Autodesk%20Fusion%20360.desktop
rm $HOME /.local/applications/wine/Programs/Autodesk/fusion360-launcher.sh
wget -P $HOME /.local/applications/wine/Programs/Autodesk https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/desktop-starter/fusion360-launcher.sh
chmod +x $HOME /.local/applications/wine/Programs/Autodesk/fusion360-launcher.sh
else
rm $HOME /.local/share/applications/wine/Programs/Autodesk/Autodesk\ Fusion\ 360.desktop
wget -P $HOME /.local/share/applications/wine/Programs/Autodesk https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/desktop-starter/Autodesk%20Fusion%20360.desktop
cd " $HOME /.wineprefixes/fusion360/INSTALLDIR "
2021-11-23 10:53:43 +01:00
wget -P $HOME /.local/share/fusion360 https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extras/desktop-starter/fusion360-launcher.sh -O Fusion360launcher
2021-11-23 09:21:27 +01:00
mv Fusion360launcher data/fusion360/Fusion360launcher
setupact-f360-modify-launcher
fi
}
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
###############################################################################################################################################################
# ALL FUNCTIONS FOR SUPPORTED LINUX DISTRIBUTIONS START HERE: #
###############################################################################################################################################################
# For the installation of Autodesk Fusion 360 one of the supported Linux distributions must be selected! - Part 2
function archlinux {
2021-10-21 20:22:44 +02:00
echo "Checking for multilib..."
if archlinux-verify-multilib ; then
echo "multilib found. Continuing..."
2021-11-23 09:21:27 +01:00
sudo pacman -Sy --needed wine wine-mono wine_gecko winetricks p7zip curl cabextract samba ppp
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
else
echo "Enabling multilib..."
echo "[multilib]" | sudo tee -a /etc/pacman.conf
echo "Include = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf
2021-11-23 09:21:27 +01:00
sudo pacman -Sy --needed wine wine-mono wine_gecko winetricks p7zip curl cabextract samba ppp
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
fi
}
function archlinux-verify-multilib {
if cat /etc/pacman.conf | grep -q '^\[multilib\]$' ; then
true
else
false
fi
}
function debian-based-1 {
2021-11-23 10:11:50 +01:00
sudo apt-get update
sudo apt-get upgrade
2021-10-21 20:22:44 +02:00
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
}
function debian-based-2 {
2021-11-23 10:11:50 +01:00
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install p7zip p7zip-full p7zip-rar curl winbind cabextract wget
sudo apt-get install --install-recommends winehq-staging
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
}
function ubuntu18 {
sudo apt-add-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
wget -q https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key -O Release.key -O- | sudo apt-key add -
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'
}
function ubuntu20 {
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
wget -q https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_20.04/Release.key -O Release.key -O- | sudo apt-key add -
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_20.04/ ./'
}
function ubuntu20_10 {
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ groovy main'
2021-11-23 09:21:27 +01:00
wget -q https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_20.10/Release.key -O Release.key -O- | sudo apt-key add -
2021-10-21 20:22:44 +02:00
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_20.10/ ./'
}
function ubuntu21 {
# Note: This installs the public key to trusted.gpg.d - While this is "acceptable" behaviour it is not best practice.
# It is infinitely better than using apt-key add though.
# For more information and for instructions to utalise best practices, see:
# https://askubuntu.com/questions/1286545/what-commands-exactly-should-replace-the-deprecated-apt-key
2021-11-23 10:11:50 +01:00
sudo apt-get update
sudo apt-get upgrade
2021-10-21 20:22:44 +02:00
sudo dpkg --add-architecture i386
mkdir -p /tmp/360 && cd /tmp/360
wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_21.04/Release.key
wget https://dl.winehq.org/wine-builds/winehq.key
gpg --no-default-keyring --keyring ./temp-keyring.gpg --import Release.key
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output opensuse-wine.gpg && rm temp-keyring.gpg
gpg --no-default-keyring --keyring ./temp-keyring.gpg --import winehq.key
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output winehq.gpg && rm temp-keyring.gpg
sudo mv *.gpg /etc/apt/trusted.gpg.d/ && cd /tmp && sudo rm -rf 360
echo "deb [signed-by=/etc/apt/trusted.gpg.d/opensuse-wine.gpg] https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_21.04/ ./" | sudo tee -a /etc/apt/sources.list.d/opensuse-wine.list
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ hirsute main'
2021-11-27 13:28:54 +01:00
cd " $HOME /.wineprefixes/fusion360/INSTALLDIR "
2021-10-21 20:22:44 +02:00
}
function ubuntu21_10 {
2021-11-23 09:21:27 +01:00
# Note: See the description in the function ubuntu21!
2021-11-23 10:11:50 +01:00
sudo apt-get update
sudo apt-get upgrade
2021-11-23 09:21:27 +01:00
sudo dpkg --add-architecture i386
mkdir -p /tmp/360 && cd /tmp/360
wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_21.04/Release.key
wget https://dl.winehq.org/wine-builds/winehq.key
gpg --no-default-keyring --keyring ./temp-keyring.gpg --import Release.key
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output opensuse-wine.gpg && rm temp-keyring.gpg
gpg --no-default-keyring --keyring ./temp-keyring.gpg --import winehq.key
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output winehq.gpg && rm temp-keyring.gpg
sudo mv *.gpg /etc/apt/trusted.gpg.d/ && cd /tmp && sudo rm -rf 360
echo "deb [signed-by=/etc/apt/trusted.gpg.d/opensuse-wine.gpg] https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_21.10/ ./" | sudo tee -a /etc/apt/sources.list.d/opensuse-wine.list
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'
2021-10-21 20:22:44 +02:00
}
function fedora-based-1 {
sudo dnf update
sudo dnf upgrade
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$( rpm -E %fedora) .noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$( rpm -E %fedora) .noarch.rpm
}
function fedora-based-2 {
2021-11-23 10:11:50 +01:00
sudo dnf install p7zip p7zip-plugins curl wget wine cabextract
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
}
function redhat-linux {
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf upgrade
sudo dnf install wine
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
}
function solus-linux {
2021-11-23 09:21:27 +01:00
sudo eopkg install -y wine winetricks p7zip curl cabextract samba ppp
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
}
function void-linux {
sudo xbps-install -Sy wine wine-mono wine-gecko winetricks p7zip curl cabextract samba ppp
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
}
function gentoo-linux {
2021-11-08 09:12:31 +01:00
sudo emerge -nav virtual/wine app-emulation/winetricks app-emulation/wine-mono app-emulation/wine-gecko app-arch/p7zip app-arch/cabextract net-misc/curl net-fs/samba net-dialup/ppp
2021-11-23 10:43:11 +01:00
setupact-f360install
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# ALL FUNCTIONS FOR THE EXTENSIONS START HERE: #
2021-10-21 20:22:44 +02:00
###############################################################################################################################################################
# Install a extension: Airfoil Tools
2021-11-23 09:21:27 +01:00
function airfoil-tools-extension {
mkdir -p " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
cd " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
2021-10-22 16:35:13 +02:00
wget -N https://github.com/cryinkfly/Fusion-360---Linux-Wine-Version-/raw/main/files/extensions/AirfoilTools_win64.msi &&
2021-11-23 09:21:27 +01:00
WINEPREFIX = $wineprefixname wine AirfoilTools_win64.msi
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
# Install a extension: Additive Assistant (FFF)
2021-11-23 09:21:27 +01:00
function additive-assistant-extension {
mkdir -p " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
cd " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
2021-10-22 16:35:13 +02:00
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extensions/AdditiveAssistant.bundle-win64.msi &&
2021-11-23 09:21:27 +01:00
WINEPREFIX = $wineprefixname wine AdditiveAssistant.bundle-win64.msi
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
# Install a extension: Czech localization for F360
2021-11-23 09:21:27 +01:00
function czech-locale-extension {
czech-locale-search-extension
WINEPREFIX = $wineprefixname wine $CZECH_LOCALE_EXTENSION
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
# Install a extension: HP 3D Printers for Autodesk® Fusion 360™
2021-11-23 09:21:27 +01:00
function hp-3dprinter-connector-extension {
mkdir -p " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
cd " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
2021-10-22 16:35:13 +02:00
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extensions/HP_3DPrinters_for_Fusion360-win64.msi &&
2021-11-23 09:21:27 +01:00
WINEPREFIX = $wineprefixname wine HP_3DPrinters_for_Fusion360-win64.msi
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
# Install a extension: OctoPrint for Autodesk® Fusion 360™
2021-11-23 09:21:27 +01:00
function octoprint-extension {
mkdir -p " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
cd " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
2021-10-22 16:35:13 +02:00
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extensions/OctoPrint_for_Fusion360-win64.msi &&
2021-11-23 09:21:27 +01:00
WINEPREFIX = $wineprefixname wine OctoPrint_for_Fusion360-win64.msi
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
# Install a extension: RoboDK
2021-11-23 09:21:27 +01:00
function robodk-extension {
mkdir -p " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
cd " $HOME /.wineprefixes/fusion360/INSTALLDIR/data/extensions "
2021-10-22 16:35:13 +02:00
wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extensions/RoboDK.bundle-win64.msi &&
2021-11-23 09:21:27 +01:00
WINEPREFIX = $wineprefixname wine RoboDK.bundle-win64.msi
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Remove a exist Wineprefix of Autodesk Fusion 360!
function setupact-remove-f360 {
setupact-f360-path
rm -r " $wineprefixname "
setupact-uninstall-completed
2021-10-21 20:22:44 +02:00
}
2021-11-23 09:21:27 +01:00
2021-10-21 20:22:44 +02:00
###############################################################################################################################################################
# ALL DIALOGS ARE ARRANGED HERE: #
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Welcome Screen - Setup Wizard of Autodesk Fusion 360 for Linux
function setupact-welcome {
zenity --question \
--title= " $program_name " \
--text= "Would you like to install Autodesk Fusion 360 on your system?" \
--width= 400 \
--height= 100
answer = $?
if [ " $answer " -eq 0 ] ; then
setupact-progressbar
elif [ " $answer " -eq 1 ] ; then
exit;
fi
}
###############################################################################################################################################################
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
# A progress bar is displayed here.
function setupact-progressbar {
2021-10-21 20:22:44 +02:00
(
echo "5" ; sleep 1
echo "# The folder structure will be created." ; sleep 1
2021-11-23 09:21:27 +01:00
setupact-structure
2021-10-21 20:22:44 +02:00
echo "25" ; sleep 1
echo "# The locale files will be loaded." ; sleep 1
2021-11-23 09:21:27 +01:00
setupact-load-locale
2021-10-21 20:22:44 +02:00
echo "55" ; sleep 1
echo "# The wine- and winetricks Script is loaded." ; sleep 1
2021-11-23 09:21:27 +01:00
setupact-load-winetricks
2021-10-21 20:22:44 +02:00
echo "75" ; sleep 1
echo "# The Autodesk Fusion 360 installation file will be downloaded." ; sleep 1
2021-11-23 09:21:27 +01:00
setupact-load-f360exe
2021-10-21 20:22:44 +02:00
echo "90" ; sleep 1
echo "# The installation can now be started!" ; sleep 1
echo "100" ; sleep 1
) |
zenity --progress \
2021-11-23 09:21:27 +01:00
--title= " $program_name " \
2021-10-21 20:22:44 +02:00
--text= "The Setup Wizard is being configured ..." \
--width= 400 \
--height= 100 \
--percentage= 0
if [ " $? " = 0 ] ; then
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
elif [ " $? " = 1 ] ; then
zenity --question \
--title= " $program_name " \
--text= "Are you sure you want to cancel the installation?" \
--width= 400 \
--height= 100
answer = $?
if [ " $answer " -eq 0 ] ; then
exit;
elif [ " $answer " -eq 1 ] ; then
2021-11-23 09:21:27 +01:00
setupact-progressbar
2021-10-21 20:22:44 +02:00
fi
elif [ " $? " = -1 ] ; then
zenity --error \
--text= "An unexpected error occurred!"
exit;
fi
}
###############################################################################################################################################################
# Configure the locale of the Setup Wizard
2021-11-23 09:21:27 +01:00
function setupact-configure-locale {
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
select_locale = $( zenity --list \
2021-10-21 20:22:44 +02:00
--radiolist \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--column= "Select:" --column= "Language:" \
TRUE "English (Standard)" \
FALSE "German" \
FALSE "Czech" \
FALSE "Spanish" \
FALSE "French" \
FALSE "Italian" \
FALSE "Japanese" \
FALSE "Korean" \
FALSE "Chinese" )
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "English (Standard)" ] ] && load-locale-en && licenses-en
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "German" ] ] && load-locale-de && licenses-de
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "Czech" ] ] && load-locale-cs && licenses-cs
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "Spanish" ] ] && load-locale-es && licenses-es
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "French" ] ] && load-locale-fr && licenses-fr
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "Italian" ] ] && load-locale-it && licenses-it
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "Japanese" ] ] && load-locale-ja && licenses-ja
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "Korean" ] ] && load-locale-ko && licenses-ko
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_locale = "Chinese" ] ] && load-locale-zh && licenses-zh
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ " $select_locale " ] ] || setupact-configure-locale-abort
2021-10-21 20:22:44 +02:00
}
2021-10-21 20:28:46 +02:00
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - cs-CZ
function licenses-cs {
2021-11-23 10:11:50 +01:00
license_cs = ` dirname $0 ` /data/locale/cs-CZ/license-cs
2021-10-21 20:28:46 +02:00
zenity --text-info \
2021-10-21 20:22:44 +02:00
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_cs \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - de-DE
function licenses-de {
license_de = ` dirname $0 ` /data/locale/de-DE/license-de
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_de \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - en-US
function licenses-en {
license_en = ` dirname $0 ` /data/locale/en-US/license-en
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_en \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back."
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - es-ES
function licenses-es {
license_es = ` dirname $0 ` /data/locale/es-ES/license-es
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_es \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - fr-FR
function licenses-fr {
license_fr = ` dirname $0 ` /data/locale/fr-FR/license-fr
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_fr \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - it-IT
function licenses-it {
license_it = ` dirname $0 ` /data/locale/it-IT/license-it
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_it \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - ja-JP
function licenses-ja {
license_ja = ` dirname $0 ` /data/locale/ja-JP/license-ja
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_ja \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - ko-KR
function licenses-ko {
license_ko = ` dirname $0 ` /data/locale/ko-KR/license-ko
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_ko \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
# Load & View the LICENSE AGREEMENT of this Setup Wizard - zh-CN
function licenses-zh {
license_zh = ` dirname $0 ` /data/locale/zh-CN/license-zh
zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $license_zh \
--checkbox= " $text_license_checkbox "
case $? in
0)
echo "Start the installation."
2021-11-23 09:21:27 +01:00
setupact-check-f360
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Here you can determine how Autodesk Fusion 360 should be installed!
function setupact-select-f360-path {
select_f360_path = $( zenity --list \
--radiolist \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--column= " $text_select " --column= " $text_installation_location " \
TRUE " $text_installation_location_standard " \
FALSE " $text_installation_location_custom " )
2021-11-23 10:59:35 +01:00
[ [ $select_f360_path = " $text_installation_location_standard " ] ] && f360_launcher = 1 && wineprefixname = " $HOME /.wineprefixes/fusion360 " && setupact-select-opengl_dxvk
2021-11-23 09:21:27 +01:00
[ [ $select_f360_path = " $text_installation_location_custom " ] ] && setupact-f360-path && setupact-select-opengl_dxvk
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
# Here come later the option for installing Autodesk Fusion 360 into a Flatpak-Runtime!
[ [ " $select_f360_path " ] ] || echo "Go back" && setupact-configure-locale
}
###############################################################################################################################################################
# Autodesk Fusion 360 will be installed from scratch on this system!
function setupact-select-opengl_dxvk {
select_driver = $( zenity --list \
2021-10-21 20:22:44 +02:00
--radiolist \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--column= " $text_select " --column= " $text_driver " \
TRUE " $text_driver_opengl " \
FALSE " $text_driver_dxvk " )
2021-11-23 10:43:11 +01:00
[ [ $select_driver = " $text_driver_opengl " ] ] && driver_used = 1 && setupact-select-os
2021-10-21 20:22:44 +02:00
2021-11-23 10:43:11 +01:00
[ [ $select_driver = " $text_driver_dxvk " ] ] && driver_used = 2 && setupact-select-os
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ " $select_driver " ] ] || echo "Go back" && setupact-select-f360-path
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Create & Select a directory for your Autodesk Fusion 360!
function setupact-f360-path {
wineprefixname = ` zenity --file-selection --directory --title= " $text_select_location_custom " `
}
###############################################################################################################################################################
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
# For the installation of Autodesk Fusion 360 one of the supported Linux distributions must be selected! - Part 1
function setupact-select-os {
select_os = $( zenity --list \
2021-10-21 20:22:44 +02:00
--radiolist \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--column= " $text_select " --column= " $text_linux_distribution " \
FALSE "Arch Linux, Manjaro Linux, EndeavourOS, ..." \
FALSE "Debian 10, MX Linux 19.4, Raspberry Pi Desktop, ..." \
FALSE "Debian 11" \
FALSE "Fedora 33" \
FALSE "Fedora 34" \
FALSE "openSUSE Leap 15.2" \
FALSE "openSUSE Leap 15.3" \
FALSE "openSUSE Tumbleweed" \
FALSE "Red Hat Enterprise Linux 8.x" \
FALSE "Solus" \
FALSE "Ubuntu 18.04, Linux Mint 19.x, ..." \
FALSE "Ubuntu 20.04, Linux Mint 20.x, Pop!_OS 20.04, ..." \
FALSE "Ubuntu 20.10" \
FALSE "Ubuntu 21.04, Pop!_OS 21.04, ..." \
FALSE "Ubuntu 21.10" \
FALSE "Void Linux" \
FALSE "Gentoo Linux" )
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Arch Linux, Manjaro Linux, EndeavourOS, ..." ] ] && archlinux
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Debian 10, MX Linux 19.4, Raspberry Pi Desktop, ..." ] ] && debian-based-1 && sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ buster main' && debian-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Debian 11" ] ] && debian-based-1 && sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main' && debian-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Fedora 33" ] ] && fedora-based-1 && sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/33/winehq.repo && fedora-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Fedora 34" ] ] && fedora-based-1 && sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/34/winehq.repo && fedora-based-2
2021-10-21 20:22:44 +02:00
2021-11-27 16:53:11 +01:00
[ [ $select_os = "openSUSE Leap 15.2" ] ] && 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' && setupact-f360install
2021-10-21 20:22:44 +02:00
2021-11-27 16:53:11 +01:00
[ [ $select_os = "openSUSE Leap 15.3" ] ] && 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' && setupact-f360install
2021-10-21 20:22:44 +02:00
2021-11-27 16:53:11 +01:00
[ [ $select_os = "openSUSE Tumbleweed" ] ] && su -c 'zypper up && zypper install p7zip-full curl wget wine cabextract' && setupact-f360install
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Red Hat Enterprise Linux 8.x" ] ] && redhat-linux
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Solus" ] ] && solus-linux
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Ubuntu 18.04, Linux Mint 19.x, ..." ] ] && debian-based-1 && ubuntu18 && debian-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Ubuntu 20.04, Linux Mint 20.x, Pop!_OS 20.04, ..." ] ] && debian-based-1 && ubuntu20 && debian-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Ubuntu 20.10" ] ] && debian-based-1 && ubuntu20_10 && debian-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Ubuntu 21.04, Pop!_OS 21.04, ..." ] ] && ubuntu21 && debian-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Ubuntu 21.10" ] ] && ubuntu21_10 && debian-based-2
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Void Linux" ] ] && void-linux
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $select_os = "Gentoo Linux" ] ] && gentoo-linux
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ " $select_os " ] ] || echo "Go back" && setupact-select-opengl_dxvk
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Install some extensions with a manager!
function setupact-f360extensions {
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
f360_extension = $( zenity --list \
--checklist \
--title= " $program_name " \
--width= 1000 \
--height= 500 \
--column= " $text_select " --column= " $text_extension " --column= " $text_extension_description " \
FALSE "Airfoil Tools" " $text_extension_description_1 " \
FALSE "Additive Assistant (FFF)" " $text_extension_description_2 " \
FALSE "Czech localization for F360" " $text_extension_description_3 " \
FALSE "HP 3D Printers for Autodesk® Fusion 360™" " $text_extension_description_4 " \
FALSE "OctoPrint for Autodesk® Fusion 360™" " $text_extension_description_5 " \
FALSE "RoboDK" " $text_extension_description_6 " )
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_extension = *"Airfoil Tools" * ] ] && airfoil-tools-extension
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_extension = *"Additive Assistant (FFF)" * ] ] && additive-assistant-extension
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_extension = *"Czech localization for F360" * ] ] && czech-locale-extension
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_extension = *"HP 3D Printers for Autodesk® Fusion 360™" * ] ] && hp-3dprinter-connector-extension
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_extension = *"OctoPrint for Autodesk® Fusion 360™" * ] ] && octoprint-extension
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_extension = *"RoboDK" * ] ] && robodk-extension
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ " $f360_extension " ] ] || echo "Nothing selected!"
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Select the downloaded installer for this special extension!
function czech-locale-search-extension {
CZECH_LOCALE_EXTENSION = ` zenity --file-selection --title= " $text_select_czech_plugin " `
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
case $? in
0)
echo " \" $FILE \" selected. " ; ;
1)
zenity --info \
--text= " $text_info_czech_plugin "
setupact-f360extensions
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
# Autodesk Fusion 360 has already been installed on your system and you will now be given various options to choose from!
2021-11-23 09:21:27 +01:00
function setupact-modify-f360 {
f360_modify = $( zenity --list \
2021-10-21 20:22:44 +02:00
--radiolist \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--column= " $text_select " --column= " $text_select_option " \
TRUE " $text_select_option_1 " \
FALSE " $text_select_option_2 " \
2021-11-08 11:04:37 +01:00
FALSE " $text_select_option_3 " \
False " $text_select_option_4 " )
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_modify = " $text_select_option_1 " ] ] && logfile_install = 1 && setupact-new-edit-f360
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_modify = " $text_select_option_2 " ] ] && setupact-new-edit-f360
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ $f360_modify = " $text_select_option_3 " ] ] && setupact-select-f360-path && setupact-f360extensions && setupact-completed
2021-11-08 11:04:37 +01:00
2021-11-23 09:21:27 +01:00
[ [ $f360_modify = " $text_select_option_4 " ] ] && setupact-deinstall-f360
2021-10-21 20:22:44 +02:00
2021-11-23 09:21:27 +01:00
[ [ " $f360_modify " ] ] || echo "Go back" && setupact-configure-locale
2021-10-21 20:22:44 +02:00
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# View the exits Wineprefixes of Autodesk Fusion 360 on your system.
function setupact-new-edit-f360 {
read_f360_path_log = ` dirname $0 ` /data/logfiles/f360-path
f360_wineprefixes = ` zenity --text-info \
2021-10-21 20:22:44 +02:00
--title= " $program_name " \
--width= 700 \
--height= 500 \
2021-11-23 09:21:27 +01:00
--filename= $read_f360_path_log \
2021-10-21 20:22:44 +02:00
--checkbox= " $text_new_installation_checkbox " `
case $? in
0)
2021-11-23 09:21:27 +01:00
setupact-f360-path
setupact-select-opengl_dxvk
2021-10-21 20:22:44 +02:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-modify-f360
2021-10-21 20:22:44 +02:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# Deinstall a exist Wineprefix of Autodesk Fusion 360!
function setupact-deinstall-f360 {
2021-10-21 20:22:44 +02:00
file = ` dirname $0 ` /data/logfiles/log-path
directory = ` zenity --text-info \
--title= " $program_name " \
--width= 700 \
--height= 500 \
--filename= $file \
2021-11-23 09:21:27 +01:00
--editable \
--checkbox= " $text_deinstall_checkbox " `
2021-10-21 20:22:44 +02:00
case $? in
0)
2021-11-23 09:21:27 +01:00
zenity --question \
--title= " $program_name " \
--text= " $text_deinstall_question " \
--width= 400 \
--height= 100
answer = $?
2021-11-08 11:04:37 +01:00
2021-11-23 09:21:27 +01:00
if [ " $answer " -eq 0 ] ; then
echo " $directory " > $file
cp " $file " $HOME /.local/share/fusion360/logfiles
setupact-remove-f360
elif [ " $answer " -eq 1 ] ; then
setupact-deinstall-f360
fi
2021-11-08 11:04:37 +01:00
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-modify-f360
2021-11-08 11:04:37 +01:00
; ;
-1)
zenity --error \
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
function setupact-f360-modify-launcher {
modify_f360_launcher = ` dirname $0 ` /data/fusion360/Fusion360launcher
launcher = ` zenity --text-info \
2021-10-21 20:22:44 +02:00
--title= " $program_name " \
2021-11-23 09:21:27 +01:00
--width= 1000 \
2021-10-21 20:22:44 +02:00
--height= 500 \
2021-11-23 09:21:27 +01:00
--filename= $modify_f360_launcher \
2021-10-21 20:22:44 +02:00
--editable \
2021-11-23 09:21:27 +01:00
--checkbox= " $text_desktop_launcher_custom_checkbox " `
2021-10-21 20:22:44 +02:00
case $? in
0)
zenity --question \
--title= " $program_name " \
2021-11-23 09:21:27 +01:00
--text= " $text_desktop_launcher_custom_question " \
2021-10-21 20:22:44 +02:00
--width= 400 \
--height= 100
answer = $?
if [ " $answer " -eq 0 ] ; then
2021-11-23 10:57:18 +01:00
echo " $launcher " > $modify_f360_launcher
2021-11-23 09:21:27 +01:00
rm " $HOME /.local/share/fusion360/launcher.sh "
mv $modify_f360_launcher " $HOME /.local/applications/wine/Programs/Autodesk/fusion360-launcher.sh "
2021-10-21 20:22:44 +02:00
elif [ " $answer " -eq 1 ] ; then
2021-11-23 09:21:27 +01:00
setupact-f360-modify-launcher
2021-10-21 20:22:44 +02:00
fi
; ;
1)
echo "Go back"
2021-11-23 09:21:27 +01:00
setupact-f360-modify-launcher
2021-10-21 20:22:44 +02:00
; ;
-1)
2021-11-23 09:21:27 +01:00
zenity --error \
2021-10-21 20:22:44 +02:00
--text= " $text_error "
exit;
; ;
esac
}
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
# The installation is complete and will be terminated.
function setupact-completed {
2021-10-21 20:22:44 +02:00
zenity --info \
--width= 400 \
--height= 100 \
2021-11-23 09:21:27 +01:00
--text= " $text_completed_installation "
2021-10-21 20:22:44 +02:00
exit;
}
###############################################################################################################################################################
# Abort the installation of Autodesk Fusion 360!
2021-11-23 09:21:27 +01:00
function setupact-configure-locale-abort {
2021-10-21 20:22:44 +02:00
zenity --question \
--title= " $program_name " \
--text= " $text_abort " \
--width= 400 \
--height= 100
answer = $?
if [ " $answer " -eq 0 ] ; then
exit;
elif [ " $answer " -eq 1 ] ; then
2021-11-23 09:21:27 +01:00
setupact-configure-locale
2021-10-21 20:22:44 +02:00
fi
}
###############################################################################################################################################################
# The uninstallation is complete and will be terminated.
2021-11-23 09:21:27 +01:00
function setupact-uninstall-completed {
2021-10-21 20:22:44 +02:00
zenity --info \
--width= 400 \
--height= 100 \
--text= " $text_completed_deinstallation "
exit;
}
###############################################################################################################################################################
# THE INSTALLATION PROGRAM IS STARTED HERE: #
###############################################################################################################################################################
2021-11-23 09:21:27 +01:00
setupact-log
setupact-welcome