Skip to content

add installer#370

Open
CupRusk wants to merge 1 commit intohyprismteam:mainfrom
CupRusk:main
Open

add installer#370
CupRusk wants to merge 1 commit intohyprismteam:mainfrom
CupRusk:main

Conversation

@CupRusk
Copy link
Copy Markdown
Contributor

@CupRusk CupRusk commented Feb 21, 2026

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.py AppImage directly from GitHub Releases using the GitHub API.

Safety First (Backup System): Added a backup utility in logic/backup.py that creates timestamped ZIP archives of the existing game version before performing updates.

  • Desktop Integration:

  • Automatic downloading of the project icon.

  • Generation of .desktop files in both ~/Desktop and ~/.local/share/applications/ for seamless menu integration.

Elevated Permissions: Integrated pkexec support to handle cases where the user needs root privileges for backups.

CLI Argument Parser: Added a flexible argument parser in parser.py supporting custom directories (--dir), skipping shortcuts (--no-shortcut), and a "coffee" easter egg.

🛠 Technical Details

Download Logic: Uses requests with streaming (chunked downloads) to ensure stability and low memory usage.

Build System: Includes a main.spec file for PyInstaller to bundle the script into a standalone Linux binary.

Environment Script: Added install_linux.sh to pre-verify FUSE3 and Python dependencies before execution.

🚀 How to Test

  1. Run the bash wrapper: ./install_linux.sh.

  2. Or run via Python: python3 main.py --dir=/tmp/HyTest.

  3. Verify that the AppImage is downloaded and the .desktop shortcut appears in your application menu.

Copy link
Copy Markdown
Member

@Aarav2709 Aarav2709 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's HyprismTeam now.

Comment on lines +8 to +13
"""
1.Используеться GITHUB-API для динамической установки программы.
2.инсталлер зафиксирован на .appimage and 'x64' in name. Во избежание добавления дополнительных условий
3.используеться обработка ошибок - поэтому шанс что программа упадёт намного ниже чем раньше. Возможно стоит её обробатывать KeyboardInterpput
4.скачиваеться всё по чанкам, что-бы не перегружать компьютер пользователя.
"""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not english?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was created earlier only for itself. I'll rewrite it into English later

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, its HyprismTeam, not yyyumeniku.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess it would be much better if you ask ai to remove emojis and em dashes and keep the md clean.

Comment on lines +1 to +10
Если ты хочешь можешь скомпилировать через nuitk-у. Только там больше головной боли с компилятором.
Я думаю лучшее pyinstaler, все равно это OSS и декомпилция только подтвердит что тут всё окей.

так что:
# только для линукса
python3 -m venv .venv
source ./.venv/bin/activate
pip install pyinstaller
pyinstaller main.spec

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we really need this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a compiled installer. It is expected that the installer will be included in releases

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@Aarav2709 Aarav2709 requested review from Aarav2709 and removed request for XargonWan February 24, 2026 09:28
@Aarav2709 Aarav2709 self-assigned this Feb 24, 2026
@Aarav2709 Aarav2709 added the enhancement New feature or request label Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants