diff --git a/.github/workflows/autobuild-main.yml b/.github/workflows/autobuild-main.yml index 74ed164c..c84f9b56 100644 --- a/.github/workflows/autobuild-main.yml +++ b/.github/workflows/autobuild-main.yml @@ -23,7 +23,7 @@ jobs: - name: Run shell tasks run: | echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV - find -name LogosLinuxInstaller -type f -exec chmod +x {} \; + find -name oudedatai -type f -exec chmod +x {} \; - name: Upload release to test repo uses: softprops/action-gh-release@v1 with: diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index dad654a0..2db56577 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -52,12 +52,12 @@ jobs: - name: Build with pyinstaller id: pyinstaller run: | - pyinstaller logos_on_linux.spec --clean - echo "bin_name=logos-on-linux" >> $GITHUB_OUTPUT + pyinstaller ou_dedatai.spec --clean + echo "bin_name=oudedatai" >> $GITHUB_OUTPUT - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: logos-on-linux - path: dist/logos-on-linux + name: oudedatai + path: dist/oudedatai compression-level: 0 diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 2e5348f9..f5b48c97 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -29,7 +29,7 @@ jobs: - name: download uses: actions/download-artifact@v4 with: - name: LogosLinuxInstaller + name: oudedatai - name: release uses: softprops/action-gh-release@v1 env: diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 11dd3e29..14659bcc 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -25,8 +25,8 @@ jobs: name: ${{ needs.build.outputs.bin_name }} - name: Fix file permissions run: | - find -name LogosLinuxInstaller -type f - find -name LogosLinuxInstaller -type f -exec chmod +x {} \; + find -name oudedatai -type f + find -name oudedatai -type f -exec chmod +x {} \; - name: Upload release to test repo uses: softprops/action-gh-release@v1 with: diff --git a/Dockerfile b/Dockerfile index ce814b8b..16ba9325 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM ubuntu:focal # Prevent popups during install of requirements ENV DEBIAN_FRONTEND=noninteractive -# LogosLinuxInstaller Requirements +# Ou Dedatai Requirements RUN apt update -qq && apt install -y -qq git build-essential gdb lcov pkg-config \ libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \ libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \ @@ -28,4 +28,4 @@ RUN pyenv install --verbose ${PYTHON_VERSION} RUN pyenv global ${PYTHON_VERSION} WORKDIR /usr/src/app -ENTRYPOINT ["sh", "-c", "pip install --no-cache-dir .[build] && pyinstaller logos_on_linux.spec"] +ENTRYPOINT ["sh", "-c", "pip install --no-cache-dir .[build] && pyinstaller ou_dedatai.spec"] diff --git a/README.md b/README.md index a6022172..030c65db 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,23 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/f730f74748c348cb9b3ff2fa1654c84b)](https://app.codacy.com/manual/FaithLife-Community/LogosLinuxInstaller?utm_source=github.com&utm_medium=referral&utm_content=FaithLife-Community/LogosLinuxInstaller&utm_campaign=Badge_Grade_Dashboard) [![Automation testing](https://img.shields.io/badge/Automation-testing-sucess)](https://github.com/FaithLife-Community/LogosLinuxInstallTests) [![Installer LogosBible](https://img.shields.io/badge/Installer-LogosBible-blue)](https://www.logos.com) [![LastRelease](https://img.shields.io/github/v/release/FaithLife-Community/LogosLinuxInstaller)](https://github.com/FaithLife-Community/LogosLinuxInstaller/releases) -# Install Logos Bible Software on Linux +# Ou Dedatai -This repository contains a Python program for installing and maintaining FaithLife's Logos Bible (Verbum) Software on Linux. +>Remember Jesus Christ, risen from the dead, the offspring of David, as preached in my gospel, for which I am suffering, bound with chains as a criminal. **But the word of God is not bound!** +ἀλλʼ **ὁ λόγος** τοῦ θεοῦ **οὐ δέδεται** +> +> Second Timothy 2:8–9, ESV + +## Manages Logos Bible Software via Wine + +This repository contains a Python program for installing and maintaining [FaithLife](https://faithlife.com/)'s [Logos Bible (Verbum) Software](https://www.logos.com/) via [Wine](https://www.winehq.org/). This program is created and maintained by the FaithLife Community and is licensed under the MIT License. -## LogosLinuxInstaller -The main program is a distributable executable and contains Python itself and all necessary Python packages. +## oudetai binary + +The main program is a distributable executable binary and contains Python itself and all necessary Python packages. When running the program, it will attempt to determine your operating system and package manager. It will then attempt to install all needed system dependencies during the installation of Logos. @@ -121,11 +129,11 @@ $ cd LogosLinuxInstaller # docker run --rm -v $(pwd):/usr/src/app logosinstaller ``` -The built binary will now be in `./dist/logos-on-linux`. +The built binary will now be in `./dist/oudedatai`. ## Install guide (possibly outdated) -NOTE: You can run Logos on Linux using the Steam Proton Experimental binary, which often has the latest and greatest updates to make Logos run even smoother. The script should be able to find the binary automatically, unless your Steam install is located outside of your HOME directory. +NOTE: You can run **Ou Dedatai** using the Steam Proton Experimental binary, which often has the latest and greatest updates to make Logos run even smoother. The script should be able to find the binary automatically, unless your Steam install is located outside of your HOME directory. If you want to install your distro's dependencies outside of the script, please see the [System Dependencies wiki page](https://github.com/FaithLife-Community/LogosLinuxInstaller/wiki/System-Dependencies). diff --git a/logos_on_linux.spec b/ou_dedatai.spec similarity index 83% rename from logos_on_linux.spec rename to ou_dedatai.spec index 50a0baba..e111c45f 100644 --- a/logos_on_linux.spec +++ b/ou_dedatai.spec @@ -6,8 +6,8 @@ a = Analysis( pathex=[], #binaries=[('/usr/bin/tclsh8.6', '.')], binaries=[], - datas=[('logos_on_linux/img/*-128-icon.png', 'img')], - hiddenimports=['logos_on_linux'], + datas=[('ou_dedatai/img/*-128-icon.png', 'img')], + hiddenimports=[], hookspath=[], hooksconfig={}, runtime_hooks=[], @@ -22,7 +22,7 @@ exe = EXE( a.binaries, a.datas, [], - name='logos-on-linux', + name='oudedatai', debug=False, bootloader_ignore_signals=False, strip=False, diff --git a/logos_on_linux/__init__.py b/ou_dedatai/__init__.py similarity index 100% rename from logos_on_linux/__init__.py rename to ou_dedatai/__init__.py diff --git a/logos_on_linux/cli.py b/ou_dedatai/cli.py similarity index 100% rename from logos_on_linux/cli.py rename to ou_dedatai/cli.py diff --git a/logos_on_linux/config.py b/ou_dedatai/config.py similarity index 92% rename from logos_on_linux/config.py rename to ou_dedatai/config.py index 6b308117..d1335065 100644 --- a/logos_on_linux/config.py +++ b/ou_dedatai/config.py @@ -5,6 +5,12 @@ from datetime import datetime +# Define app name variables. +name_app = 'Ou Dedatai' +name_binary = 'oudedatai' +name_package = 'ou_dedatai' +repo_link = "https://github.com/FaithLife-Community/LogosLinuxInstaller" + # Define and set variables that are required in the config file. core_config_keys = [ "FLPRODUCT", "TARGETVERSION", "TARGET_RELEASE_VERSION", @@ -27,7 +33,7 @@ 'DEBUG': False, 'DELETE_LOG': None, 'DIALOG': None, - 'LOGOS_LOG': os.path.expanduser("~/.local/state/FaithLife-Community/Logos_on_Linux.log"), # noqa: E501 + 'LOGOS_LOG': os.path.expanduser(f"~/.local/state/FaithLife-Community/{name_binary}.log"), # noqa: E501 'wine_log': os.path.expanduser("~/.local/state/FaithLife-Community/wine.log"), # noqa: #E501 'LOGOS_EXE': None, 'LOGOS_EXECUTABLE': None, @@ -57,7 +63,7 @@ APPIMAGE_FILE_PATH = None authenticated = False BADPACKAGES = None -DEFAULT_CONFIG_PATH = os.path.expanduser("~/.config/FaithLife-Community/Logos_on_Linux.json") # noqa: E501 +DEFAULT_CONFIG_PATH = os.path.expanduser(f"~/.config/FaithLife-Community/{name_binary}.json") # noqa: E501 FLPRODUCTi = None GUI = None INSTALL_STEP = 0 @@ -67,7 +73,7 @@ LLI_AUTHOR = "Ferion11, John Goodman, T. H. Wright, N. Marti" LLI_CURRENT_VERSION = "4.0.0-beta.1" LLI_LATEST_VERSION = None -LLI_TITLE = "Logos Linux Installer" +LLI_TITLE = name_app LOG_LEVEL = logging.WARNING LOGOS_BLUE = '#0082FF' LOGOS_GRAY = '#E7E7E7' @@ -77,7 +83,7 @@ LOGOS_FORCE_ROOT = False LOGOS_ICON_FILENAME = None LOGOS_ICON_URL = None -LOGOS_LATEST_VERSION_FILENAME = "LogosLinuxInstaller" +LOGOS_LATEST_VERSION_FILENAME = name_binary LOGOS_LATEST_VERSION_URL = None LOGOS9_RELEASES = None # used to save downloaded releases list LOGOS9_WINE64_BOTTLE_TARGZ_NAME = "wine64_bottle.tar.gz" @@ -91,6 +97,7 @@ PACKAGE_MANAGER_COMMAND_QUERY = None PACKAGES = None PASSIVE = None +pid_file = f'/tmp/{name_binary}.pid' PRESENT_WORKING_DIRECTORY = os.getcwd() QUERY_PREFIX = None REBOOT_REQUIRED = None diff --git a/logos_on_linux/control.py b/ou_dedatai/control.py similarity index 100% rename from logos_on_linux/control.py rename to ou_dedatai/control.py diff --git a/logos_on_linux/gui.py b/ou_dedatai/gui.py similarity index 100% rename from logos_on_linux/gui.py rename to ou_dedatai/gui.py diff --git a/logos_on_linux/gui_app.py b/ou_dedatai/gui_app.py similarity index 99% rename from logos_on_linux/gui_app.py rename to ou_dedatai/gui_app.py index 1165786b..4cd60f71 100644 --- a/logos_on_linux/gui_app.py +++ b/ou_dedatai/gui_app.py @@ -668,7 +668,7 @@ def configure_app_button(self, evt=None): self.gui.app_button.config(command=self.run_installer) def run_installer(self, evt=None): - classname = "LogosLinuxInstaller" + classname = config.name_binary self.installer_win = Toplevel() InstallerWindow(self.installer_win, self.root, class_=classname) self.root.icon = config.LOGOS_ICON_URL diff --git a/logos_on_linux/img/logos4-128-icon.png b/ou_dedatai/img/logos4-128-icon.png similarity index 100% rename from logos_on_linux/img/logos4-128-icon.png rename to ou_dedatai/img/logos4-128-icon.png diff --git a/logos_on_linux/img/step_01.png b/ou_dedatai/img/step_01.png similarity index 100% rename from logos_on_linux/img/step_01.png rename to ou_dedatai/img/step_01.png diff --git a/logos_on_linux/img/step_02.png b/ou_dedatai/img/step_02.png similarity index 100% rename from logos_on_linux/img/step_02.png rename to ou_dedatai/img/step_02.png diff --git a/logos_on_linux/img/step_03.png b/ou_dedatai/img/step_03.png similarity index 100% rename from logos_on_linux/img/step_03.png rename to ou_dedatai/img/step_03.png diff --git a/logos_on_linux/img/step_04.png b/ou_dedatai/img/step_04.png similarity index 100% rename from logos_on_linux/img/step_04.png rename to ou_dedatai/img/step_04.png diff --git a/logos_on_linux/img/step_05.png b/ou_dedatai/img/step_05.png similarity index 100% rename from logos_on_linux/img/step_05.png rename to ou_dedatai/img/step_05.png diff --git a/logos_on_linux/img/step_06.png b/ou_dedatai/img/step_06.png similarity index 100% rename from logos_on_linux/img/step_06.png rename to ou_dedatai/img/step_06.png diff --git a/logos_on_linux/img/step_07.png b/ou_dedatai/img/step_07.png similarity index 100% rename from logos_on_linux/img/step_07.png rename to ou_dedatai/img/step_07.png diff --git a/logos_on_linux/img/step_08.png b/ou_dedatai/img/step_08.png similarity index 100% rename from logos_on_linux/img/step_08.png rename to ou_dedatai/img/step_08.png diff --git a/logos_on_linux/img/step_09.png b/ou_dedatai/img/step_09.png similarity index 100% rename from logos_on_linux/img/step_09.png rename to ou_dedatai/img/step_09.png diff --git a/logos_on_linux/img/step_10.png b/ou_dedatai/img/step_10.png similarity index 100% rename from logos_on_linux/img/step_10.png rename to ou_dedatai/img/step_10.png diff --git a/logos_on_linux/img/step_11.png b/ou_dedatai/img/step_11.png similarity index 100% rename from logos_on_linux/img/step_11.png rename to ou_dedatai/img/step_11.png diff --git a/logos_on_linux/img/step_12.png b/ou_dedatai/img/step_12.png similarity index 100% rename from logos_on_linux/img/step_12.png rename to ou_dedatai/img/step_12.png diff --git a/logos_on_linux/img/step_13.png b/ou_dedatai/img/step_13.png similarity index 100% rename from logos_on_linux/img/step_13.png rename to ou_dedatai/img/step_13.png diff --git a/logos_on_linux/img/step_14.png b/ou_dedatai/img/step_14.png similarity index 100% rename from logos_on_linux/img/step_14.png rename to ou_dedatai/img/step_14.png diff --git a/logos_on_linux/img/step_15.png b/ou_dedatai/img/step_15.png similarity index 100% rename from logos_on_linux/img/step_15.png rename to ou_dedatai/img/step_15.png diff --git a/logos_on_linux/img/step_16.png b/ou_dedatai/img/step_16.png similarity index 100% rename from logos_on_linux/img/step_16.png rename to ou_dedatai/img/step_16.png diff --git a/logos_on_linux/img/step_17.png b/ou_dedatai/img/step_17.png similarity index 100% rename from logos_on_linux/img/step_17.png rename to ou_dedatai/img/step_17.png diff --git a/logos_on_linux/img/step_18.png b/ou_dedatai/img/step_18.png similarity index 100% rename from logos_on_linux/img/step_18.png rename to ou_dedatai/img/step_18.png diff --git a/logos_on_linux/img/step_19.png b/ou_dedatai/img/step_19.png similarity index 100% rename from logos_on_linux/img/step_19.png rename to ou_dedatai/img/step_19.png diff --git a/logos_on_linux/img/step_20.png b/ou_dedatai/img/step_20.png similarity index 100% rename from logos_on_linux/img/step_20.png rename to ou_dedatai/img/step_20.png diff --git a/logos_on_linux/img/step_21.png b/ou_dedatai/img/step_21.png similarity index 100% rename from logos_on_linux/img/step_21.png rename to ou_dedatai/img/step_21.png diff --git a/logos_on_linux/img/step_22.png b/ou_dedatai/img/step_22.png similarity index 100% rename from logos_on_linux/img/step_22.png rename to ou_dedatai/img/step_22.png diff --git a/logos_on_linux/img/verbum-128-icon.png b/ou_dedatai/img/verbum-128-icon.png similarity index 100% rename from logos_on_linux/img/verbum-128-icon.png rename to ou_dedatai/img/verbum-128-icon.png diff --git a/logos_on_linux/installer.py b/ou_dedatai/installer.py similarity index 99% rename from logos_on_linux/installer.py rename to ou_dedatai/installer.py index c303ec81..857c8e92 100644 --- a/logos_on_linux/installer.py +++ b/ou_dedatai/installer.py @@ -658,7 +658,7 @@ def ensure_launcher_executable(app=None): ) # Copy executable to config.INSTALLDIR. - launcher_exe = Path(f"{config.INSTALLDIR}/LogosLinuxInstaller") + launcher_exe = Path(f"{config.INSTALLDIR}/{config.name_binary})") if launcher_exe.is_file(): logging.debug("Removing existing launcher binary.") launcher_exe.unlink() @@ -809,7 +809,7 @@ def create_launcher_shortcuts(): logos_icon_path = app_dir / logos_icon_src.name if system.get_runmode() == 'binary': - lli_executable = f"{installdir}/LogosLinuxInstaller" + lli_executable = f"{installdir}/{config.name_binary}" else: script = Path(sys.argv[0]).expanduser().resolve() # Find python in virtual environment. diff --git a/logos_on_linux/logos.py b/ou_dedatai/logos.py similarity index 100% rename from logos_on_linux/logos.py rename to ou_dedatai/logos.py diff --git a/logos_on_linux/main.py b/ou_dedatai/main.py similarity index 98% rename from logos_on_linux/main.py rename to ou_dedatai/main.py index c7ce6e28..84cca545 100755 --- a/logos_on_linux/main.py +++ b/ou_dedatai/main.py @@ -384,8 +384,8 @@ def check_incompatibilities(): question_text = "Remove AppImageLauncher? A reboot will be required." secondary = ( "Your system currently has AppImageLauncher installed.\n" - "LogosLinuxInstaller is not compatible with AppImageLauncher.\n" - "For more information, see: https://github.com/FaithLife-Community/LogosLinuxInstaller/issues/114" # noqa: E501 + f"{config.name_app} is not compatible with AppImageLauncher.\n" + f"For more information, see: {config.repo_link}/issues/114" ) no_text = "User declined to remove AppImageLauncher." msg.logos_continue_question(question_text, no_text, secondary) @@ -466,7 +466,7 @@ def main(): def close(): - logging.debug("Closing Logos on Linux.") + logging.debug(f"Closing {config.name_app}.") for thread in threads: # Only wait on non-daemon threads. if not thread.daemon: @@ -477,7 +477,7 @@ def close(): wine.end_wine_processes() else: logging.debug("No extra processes found.") - logging.debug("Closing Logos on Linux finished.") + logging.debug(f"Closing {config.name_app} finished.") if __name__ == '__main__': diff --git a/logos_on_linux/msg.py b/ou_dedatai/msg.py similarity index 97% rename from logos_on_linux/msg.py rename to ou_dedatai/msg.py index f9d5b506..034a5dfc 100644 --- a/logos_on_linux/msg.py +++ b/ou_dedatai/msg.py @@ -165,7 +165,7 @@ def logos_warn(message): def ui_message(message, secondary=None, detail=None, app=None, parent=None, fatal=False): # noqa: E501 if detail is None: detail = '' - WIKI_LINK = "https://github.com/FaithLife-Community/LogosLinuxInstaller/wiki" # noqa: E501 + WIKI_LINK = f"{config.repo_link}/wiki" TELEGRAM_LINK = "https://t.me/linux_logos" MATRIX_LINK = "https://matrix.to/#/#logosbible:matrix.org" help_message = f"If you need help, please consult:\n{WIKI_LINK}\n{TELEGRAM_LINK}\n{MATRIX_LINK}" # noqa: E501 @@ -191,7 +191,7 @@ def ui_message(message, secondary=None, detail=None, app=None, parent=None, fata def logos_error(message, secondary=None, detail=None, app=None, parent=None): # if detail is None: # detail = '' - # WIKI_LINK = "https://github.com/FaithLife-Community/LogosLinuxInstaller/wiki" # noqa: E501 + # WIKI_LINK = f"{config.repo_link}/wiki" # TELEGRAM_LINK = "https://t.me/linux_logos" # MATRIX_LINK = "https://matrix.to/#/#logosbible:matrix.org" # help_message = f"If you need help, please consult:\n{WIKI_LINK}\n{TELEGRAM_LINK}\n{MATRIX_LINK}" # noqa: E501 @@ -215,7 +215,7 @@ def logos_error(message, secondary=None, detail=None, app=None, parent=None): logging.critical(message) if secondary is None or secondary == "": try: - os.remove("/tmp/LogosLinuxInstaller.pid") + os.remove(config.pid_file) except FileNotFoundError: # no pid file when testing functions pass os.kill(os.getpgid(os.getpid()), signal.SIGKILL) diff --git a/logos_on_linux/network.py b/ou_dedatai/network.py similarity index 98% rename from logos_on_linux/network.py rename to ou_dedatai/network.py index 6ea931eb..2d9af840 100644 --- a/logos_on_linux/network.py +++ b/ou_dedatai/network.py @@ -410,7 +410,7 @@ def set_logoslinuxinstaller_latest_release_config(): json_data = get_latest_release_data(releases_url) logoslinuxinstaller_url = get_latest_release_url(json_data) if logoslinuxinstaller_url is None: - logging.critical("Unable to set LogosLinuxInstaller release without URL.") # noqa: E501 + logging.critical(f"Unable to set {config.name_app} release without URL.") # noqa: E501 return config.LOGOS_LATEST_VERSION_URL = logoslinuxinstaller_url config.LOGOS_LATEST_VERSION_FILENAME = os.path.basename(logoslinuxinstaller_url) # noqa: #501 @@ -563,8 +563,8 @@ def get_logos_releases(app=None): def update_lli_binary(app=None): lli_file_path = os.path.realpath(sys.argv[0]) - lli_download_path = Path(config.MYDOWNLOADS) / "LogosLinuxInstaller" - temp_path = Path(config.MYDOWNLOADS) / "LogosLinuxInstaller.tmp" + lli_download_path = Path(config.MYDOWNLOADS) / config.name_binary + temp_path = Path(config.MYDOWNLOADS) / f"{config.name_binary}.tmp" logging.debug( f"Updating Logos Linux Installer to latest version by overwriting: {lli_file_path}") # noqa: E501 @@ -579,7 +579,7 @@ def update_lli_binary(app=None): logos_reuse_download( config.LOGOS_LATEST_VERSION_URL, - "LogosLinuxInstaller", + config.name_binary, config.MYDOWNLOADS, app=app, ) diff --git a/logos_on_linux/system.py b/ou_dedatai/system.py similarity index 99% rename from logos_on_linux/system.py rename to ou_dedatai/system.py index 474264c4..c2d3a40a 100644 --- a/logos_on_linux/system.py +++ b/ou_dedatai/system.py @@ -715,7 +715,7 @@ def install_dependencies(packages, bad_packages, logos9_packages=None, app=None) message = "The system needs to install/remove packages, but it requires manual intervention." # noqa: E501 detail = ( "Please run the following command in a terminal, then restart " - f"LogosLinuxInstaller:\n{sudo_command}\n" + f"{config.name_app}:\n{sudo_command}\n" ) if config.DIALOG == "tk": if hasattr(app, 'root'): @@ -739,7 +739,7 @@ def install_dependencies(packages, bad_packages, logos9_packages=None, app=None) 17, app.manualinstall_q, app.manualinstall_e, - f"Please run the following command in a terminal, then select \"Continue\" when finished.\n\nLogosLinuxInstaller:\n{sudo_command}\n", # noqa: E501 + f"Please run the following command in a terminal, then select \"Continue\" when finished.\n\n{config.name_app}:\n{sudo_command}\n", # noqa: E501 "User cancelled dependency installation.", # noqa: E501 message, options=["Continue", "Return to Main Menu"], dialog=config.use_python_dialog)) # noqa: E501 diff --git a/logos_on_linux/tui_app.py b/ou_dedatai/tui_app.py similarity index 98% rename from logos_on_linux/tui_app.py rename to ou_dedatai/tui_app.py index 12df17d1..16918cbb 100644 --- a/logos_on_linux/tui_app.py +++ b/ou_dedatai/tui_app.py @@ -26,11 +26,11 @@ class TUI: def __init__(self, stdscr): self.stdscr = stdscr - #if config.current_logos_version is not None: - self.title = f"Welcome to Logos on Linux {config.LLI_CURRENT_VERSION} ({config.lli_release_channel})" - self.subtitle = f"Logos Version: {config.current_logos_version} ({config.logos_release_channel})" - #else: - # self.title = f"Welcome to Logos on Linux ({config.LLI_CURRENT_VERSION})" + # if config.current_logos_version is not None: + self.title = f"Welcome to {config.name_app} {config.LLI_CURRENT_VERSION} ({config.lli_release_channel})" # noqa: E501 + self.subtitle = f"Logos Version: {config.current_logos_version} ({config.logos_release_channel})" # noqa: E501 + # else: + # self.title = f"Welcome to {config.name_app} ({config.LLI_CURRENT_VERSION})" # noqa: E501 self.console_message = "Starting TUI…" self.llirunning = True self.active_progress = False @@ -233,15 +233,15 @@ def end(self, signal, frame): def update_main_window_contents(self): self.clear() - self.title = f"Welcome to Logos on Linux {config.LLI_CURRENT_VERSION} ({config.lli_release_channel})" - self.subtitle = f"Logos Version: {config.current_logos_version} ({config.logos_release_channel})" - self.console = tui_screen.ConsoleScreen(self, 0, self.status_q, self.status_e, self.title, self.subtitle, 0) + self.title = f"Welcome to {config.name_app} {config.LLI_CURRENT_VERSION} ({config.lli_release_channel})" # noqa: E501 + self.subtitle = f"Logos Version: {config.current_logos_version} ({config.logos_release_channel})" # noqa: E501 + self.console = tui_screen.ConsoleScreen(self, 0, self.status_q, self.status_e, self.title, self.subtitle, 0) # noqa: E501 self.menu_screen.set_options(self.set_tui_menu_options(dialog=False)) - #self.menu_screen.set_options(self.set_tui_menu_options(dialog=True)) + # self.menu_screen.set_options(self.set_tui_menu_options(dialog=True)) self.switch_q.put(1) self.refresh() - #ERR: On a sudden resize, the Curses menu is not properly resized, + # ERR: On a sudden resize, the Curses menu is not properly resized, # and we are not currently dynamically passing the menu options based # on the current screen, but rather always passing the tui menu options. # To replicate, open Terminator, run LLI full screen, then his Ctrl+A. @@ -531,7 +531,7 @@ def utilities_menu_select(self, choice): utils.change_logos_release_channel() self.update_main_window_contents() self.go_to_main_menu() - elif choice == "Change Logos on Linux Release Channel": + elif choice == f"Change {config.name_app} Release Channel": self.reset_screen() utils.change_lli_release_channel() network.set_logoslinuxinstaller_latest_release_config() @@ -1037,7 +1037,7 @@ def set_utilities_menu_options(self, dialog=False): if utils.file_exists(config.LOGOS_EXE): labels_utils_installed = [ "Change Logos Release Channel", - "Change Logos on Linux Release Channel", + f"Change {config.name_app} Release Channel", # "Back Up Data", # "Restore Data" ] diff --git a/logos_on_linux/tui_curses.py b/ou_dedatai/tui_curses.py similarity index 100% rename from logos_on_linux/tui_curses.py rename to ou_dedatai/tui_curses.py diff --git a/logos_on_linux/tui_dialog.py b/ou_dedatai/tui_dialog.py similarity index 100% rename from logos_on_linux/tui_dialog.py rename to ou_dedatai/tui_dialog.py diff --git a/logos_on_linux/tui_screen.py b/ou_dedatai/tui_screen.py similarity index 100% rename from logos_on_linux/tui_screen.py rename to ou_dedatai/tui_screen.py diff --git a/logos_on_linux/utils.py b/ou_dedatai/utils.py similarity index 98% rename from logos_on_linux/utils.py rename to ou_dedatai/utils.py index bfef350d..ab0f8f66 100644 --- a/logos_on_linux/utils.py +++ b/ou_dedatai/utils.py @@ -123,14 +123,13 @@ def update_config_file(config_file_path, key, value): def die_if_running(): - PIDF = '/tmp/LogosLinuxInstaller.pid' def remove_pid_file(): - if os.path.exists(PIDF): - os.remove(PIDF) + if os.path.exists(config.pid_file): + os.remove(config.pid_file) - if os.path.isfile(PIDF): - with open(PIDF, 'r') as f: + if os.path.isfile(config.pid_file): + with open(config.pid_file, 'r') as f: pid = f.read().strip() message = f"The script is already running on PID {pid}. Should it be killed to allow this instance to run?" # noqa: E501 if config.DIALOG == "tk": @@ -151,7 +150,7 @@ def remove_pid_file(): os.kill(int(pid), signal.SIGKILL) atexit.register(remove_pid_file) - with open(PIDF, 'w') as f: + with open(config.pid_file, 'w') as f: f.write(str(os.getpid())) @@ -167,7 +166,7 @@ def die(message): def restart_lli(): logging.debug("Restarting Logos Linux Installer.") - pidfile = Path('/tmp/LogosLinuxInstaller.pid') + pidfile = Path(config.pid_file) if pidfile.is_file(): pidfile.unlink() os.execv(sys.executable, [sys.executable]) @@ -809,7 +808,7 @@ def set_appimage_symlink(app=None): if not check_appimage(selected_appimage_file_path): msg.logos_error(f"Cannot use {selected_appimage_file_path}.") - # Determine if user wants their AppImage in the Logos on Linux bin dir. + # Determine if user wants their AppImage in the app bin dir. copy_message = ( f"Should the program copy {selected_appimage_file_path} to the" f" {config.APPDIR_BINDIR} directory?" @@ -849,7 +848,7 @@ def update_to_latest_lli_release(app=None): status, _ = compare_logos_linux_installer_version() if system.get_runmode() != 'binary': - logging.error("Can't update LogosLinuxInstaller when run as a script.") + logging.error(f"Can't update {config.name_app} when run as a script.") elif status == 0: network.update_lli_binary(app=app) elif status == 1: @@ -884,7 +883,7 @@ def get_downloaded_file_path(filename): def send_task(app, task): - #logging.debug(f"{task=}") + # logging.debug(f"{task=}") app.todo_q.put(task) if config.DIALOG == 'tk': app.root.event_generate('<>') diff --git a/logos_on_linux/wine.py b/ou_dedatai/wine.py similarity index 99% rename from logos_on_linux/wine.py rename to ou_dedatai/wine.py index c5560a08..36093480 100644 --- a/logos_on_linux/wine.py +++ b/ou_dedatai/wine.py @@ -440,7 +440,7 @@ def install_icu_data_files(app=None): icu_url = network.get_latest_release_url(json_data) # icu_tag_name = utils.get_latest_release_version_tag_name(json_data) if icu_url is None: - logging.critical("Unable to set LogosLinuxInstaller release without URL.") # noqa: E501 + logging.critical(f"Unable to set {config.name_app} release without URL.") # noqa: E501 return icu_filename = os.path.basename(icu_url) network.logos_reuse_download( diff --git a/pyproject.toml b/pyproject.toml index ec806d64..5931cf6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ dependencies = [ # "tkinter", # actually provided by a system package, not a python package # "urllib3", ] -name = "logos_on_linux" +name = "ou_dedatai" dynamic = ["readme", "version"] requires-python = ">=3.12" @@ -24,14 +24,14 @@ requires-python = ">=3.12" build = ["pyinstaller"] [project.scripts] -logos-on-linux = "logos_on_linux.main:main" +oudedatai = "ou_dedatai.main:main" [tool.setuptools.dynamic] readme = {file = ["README.md"], content-type = "text/plain"} -version = {attr = "logos_on_linux.config.LLI_CURRENT_VERSION"} +version = {attr = "ou_dedatai.config.LLI_CURRENT_VERSION"} [tool.setuptools.packages.find] where = ["."] [tool.setuptools.package-data] -"logos_on_linux.img" = ["*icon.png"] \ No newline at end of file +"ou_dedatai.img" = ["*icon.png"] \ No newline at end of file diff --git a/scripts/build-binary.sh b/scripts/build-binary.sh index 8ad72218..ce18232a 100755 --- a/scripts/build-binary.sh +++ b/scripts/build-binary.sh @@ -5,4 +5,4 @@ if ! which pyinstaller >/dev/null 2>&1; then echo "Error: Need to install pyinstaller; e.g. 'pip3 install pyinstaller'" exit 1 fi -python3 -m PyInstaller --clean "${repo_root}/logos_on_linux.spec" +python3 -m PyInstaller --clean "${repo_root}/ou_dedatai.spec" diff --git a/scripts/run_app.py b/scripts/run_app.py index 0a65389d..83702b5e 100755 --- a/scripts/run_app.py +++ b/scripts/run_app.py @@ -6,7 +6,7 @@ """ import re import sys -from logos_on_linux.main import main +from oudedatai.main import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())