diff --git a/files/builds/stable-branch/bin/uninstall.sh b/files/builds/stable-branch/bin/uninstall.sh index e32b063..7d1a422 100644 --- a/files/builds/stable-branch/bin/uninstall.sh +++ b/files/builds/stable-branch/bin/uninstall.sh @@ -22,6 +22,7 @@ program_name="Autodesk Fusion 360 for Linux - Uninstall" # ALL FUNCTIONS ARE ARRANGED HERE: # ############################################################################################################################################################### + # Get a file where the user can see the exits Wineprefixes of Autodesk Fusion 360 on the system. function setupact-get-wineprefixes-log { mkdir -p "/tmp/fusion-360/logs" @@ -31,6 +32,55 @@ function setupact-get-wineprefixes-log { ############################################################################################################################################################### +# Load the locale files for the setup wizard. + +function load-locale-cs { + profile_locale="cs-CZ" + . $HOME/.config/fusion-360/locale/cs-CZ/locale-cs.sh +} + +function load-locale-de { + profile_locale="de-DE" + . $HOME/.config/fusion-360/locale/de-DE/locale-de.sh +} + +function load-locale-en { + profile_locale="en-US" + . $HOME/.config/fusion-360/locale/en-US/locale-en.sh +} + +function load-locale-es { + profile_locale="es-ES" + . $HOME/.config/fusion-360/locale/es-ES/locale-es.sh +} + +function load-locale-fr { + profile_locale="fr-FR" + . $HOME/.config/fusion-360/locale/fr-FR/locale-fr.sh +} + +function load-locale-it { + profile_locale="it-IT" + . $HOME/.config/fusion-360/locale/it-IT/locale-it.sh +} + +function load-locale-ja { + profile_locale="ja-JP" + . $HOME/.config/fusion-360/locale/ja-JP/locale-ja.sh +} + +function load-locale-ko { + profile_locale="ko-KR" + . $HOME/.config/fusion-360/locale/ko-KR/locale-ko.sh +} + +function load-locale-zh { + profile_locale="zh-CN" + . $HOME/.config/fusion-360/locale/zh-CN/locale-zh.sh +} + +############################################################################################################################################################### + # Remove a exist Wineprefix of Autodesk Fusion 360! function setupact-uninstall { setupact-select-wineprefix-info @@ -43,6 +93,47 @@ function setupact-uninstall { # ALL DIALOGS ARE ARRANGED HERE: # ############################################################################################################################################################### +# Configure the locale for the Uninstall of Autodesk Fusion 360! +function setupact-uninstall-configure-locale { + select_locale=$(zenity --list \ + --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") + + [[ $select_locale = "English (Standard)" ]] && load-locale-en && setupact-uninstall-question + + [[ $select_locale = "German" ]] && load-locale-de && setupact-uninstall-question + + [[ $select_locale = "Czech" ]] && load-locale-cs && setupact-uninstall-question + + [[ $select_locale = "Spanish" ]] && load-locale-es && setupact-uninstall-question + + [[ $select_locale = "French" ]] && load-locale-fr && setupact-uninstall-question + + [[ $select_locale = "Italian" ]] && load-locale-it && setupact-uninstall-question + + [[ $select_locale = "Japanese" ]] && load-locale-ja && setupact-uninstall-question + + [[ $select_locale = "Korean" ]] && load-locale-ko && setupact-uninstall-question + + [[ $select_locale = "Chinese" ]] && load-locale-zh && setupact-uninstall-question + + [[ "$select_locale" ]] || setupact-configure-locale-abort +} + +############################################################################################################################################################### + # The user will be asked if he wants to uninstall or not. function setupact-uninstall-question { zenity --question \ @@ -153,4 +244,4 @@ function setupact-uninstall-completed { ############################################################################################################################################################### setupact-get-wineprefixes-log -setupact-uninstall-question +setupact-uninstall-configure-locale