forked from FotoCoder/Backuppy
Installing necessary PySide2 package for GUI-mode
This commit is contained in:
parent
8e7afcedce
commit
5852ac6b62
3 changed files with 6 additions and 7 deletions
|
@ -3,6 +3,7 @@
|
|||
## [0.8] - 2021-05-07
|
||||
### Added
|
||||
- Introduce "Browse"-button on directory-selection dialogs
|
||||
- Installing necessary PySide2 package for GUI-mode if not existing
|
||||
|
||||
## [0.7] - 2021-05-06
|
||||
### Added
|
||||
|
|
11
install.py
11
install.py
|
@ -35,10 +35,6 @@ def set_language(language):
|
|||
global LANGUAGE
|
||||
LANGUAGE = language
|
||||
|
||||
def set_exclude(exclude_flag):
|
||||
global EXCLUDE
|
||||
EXCLUDE = exclude_flag
|
||||
|
||||
def trace(message_txt):
|
||||
""" Print a formatted message to std out. """
|
||||
print("[ OK ] " + message_txt)
|
||||
|
@ -73,11 +69,12 @@ def main_install_cli():
|
|||
|
||||
# asks if you want to exclude files/directories from backup and creates an exclude file in case of Yes
|
||||
exclude = input(get_lang_text("excludefile1") + "\n> ")
|
||||
global EXCLUDE
|
||||
if exclude.upper() in ("J", "Y"):
|
||||
set_exclude(True)
|
||||
EXCLUDE = True
|
||||
print(get_lang_text("excludefile2") + "\n")
|
||||
else:
|
||||
set_exclude(False)
|
||||
EXCLUDE = False
|
||||
print(get_lang_text("excludefile3") + "\n")
|
||||
time.sleep(1)
|
||||
|
||||
|
@ -167,7 +164,7 @@ def main(argv):
|
|||
|
||||
if argv and argv[0] == "--gui":
|
||||
from install_gui import main_install_gui
|
||||
trace("Starting GUI-version.\n")
|
||||
trace("Starting GUI-version.")
|
||||
is_finalized, is_exclude, rsync_cmd = main_install_gui() # collect user input via GUI and store in env. variables
|
||||
|
||||
else:
|
||||
|
|
|
@ -18,6 +18,7 @@ if [ "$1" == "--gui" ]; then
|
|||
if ! pip list | grep PySide2> /dev/null
|
||||
then
|
||||
# Install PySide2
|
||||
echo -e "Installing necessary PySide2 package for GUI-mode."
|
||||
pip3 install PySide2
|
||||
fi
|
||||
# Launch python installer in GUI mode
|
||||
|
|
Loading…
Reference in a new issue