Conversation
Aarav2709
left a comment
There was a problem hiding this comment.
make all the changes that are asked to, please. otherwise this would not work at all. ask ai or do it by yourself, update all references carefully and again, remove emdashes and emojis if you want to so its more user friendly. thank you.
| import requests # type: ignore | ||
| from pathlib import Path | ||
|
|
||
| OWNER = "yyyumeniku" |
| """ | ||
| 1.Используеться GITHUB-API для динамической установки программы. | ||
| 2.инсталлер зафиксирован на .appimage and 'x64' in name. Во избежание добавления дополнительных условий | ||
| 3.используеться обработка ошибок - поэтому шанс что программа упадёт намного ниже чем раньше. Возможно стоит её обробатывать KeyboardInterpput | ||
| 4.скачиваеться всё по чанкам, что-бы не перегружать компьютер пользователя. | ||
| """ |
There was a problem hiding this comment.
It was created earlier only for itself. I'll rewrite it into English later
There was a problem hiding this comment.
do that, and please change the owner name and stuff. your variables are outdated.
| def install_hyprism(install_dir: Path) -> Path: | ||
| install_dir.mkdir(parents=True, exist_ok=True) | ||
|
|
||
| api_url = f"https://api.github.com/repos/{OWNER}/{REPO}/releases/latest" |
There was a problem hiding this comment.
as commented above, please change it to HyprismTeam, so that there are no errors in fetching.
| HEADERS = {"User-Agent": "HyPrism-installer"} | ||
|
|
||
| def install_icon(install_dir: Path): | ||
| ICON_URL = "https://raw.githubusercontent.com/yyyumeniku/HyPrism/main/assets/Hyprism.png" |
There was a problem hiding this comment.
again, its HyprismTeam, not yyyumeniku.
There was a problem hiding this comment.
i guess it would be much better if you ask ai to remove emojis and em dashes and keep the md clean.
| Если ты хочешь можешь скомпилировать через nuitk-у. Только там больше головной боли с компилятором. | ||
| Я думаю лучшее pyinstaler, все равно это OSS и декомпилция только подтвердит что тут всё окей. | ||
|
|
||
| так что: | ||
| # только для линукса | ||
| python3 -m venv .venv | ||
| source ./.venv/bin/activate | ||
| pip install pyinstaller | ||
| pyinstaller main.spec | ||
|
|
There was a problem hiding this comment.
not sure if we really need this.
There was a problem hiding this comment.
This is a compiled installer. It is expected that the installer will be included in releases
There was a problem hiding this comment.
no like why do you need this text? its not related to the launcher, its just notes, you can dm that personally if you want to!
Pull Request: Enhanced Linux Installer with Backup and Shortcut Logic
📝 Description
This PR introduces a robust Python-based installer for HyPrism on Linux systems. It replaces manual setup with an automated flow that handles binary downloads, system integration, and data safety.
✨ Key Changes
Automated Deployment: Implemented
logic/ins_hyprism.pyAppImage directly from GitHub Releases using the GitHub API.Safety First (Backup System): Added a backup utility in
logic/backup.pythat creates timestamped ZIP archives of the existing game version before performing updates.Desktop Integration:
Automatic downloading of the project icon.
Generation of
.desktopfiles in both~/Desktopand~/.local/share/applications/for seamless menu integration.Elevated Permissions: Integrated
pkexecsupport to handle cases where the user needs root privileges for backups.CLI Argument Parser: Added a flexible argument parser in
parser.pysupporting custom directories (--dir), skipping shortcuts (--no-shortcut), and a "coffee" easter egg.🛠 Technical Details
Download Logic: Uses
requestswith streaming (chunked downloads) to ensure stability and low memory usage.Build System: Includes a
main.specfile for PyInstaller to bundle the script into a standalone Linux binary.Environment Script: Added
install_linux.shto pre-verifyFUSE3and Python dependencies before execution.🚀 How to Test
Run the bash wrapper:
./install_linux.sh.Or run via Python:
python3 main.py --dir=/tmp/HyTest.Verify that the AppImage is downloaded and the
.desktopshortcut appears in your application menu.