Add a function for logging the installation steps

We added this feature so that I can see where the installation may have stopped. (https://github.com/cryinkfly/Fusion-360---Linux-Wine-Version-/issues/87#issuecomment-914233381)
This commit is contained in:
Steve Zabka
2021-09-08 08:19:36 +02:00
committed by GitHub
parent be4c3e81d8
commit 170e7ee090

View File

@@ -1,5 +1,3 @@
#!/bin/bash
##############################################################################
# Name: Autodesk Fusion 360 - Installationsskript (Linux) #
# Description: With this file you can install Autodesk Fusion 360 on Linux. #
@@ -7,8 +5,8 @@
# Author URI: https://cryinkfly.com #
# License: MIT #
# Copyright (c) 2020-2021 #
# Time/Date: 15:00/04.09.2021 #
# Version: 4.0 #
# Time/Date: 08:15/08.09.2021 #
# Version: 4.1 #
##############################################################################
##############################################################################
@@ -110,7 +108,7 @@ function welcome-screen-1 {
HEIGHT=15
WIDTH=60
CHOICE_HEIGHT=2
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.0"
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.1"
TITLE="Do you wish to install Autodesk Fusion 360?"
MENU="Choose one of the following options:"
@@ -147,7 +145,7 @@ function welcome-screen-2 {
HEIGHT=15
WIDTH=180
CHOICE_HEIGHT=3
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.0"
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.1"
TITLE="This Setup has checked your system for a existing Autodesk Fusion 360 components and it was found that Autodesk Fusion 360 already exists on your system!"
MENU="Choose one of the following options:"
@@ -195,7 +193,7 @@ function select-dxvk-or-opengl {
HEIGHT=15
WIDTH=200
CHOICE_HEIGHT=10
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.0"
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.1"
TITLE="Select preferred driver"
MENU="Choose one of the following options:"
@@ -293,7 +291,7 @@ function select-your-os {
HEIGHT=15
WIDTH=200
CHOICE_HEIGHT=10
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.0"
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.1"
TITLE="Select your Linux distribution"
MENU="Choose one of the following options:"
@@ -461,7 +459,7 @@ function archlinux-1 {
HEIGHT=15
WIDTH=60
CHOICE_HEIGHT=2
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.0"
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.1"
TITLE="If you have enabled multilib repository?"
MENU="Choose one of the following options:"
@@ -551,7 +549,7 @@ HEIGHT=15
WIDTH=200
CHOICE_HEIGHT=2
CHOICE_WIDTH=200
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.0"
BACKTITLE="Installation of Autodesk Fusion360 - Version 4.1"
TITLE="Choose setup type"
MENU="Choose the kind of setup that best suits your needs."
@@ -580,11 +578,11 @@ esac
function select-your-path-custom {
dialog --backtitle "Installation of Autodesk Fusion360 - Version 4.0" \
dialog --backtitle "Installation of Autodesk Fusion360 - Version 4.1" \
--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/.wineprefixes/fusion360).' 14 200
filename=$(dialog --stdout --title "Enter the installation path for Fusion 360:" --backtitle "Installation of Autodesk Fusion360 - Version 4.0" --fselect $HOME/ 14 100)
filename=$(dialog --stdout --title "Enter the installation path for Fusion 360:" --backtitle "Installation of Autodesk Fusion360 - Version 4.1" --fselect $HOME/ 14 100)
}
##############################################################################
@@ -670,15 +668,22 @@ function change-fusion360-2 {
# A log file will now be created here so that it can be checked in the future whether an installation of Autodesk Fusion 360 already exists on your system.
function logfile-installation {
mkdir -p "/$HOME/.local/share/fusion360/logfiles" &&
exec 5> /$HOME/.local/share/fusion360/logfiles/install-log.txt
BASH_XTRACEFD="5"
set -x
}
function logfile-installation-standard {
mkdir -p "/$HOME/.local/share/fusion360/logfiles/path-log.txt" &&
cd "/$HOME/.local/share/fusion360/logfiles/path-log.txt" &&
echo "/home/$USER/.wineprefixes/fusion360" >> path-log.txt
mkdir -p "/$HOME/.local/share/fusion360/logfiles" &&
cd "/$HOME/.local/share/fusion360/logfiles" &&
echo "/home/$USER/.wineprefixes/fusion360/logfiles" >> path-log.txt
}
function logfile-installation-custom {
mkdir -p "/$HOME/.local/share/fusion360/logfiles/path-log.txt" &&
cd "/$HOME/.local/share/fusion360/logfiles/path-log.txt" &&
mkdir -p "/$HOME/.local/share/fusion360/logfiles" &&
cd "/$HOME/.local/share/fusion360/logfiles" &&
echo "$filename" >> path-log.txt
}
@@ -712,6 +717,7 @@ function program-exit {
# THE INSTALLATION PROGRAM IS STARTED HERE:
##############################################################################
logfile-installation &&
clear &&
select-language &&
check-requirement