Skip to content

Commit

Permalink
Add optarg and TUI to get winetricks. Fix #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
thw26 committed Jan 2, 2024
1 parent 64ec81c commit 0452178
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion LogosLinuxInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from control import remove_all_index_files
from control import remove_library_catalog
from installer import install
from installer import setWinetricks
from msg import cli_msg
from msg import initialize_logging
from msg import logos_error
Expand Down Expand Up @@ -56,6 +57,8 @@ def parse_command_line():
parser.add_argument('--shortcut', '-s', action='store_true', help='Create shortcut')
parser.add_argument('--passive', '-P', action='store_true', help='Install Faithlife product non-interactively')
parser.add_argument('--control-panel', '-C', action='store_true', help='Open Control Panel app')
parser.add_argument('--get-winetricks', action='store_true', help='Download or update Winetricks')
parser.add_argument('--run-winetricks', action='store_true', help='Download or update Winetricks')
return parser.parse_args()

def parse_args(args):
Expand Down Expand Up @@ -180,7 +183,7 @@ def main():
options_default = ["Install Logos Bible Software"]
options_exit = ["Exit"]
if file_exists(config.CONFIG_FILE):
options_installed = [f"Run {config.FLPRODUCT}", "Run Indexing", "Remove Library Catalog", "Remove All Index Files", "Edit Config", "Reinstall Dependencies", "Back up Data", "Restore Data", "Set AppImage", "Control Panel", "Run Winetricks"]
options_installed = [f"Run {config.FLPRODUCT}", "Run Indexing", "Remove Library Catalog", "Remove All Index Files", "Edit Config", "Reinstall Dependencies", "Back up Data", "Restore Data", "Set AppImage", "Control Panel", "Download or Update Winetricks", "Run Winetricks"]
if config.LOGS == "DISABLED":
options_installed.append("Enable Logging")
else:
Expand Down Expand Up @@ -222,6 +225,8 @@ def main():
set_appimage()
elif choice == "Control Panel":
run_control_panel()
elif choice == "Download or Update Winetricks":
setWinetricks()
elif choice == "Run Winetricks":
run_winetricks()
elif choice.endswith("Logging"):
Expand Down
4 changes: 2 additions & 2 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ def beginInstall(app=None):
logos_error(f"{wineserver_path} not found. Please either add it or create a symlink to it, and rerun.")

def downloadWinetricks():
cli_msg("Downloading winetricks...")
cli_msg("Downloading winetricks")
logos_reuse_download(config.WINETRICKS_URL, "winetricks", config.APPDIR_BINDIR)
os.chmod(f"{config.APPDIR_BINDIR}/winetricks", 0o755)

def setWinetricks():
cli_msg("Preparing winetricks...")
cli_msg("Preparing winetricks")
# Check if local winetricks version available; else, download it
if config.WINETRICKSBIN is None:
local_winetricks_path = shutil.which('winetricks')
Expand Down

0 comments on commit 0452178

Please sign in to comment.