mirror of
https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux.git
synced 2025-11-18 02:50:41 +01:00
Update setup.py
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
# License: MIT #
|
# License: MIT #
|
||||||
# Copyright (c) 2020-2022 #
|
# Copyright (c) 2020-2022 #
|
||||||
# Time/Date: xx:xx/xx.xx.2022 #
|
# Time/Date: xx:xx/xx.xx.2022 #
|
||||||
# Version: 1.8.1 > 7.7.0 (Adaptation to release publications) #
|
# Version: 1.8.1 > 1.8.2 #
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
|
|
||||||
# Path: /$HOME/.fusion360/bin/setup.py
|
# Path: /$HOME/.fusion360/bin/setup.py
|
||||||
@@ -49,9 +49,26 @@ from PIL import Image, ImageTk
|
|||||||
# The OS module in Python gives you access to some functions of the operating system.
|
# The OS module in Python gives you access to some functions of the operating system.
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
# Python can very easily use an Internet browser installed on the system via the webbrowser module and transfer it a URL.
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
|
# The linecache module allows one to get any line from a Python source file, while attempting to optimize internally, using a cache, the common case where many lines are read from a single file.
|
||||||
|
import linecache
|
||||||
|
|
||||||
|
###############################################################################################################################################################
|
||||||
|
# CONFIGURE THE LANGUAGE OF THE SETUP WIZARD HERE: #
|
||||||
|
###############################################################################################################################################################
|
||||||
|
|
||||||
|
# Reading lines from a file includes the newline newline character. It can be easily subtracted with this extension:
|
||||||
|
# linecache.getline('../textfile.txt', 1) + .rstrip('\n')
|
||||||
|
|
||||||
|
label_window_title = linecache.getline('../locale/en-EN/en-locale.txt', 1).rstrip('\n')
|
||||||
|
label_root_tab_name0 = linecache.getline('../locale/en-EN/en-locale.txt', 2).rstrip('\n')
|
||||||
|
label_root_tab_name1 = linecache.getline('../locale/en-EN/en-locale.txt', 3).rstrip('\n')
|
||||||
|
label_root_tab_name2 = linecache.getline('../locale/en-EN/en-locale.txt', 4).rstrip('\n')
|
||||||
|
label_root_tab_name3 = linecache.getline('../locale/en-EN/en-locale.txt', 5).rstrip('\n')
|
||||||
|
label_root_tab_name4 = linecache.getline('../locale/en-EN/en-locale.txt', 6).rstrip('\n')
|
||||||
|
label_root_tab_name5 = linecache.getline('../locale/en-EN/en-locale.txt', 7).rstrip('\n')
|
||||||
|
|
||||||
###############################################################################################################################################################
|
###############################################################################################################################################################
|
||||||
# SET UP THE COLOR SHEME FOR THE SETUP WIZARD HERE: #
|
# SET UP THE COLOR SHEME FOR THE SETUP WIZARD HERE: #
|
||||||
@@ -77,7 +94,7 @@ window_width = 750
|
|||||||
###############################################################################################################################################################
|
###############################################################################################################################################################
|
||||||
|
|
||||||
window = tk.Tk()
|
window = tk.Tk()
|
||||||
window.title('Setup Wizard - Autodesk Fusion 360 for Linux')
|
window.title(label_window_title)
|
||||||
window.configure(bg=color1)
|
window.configure(bg=color1)
|
||||||
window.iconphoto(False, tk.PhotoImage(file='../images/fusion360.png'))
|
window.iconphoto(False, tk.PhotoImage(file='../images/fusion360.png'))
|
||||||
|
|
||||||
@@ -128,12 +145,12 @@ notebook_root_tab5 = tk.Frame(notebook_root, width=700, height=400, bg=color3)
|
|||||||
notebook_root_tab6 = tk.Frame(notebook_root, width=700, height=400, bg=color3)
|
notebook_root_tab6 = tk.Frame(notebook_root, width=700, height=400, bg=color3)
|
||||||
|
|
||||||
# Add the tabs to Notebook widget:
|
# Add the tabs to Notebook widget:
|
||||||
notebook_root.add(notebook_root_tab1, text='Welcome')
|
notebook_root.add(notebook_root_tab1, text=label_root_tab_name0)
|
||||||
notebook_root.add(notebook_root_tab2, text='Installation')
|
notebook_root.add(notebook_root_tab2, text=label_root_tab_name1)
|
||||||
notebook_root.add(notebook_root_tab3, text='Plugins')
|
notebook_root.add(notebook_root_tab3, text=label_root_tab_name2)
|
||||||
notebook_root.add(notebook_root_tab4, text='System Info')
|
notebook_root.add(notebook_root_tab4, text=label_root_tab_name3)
|
||||||
notebook_root.add(notebook_root_tab5, text='About')
|
notebook_root.add(notebook_root_tab5, text=label_root_tab_name4)
|
||||||
notebook_root.add(notebook_root_tab6, text='Help')
|
notebook_root.add(notebook_root_tab6, text=label_root_tab_name5)
|
||||||
notebook_root.pack(pady=20,padx=20, expand=True)
|
notebook_root.pack(pady=20,padx=20, expand=True)
|
||||||
|
|
||||||
###############################################################################################################################################################
|
###############################################################################################################################################################
|
||||||
@@ -142,29 +159,29 @@ notebook_root.pack(pady=20,padx=20, expand=True)
|
|||||||
|
|
||||||
# Frame 1 - Left-Side:
|
# Frame 1 - Left-Side:
|
||||||
notebook_root_tab1_frame_photo = tk.PhotoImage(file='../images/welcome.png')
|
notebook_root_tab1_frame_photo = tk.PhotoImage(file='../images/welcome.png')
|
||||||
notebook_root_tab1_frame_image_label = ttk.Label(notebook_root_tab1, image=notebook_root_tab1_frame_photo)
|
notebook_root_tab1_frame_image_label = ttk.Label(notebook_root_tab1, image=notebook_root_tab1_frame_photo, background=color3)
|
||||||
notebook_root_tab1_frame_image_label.pack(padx=20, pady=20, side='left', fill='both', expand=False)
|
notebook_root_tab1_frame_image_label.pack(padx=20, side='left', expand=False)
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------- #
|
# ----------------------------------------------------------------------------------------------- #
|
||||||
|
|
||||||
# Frame 1 - Right-Side:
|
# Frame 1 - Right-Side:
|
||||||
notebook_root_tab1_frame_text = tk.Frame(notebook_root_tab1, background=color3)
|
notebook_root_tab1_frame_text = tk.Frame(notebook_root_tab1, background=color3)
|
||||||
notebook_root_tab1_frame_text.pack(padx=40)
|
notebook_root_tab1_frame_text.pack(padx=40)
|
||||||
notebook_root_tab1_frame_title = tk.Label(notebook_root_tab1_frame_text, text="Welcome to the Autodesk Fusion 360 for Linux Setup Wizard", font=(24), background=color3, foreground=color2)
|
notebook_root_tab1_frame_title = tk.Label(notebook_root_tab1_frame_text, text="Welcome to the Autodesk Fusion 360 for Linux Setup Wizard", wraplength=430, justify="left", font=(24), background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_title.pack(pady=20, anchor="w")
|
notebook_root_tab1_frame_title.pack(pady=20, anchor="w")
|
||||||
notebook_root_tab1_frame_label1 = tk.Label(notebook_root_tab1_frame_text, text="Many thanks to you for deciding to use my setup wizard to be able to use Autodesk Fusion 360 on your computer.", wraplength=430, justify="left", background=color3, foreground=color2)
|
notebook_root_tab1_frame_label1 = tk.Label(notebook_root_tab1_frame_text, text="Many thanks to you for deciding to use my setup wizard to be able to use Autodesk Fusion 360 on your computer.", wraplength=430, justify="left", background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_label1.pack(pady=5, anchor="w")
|
notebook_root_tab1_frame_label1.pack(pady=5, anchor="w")
|
||||||
notebook_root_tab1_frame_label2 = tk.Label(notebook_root_tab1_frame_text, text="This quick setup wizard will help you configure the basic settings and install the program. Furthermore, it is possible to install some tested plugins after the installation.", wraplength=430, justify="left", background=color3, foreground=color2)
|
notebook_root_tab1_frame_label2 = tk.Label(notebook_root_tab1_frame_text, text="This quick setup wizard will help you configure the basic settings and install the program. Furthermore, it is possible to install some tested plugins after the installation.", wraplength=430, justify="left", background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_label2.pack(pady=5, anchor="w")
|
notebook_root_tab1_frame_label2.pack(pady=5, anchor="w")
|
||||||
notebook_root_tab1_frame_label3 = tk.Label(notebook_root_tab1_frame_text, text="Depending on your current environment, setup may involve:", wraplength=430, background=color3, foreground=color2)
|
notebook_root_tab1_frame_label3 = tk.Label(notebook_root_tab1_frame_text, text="Depending on your current environment, setup may involve:", wraplength=430, justify="left", background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_label3.pack(pady=5, anchor="w")
|
notebook_root_tab1_frame_label3.pack(pady=5, anchor="w")
|
||||||
notebook_root_tab1_frame_label4 = tk.Label(notebook_root_tab1_frame_text, text="- Checking your system for minimum installation requirements.", wraplength=430, background=color3, foreground=color2)
|
notebook_root_tab1_frame_label4 = tk.Label(notebook_root_tab1_frame_text, text="- Checking your system for minimum installation requirements.", wraplength=430, justify="left", background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_label4.pack(anchor="w")
|
notebook_root_tab1_frame_label4.pack(anchor="w")
|
||||||
notebook_root_tab1_frame_label5 = tk.Label(notebook_root_tab1_frame_text, text="- It is recommended that you close all other applications before continuing.", wraplength=430, background=color3, foreground=color2)
|
notebook_root_tab1_frame_label5 = tk.Label(notebook_root_tab1_frame_text, text="- It is recommended that you close all other applications before continuing.", wraplength=430, justify="left", background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_label5.pack(anchor="w")
|
notebook_root_tab1_frame_label5.pack(anchor="w")
|
||||||
notebook_root_tab1_frame_label6 = tk.Label(notebook_root_tab1_frame_text, text="Click Next to continue, or Cancel to exit the Setup Wizard.", wraplength=430, background=color3, foreground=color2)
|
notebook_root_tab1_frame_label6 = tk.Label(notebook_root_tab1_frame_text, text="Click Next to continue, or Cancel to exit the Setup Wizard.", wraplength=430, justify="left", background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_label6.pack(pady=10, anchor="w")
|
notebook_root_tab1_frame_label6.pack(pady=10, anchor="w")
|
||||||
notebook_root_tab1_frame_label7 = ttk.Label(notebook_root_tab1_frame_text, text="Select Language:", background=color3, foreground=color2)
|
notebook_root_tab1_frame_label7 = ttk.Label(notebook_root_tab1_frame_text, text="Select Language:", justify="left", background=color3, foreground=color2)
|
||||||
notebook_root_tab1_frame_label7.pack(side='left', pady=5, padx=(0, 10))
|
notebook_root_tab1_frame_label7.pack(side='left', pady=5, padx=(0, 10))
|
||||||
|
|
||||||
# --------------------------------------------------- #
|
# --------------------------------------------------- #
|
||||||
@@ -177,6 +194,22 @@ def change_language(event):
|
|||||||
print("English selected!")
|
print("English selected!")
|
||||||
elif selected_language.get() == 'Deutsch':
|
elif selected_language.get() == 'Deutsch':
|
||||||
print("Deutsch selected!")
|
print("Deutsch selected!")
|
||||||
|
#label_root_tab_name1['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 2).rstrip('\n')
|
||||||
|
#label_root_tab_name1 = linecache.getline('../locale/de-DE/de-locale.txt', 3).rstrip('\n')
|
||||||
|
#label_root_tab_name2 = linecache.getline('../locale/de-DE/de-locale.txt', 4).rstrip('\n')
|
||||||
|
#label_root_tab_name3 = linecache.getline('../locale/de-DE/de-locale.txt', 5).rstrip('\n')
|
||||||
|
#label_root_tab_name4 = linecache.getline('../locale/de-DE/de-locale.txt', 6).rstrip('\n')
|
||||||
|
#label_root_tab_name5 = linecache.getline('../locale/de-DE/de-locale.txt', 7).rstrip('\n')
|
||||||
|
|
||||||
|
# Content of Tab1:
|
||||||
|
notebook_root_tab1_frame_title['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 8).rstrip('\n')
|
||||||
|
notebook_root_tab1_frame_label1['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 9).rstrip('\n')
|
||||||
|
notebook_root_tab1_frame_label2['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 10).rstrip('\n')
|
||||||
|
notebook_root_tab1_frame_label3['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 11).rstrip('\n')
|
||||||
|
notebook_root_tab1_frame_label4['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 12).rstrip('\n')
|
||||||
|
notebook_root_tab1_frame_label5['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 13).rstrip('\n')
|
||||||
|
notebook_root_tab1_frame_label6['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 14).rstrip('\n')
|
||||||
|
notebook_root_tab1_frame_label7['text'] = linecache.getline('../locale/de-DE/de-locale.txt', 15).rstrip('\n')
|
||||||
elif selected_language.get() == 'Español':
|
elif selected_language.get() == 'Español':
|
||||||
print("Español selected!")
|
print("Español selected!")
|
||||||
elif selected_language.get() == 'Français':
|
elif selected_language.get() == 'Français':
|
||||||
|
|||||||
Reference in New Issue
Block a user