Skip to content

Appimage support#41

Merged
rainxchzed merged 6 commits into
mainfrom
appimage-support
Dec 17, 2025
Merged

Appimage support#41
rainxchzed merged 6 commits into
mainfrom
appimage-support

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

No description provided.

Refactored the AppImage and RPM installation process on desktop platforms for a more streamlined and conventional user experience.

**AppImage Installation:**
- AppImages are now moved to the `~/Applications` directory, which is created if it doesn't exist.
- After moving, the AppImage is made executable and launched automatically.
- A system notification is sent to inform the user of the successful installation and the application's new location.
- The previous behavior of copying the AppImage to the desktop has been removed.

**RPM Installation:**
- Redundant and commented-out installation methods for RPM packages have been removed to simplify the code.
…igation3

Replaced the `androidx.navigation3` dependencies with the JetBrains-maintained `org.jetbrains.androidx.navigation3` fork.

This change removes the `navigation3` version variable and the `androidx-navigation3-runtime` and `androidx-navigation3-ui` dependencies from `gradle/libs.versions.toml`. It also introduces the `jetbrains-navigation3-runtime` dependency.
Refactored the authentication token polling logic to be more resilient against network issues and GitHub API rate limiting.

- **Rate Limiting:** Implemented an exponential backoff strategy when a "slow_down" response is received. The polling interval is increased by 5 seconds with each occurrence. Polling is now aborted after 8 consecutive "slow_down" responses to prevent excessive requests, with a user-facing message advising them to wait.
- **Jitter:** Added random jitter to the initial poll and subsequent polling intervals to help avoid synchronized requests and distribute the load on the API.
- **Error Handling:**
    - Give up after 8 consecutive "slow_down" events, informing the user about high traffic.
    - Improved log messages for better debugging of polling states, including rate limits and unknown errors.
    - Standardized network error messages for better user feedback when the connection is unstable.
Introduces a mechanism to handle the installation of `.deb` packages on RPM-based Linux distributions.

When a user on an RPM system (like Fedora) attempts to install a `.deb` file, the application now opens a terminal and runs a script to:
- Check for and attempt to install the `alien` package converter if it's not present.
- Use `alien` to convert the `.deb` package to an `.rpm` package.
- Install the newly converted `.rpm` package using the system's package manager.

This change also refactors the terminal-opening logic into a reusable `runCommandInTerminal` function to reduce code duplication for DEB, RPM, and the new DEB-to-RPM conversion flows.
This commit refactors the Linux installer and asset selection logic for better accuracy and user experience.

**Installer Improvements:**
- Enhanced Linux distribution detection by parsing `/etc/os-release` before falling back to checking for package managers (`apt`, `dnf`, etc.).
- Improved the terminal scripts for `.deb` and `.rpm` installations, including the `alien` conversion process, to provide clearer output and better error handling.
- Added desktop notifications for successful installations.
- Refined the terminal detection logic.

**Asset Scoring Overhaul:**
- Replaced the previous asset scoring mechanism with a more robust, weighted system.
- The new scoring prioritizes assets based on:
    1.  **File Extension**: A high score is given to preferred package types (`.deb`, `.rpm`, `.AppImage`).
    2.  **Architecture Match**: A bonus is added for an exact architecture match.
    3.  **File Size**: A minor score component is derived from the asset's size.
…ection

This commit refactors the Linux installer logic for greater reliability and introduces a more sophisticated asset selection algorithm.

**Installer Improvements (Linux):**
- **DEB Installation:** The installation process for `.deb` packages has been enhanced. It now attempts installation using `pkexec apt`, falls back to `dpkg` followed by `apt-get install -f`, and then tries `gdebi-gtk` before opening a terminal.
- **RPM Installation:** The installation order for `.rpm` packages is now `dnf`, `yum`, `zypper`, and finally `rpm` as a last resort.
- **DEB on RPM Systems (Alien):** The `alien` conversion script for installing `.deb` files on RPM-based systems is now more robust. It includes better error handling for `alien` installation, conversion failure, and the final RPM installation. It also provides clearer instructions to the user if the automated installation fails, pointing them to the converted RPM file.
- **Distribution Detection:** The Linux distribution detection now prioritizes checking `/etc/os-release` before falling back to checking for package manager executables.

**Asset Selection Algorithm:**
The asset selection logic has been significantly improved:
- It now first filters assets based on system architecture compatibility.
- If no architecture-specific assets are found, it falls back to the full list.
- The scoring system has been refined to more accurately determine the best asset by prioritizing extension type, giving a bonus for an exact architecture match, and a small bonus for larger file sizes.
@rainxchzed rainxchzed merged commit 3c185e8 into main Dec 17, 2025
1 check passed
@rainxchzed rainxchzed deleted the appimage-support branch December 17, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant