From e52c9f34e29885fd6580c26608db76ec02afb0cc Mon Sep 17 00:00:00 2001 From: Steve Zabka <79079633+cryinkfly@users.noreply.github.com> Date: Sun, 20 Feb 2022 10:27:44 +0100 Subject: [PATCH] Update install.sh --- files/builds/stable-branch/bin/install.sh | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/files/builds/stable-branch/bin/install.sh b/files/builds/stable-branch/bin/install.sh index 967b24b..dd33d9d 100644 --- a/files/builds/stable-branch/bin/install.sh +++ b/files/builds/stable-branch/bin/install.sh @@ -429,3 +429,75 @@ function ultimaker-digital-factory-extension { wget -N https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/raw/main/files/extensions/Ultimaker_Digital_Factory-win64.msi && WINEPREFIX=$wineprefixname msiexec /i Ultimaker_Digital_Factory-win64.msi } + +############################################################################################################################################################### +# ALL DIALOGS ARE ARRANGED HERE: # +############################################################################################################################################################### + +# 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 +} + +############################################################################################################################################################### + +# A progress bar is displayed here. +function setupact-progressbar { + ( + echo "5" ; sleep 1 + echo "# Creating folder structure." ; sleep 1 + setupact-structure + echo "25" ; sleep 1 + echo "# Loading locale files." ; sleep 1 + setupact-load-locale + echo "55" ; sleep 1 + echo "# Loading winetricks script." ; sleep 1 + setupact-load-winetricks + echo "75" ; sleep 1 + echo "# Downloading Fusion 360 installation file." ; sleep 1 + setupact-load-f360exe + echo "90" ; sleep 1 + echo "# The installation can now be started!" ; sleep 1 + echo "100" ; sleep 1 + ) | + zenity --progress \ + --title="$program_name" \ + --text="The Setup Wizard is being configured ..." \ + --width=400 \ + --height=100 \ + --percentage=0 + + if [ "$?" = 0 ] ; then + setupact-configure-locale + 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 + setupact-progressbar + fi + elif [ "$?" = -1 ] ; then + zenity --error \ + --text="An unexpected error occurred!" + exit; + fi +} + +###############################################################################################################################################################