Commit Graph

70 Commits

Author SHA1 Message Date
sanasol
81d1e7c113 Add HYTALE_PATCH_MODE env var to test different string formats
HYTALE_PATCH_MODE=utf16le - Use pure UTF-16LE (no length prefix)
HYTALE_PATCH_MODE=length-prefixed - Use length-prefixed format (default)

This helps debug if the length-prefixed format is causing crashes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 03:00:29 +01:00
sanasol
d8f90bd1ff Disable Discord URL patching entirely
The Discord URL patch was causing buffer overflow crashes and has no
practical effect on F2P functionality anyway.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 02:44:13 +01:00
sanasol
50491abc69 Fix buffer overflow in Discord URL patch - likely cause of crashes
The Discord URL patch was writing 28 bytes (.gg/MHkEjepMQ7, 14 chars)
where only 20 bytes existed (.gg/hytale, 10 chars), corrupting 8 bytes
of adjacent data in the binary.

Changes:
- Use same-length Discord URL: .gg/santop (10 chars)
- Add length check to UTF-16LE fallback path
- Add length check and zero-fill to findAndReplaceDomainSmart

This buffer overflow explains why the crash happened on some systems
(Steam Deck, Ubuntu LTS) but not others - depending on what data
was adjacent to the patched string.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 02:41:38 +01:00
sanasol
c92c5bec3c Add debug options and jemalloc support for Linux memory issues
Debug env vars for clientPatcher:
- HYTALE_SKIP_SENTRY_PATCH=1 - Skip sentry URL patch (60->26 chars)
- HYTALE_SKIP_SUBDOMAIN_PATCH=1 - Skip subdomain prefix patches

Game launcher Linux options:
- HYTALE_USE_JEMALLOC=1 - Use jemalloc allocator instead of glibc

This helps isolate which patch causes "free(): invalid pointer"
on Steam Deck and Ubuntu LTS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 02:31:38 +01:00
sanasol
73f67f2fec Add MALLOC_CHECK_=0 for Linux to bypass glibc heap validation
Attempts to fix "free(): invalid pointer" crashes on Steam Deck and
Ubuntu LTS. The same patched binary works on macOS, Windows, and Arch
Linux, suggesting the issue is glibc's strict heap validation rather
than actual memory corruption.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 02:27:04 +01:00
sanasol
2582d9b6d1 Fix memory corruption by null-padding shorter replacement patterns
When replacing domain strings with shorter ones, the replaceBytes function
was only copying the new bytes without clearing the leftover bytes from
the old pattern. This caused "free(): invalid pointer" crashes on Steam
Deck and Ubuntu due to corrupted string metadata in the .NET AOT binary.

Fix: Fill the entire old pattern region with 0x00 before writing the
new bytes. This ensures no leftover data remains that could corrupt
the binary structure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 02:10:31 +01:00
AMIAY
e56b12cd72 userdata migration [need review from other OS] 2026-01-27 01:44:58 +01:00
Fazri Gading
eff6fcd520 fix: isbrokenlink should be true to remove the symlink 2026-01-26 12:24:24 +08:00
Fazri Gading
94d4586b97 fix: add pathexists for paths.js to check symlink 2026-01-26 12:09:48 +08:00
Fazri Gading
20faf36b37 fix: remove broken symlink after detected 2026-01-26 12:01:46 +08:00
Fazri Gading
615ee5cadc fix: resolve cross-platform EPERM permissions errors
modManager.js:
- Switch from hardcoded 'junction' to dynamic symlink type based on OS (fixing Linux EPERM).
- Add retry logic for directory removal to handle file locking race conditions.
- Improve broken symlink detection during profile sync.

gameManager.js:
- Implement retry loop (3 attempts) for game directory removal in updateGameFiles to prevent EBUSY/EPERM errors on Windows.

paths.js:
- Prevent fs.mkdirSync failure in getModsPath by pre-checking for broken symbolic links.
2026-01-26 08:19:13 +08:00
Fazri Gading
fa2d451f90 Merge branch 'develop' into develop 2026-01-26 05:09:36 +08:00
Fazri Gading
ba95187ee6 fix: err_bad_request code 416 due to file size matched remote size, updated timeout to 15mins 2026-01-26 04:58:02 +08:00
AMIAY
9e54e07b22 R2 cdn added 2026-01-25 21:26:46 +01:00
Fazri Gading
43d5d20351 chore: disable patcher log to reduce logging length 2026-01-26 01:52:54 +08:00
AMIAY
ad3c73563d temp jar patcher 2026-01-25 17:02:02 +01:00
Rahul-Sahani04
f0f19f690f feat: Add option to toggle hardware acceleration for launcher #170 2026-01-25 21:08:47 +05:30
AMIAY
35f900d6ab Update fileManager.js 2026-01-25 14:15:19 +01:00
AMIAY
8326deddb1 Merge branch 'develop' of https://github.com/amiayweb/Hytale-F2P into develop 2026-01-25 13:31:38 +01:00
AMIAY
b11b78f7dc trying 2026-01-25 13:31:08 +01:00
Terromur
0ca8b4e02f Deleting garbage envs 2026-01-25 17:17:36 +05:00
Fazri Gading
de9c7d81f5 fix: replace pacman build with pkg.tar.zst and remove its deps, changed CF and Discord key mode 2026-01-25 14:45:45 +08:00
Fazri Gading
4c3277392e merge branch 'main' (lost 4 commits) into develop 2026-01-25 13:54:15 +08:00
sanasol
f287cb55b9 Merge remote-tracking branch 'origin/develop' into develop 2026-01-25 01:27:29 +01:00
sanasol
d87db04653 feat(patcher): Implement DualAuth patcher with enhanced server patching
- Introduce DualAuthPatcher with support for hybrid authentication
- Update default auth domain to `auth.sanasol.ws`
- Integrate Java detection and bundled JRE handling for patcher execution
- Add server patch flag for avoiding redundant patching
- Automate DualAuthPatcher setup: download, compile, and execute with dependencies
- Enhance patching logic for extended logging and modularity
2026-01-25 01:27:19 +01:00
AMIAY
67aa41aefe fix 2026-01-25 01:03:49 +01:00
AMIAY
c8d7707b70 need test - electron updater 2026-01-25 00:19:11 +01:00
Fazri Gading
ea21fb15d6 fix: JRE retry button 2026-01-25 05:18:22 +08:00
sanasol
3d54cea9e7 feat(patcher): Support variable-length domains (4-16 chars)
- Add support for domains from 4 to 16 characters
- Domains <= 10 chars: direct replacement, subdomains stripped
- Domains 11-16 chars: split mode (first 6 chars -> subdomain prefix)
- Add length-prefixed byte format encoding for client binary
- Verify binary contents when checking if already patched
- Detect file updates and archive old backups with timestamps
- Fallback to legacy UTF-16LE format for older binaries
- Update patcher version to 2.0.0

Based on patching approach from Mollomm1/Hytale-EMULATOR

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 21:11:20 +01:00
AMIAY
9f43a32779 fix hardcoded branch + pre-release/release issue 2026-01-24 19:01:34 +01:00
Fazri Gading
9c8a12f25c fix: lastProgressTime variable init 2026-01-25 01:58:54 +08:00
Fazri Gading
a7d0523186 feat: auto-resume download process & auto-retry if disconnected (#143) 2026-01-25 01:36:20 +08:00
AMIAY
a6f716c61b removed getInstalledClientVersion 2026-01-24 13:44:56 +01:00
AMIAY
87b168dd4c fix 2026-01-24 12:22:15 +01:00
AMIAY
679f065e24 delete updateManager 2026-01-24 12:09:54 +01:00
AMIAY
c900129c1f fix patch 2026-01-24 12:05:10 +01:00
AMIAY
d8393543df fixing 2026-01-24 02:49:21 +01:00
AMIAY
3579d82776 fix (to try) 2026-01-24 01:41:09 +01:00
AMIAY
3983fdb1bc pre-release & release game version [to check] 2026-01-23 17:54:57 +01:00
Fazri Gading
b46ce93af7 Release Stable Build v2.0.11 (#119)
* Add electron-updater auto-update support

- Install electron-updater package
- Configure GitHub releases publish settings
- Create AppUpdater class with full update lifecycle
- Integrate auto-update into main.js
- Add comprehensive documentation (AUTO-UPDATES.md, TESTING-UPDATES.md)
- Set up dev-app-update.yml for testing

* Add cache clearing documentation for electron-updater

- Introduced CLEAR-UPDATE-CACHE.md to guide users on clearing the electron-updater cache across macOS, Windows, and Linux.
- Added programmatic method for cache clearing in JavaScript.
- Enhanced update handling in main.js and preload.js to support new update events.
- Updated GUI styles for download buttons and progress indicators in update.js and style.css.

* Update auto-update UI and configuration

- Fix version display (newVersion field)
- Add download progress bar with real-time updates
- Reorder buttons: Install & Restart (primary), Manually Download (secondary)
- Update dev-app-update.yml to point to fork
- Update package.json version to 2.0.2

* Add installation effects and draggable progress bar

Introduces animated installation effects overlay and makes the progress bar draggable. Adds maximize window support, improves window controls styling, and enforces a single app instance. Removes the unused Skins page and related translations. Refines  various UI details for a more polished user experience.

* Adjust news card aspect ratio and add Play tab style

Set a default aspect ratio for .news-card and add a specific style for the LATEST NEWS section in the Play tab to override the aspect ratio and use full height.

* Add splash screen to launcher startup

Introduced a new splash screen (splash.html) and updated main.js to display it on startup before loading the main window. The splash screen is shown for 2.5 seconds as a placeholder for future loading logic, improving user experience during application launch.

* Display launcher version in UI

Adds a version display element to the bottom right of the UI, fetching the version from package.json via a new IPC handler. Updates main.js, preload.js, and ui.js to support retrieving and displaying the version, and adds relevant styles in style.css.

* Custom Mod loading fix (#92)

* feat: Add Repair Game functionality including UserData backup and cache clearing

* feat: Add In-App Logs Viewer and Logs Folder shortcut

* feat: Add Open Logs feature

* disable dev tools

* Fix Settings UI

* Implement custom mod loading, autoimport, auto repair

* Fixed Custom Mod loading issues and merge issues

* feat: Externalize sensitive API keys and Discord client ID into environment variables using dotenv.

* feat(mods): add profile-based mod management and auto-repair

* feat: add 'Close launcher on game start' option and improve app termination behavior (#93)

* update main branch to release/v2.0.2b (#86)

* add more linux pkgs, create auto-release and pre-release feature for Github Actions

* removed package-lock from gitignore

* update .gitignore for local build

* add package-lock.json to maintain stability development

* update version to 2.0.2b also add deps for rpm and arch

* update 2.0.2b: add arm64 support, product and executable name, maintainers; remove snap;

* update 2.0.2b: add latest.yml for win & linux, arm64 support; remove snap

* fix release build naming

* Prepare release v2.0.2b

* feat: add 'Close launcher on game start' option and improve app termination behavior

- Added 'Close launcher on game start' setting in GUI and backend.
- Implemented automatic app quit after game launch if setting is enabled.
- Added Cmd+Q (Mac) and Ctrl+Q/Alt+F4 (Win/Linux) shortcuts to quit the app.
- Updated 'window-close' handler to fully quit the app instead of just closing the window.
- Added i18n support for the new setting in English, Spanish, and Portuguese.

---------

Co-authored-by: Fazri Gading <fazrigading@gmail.com>
Co-authored-by: Arnav Singh <hi.arnavsingh3@gmail.com>

* Update publish config to point to chasem-dev fork

* Fix Linux metadata files in workflow and improve error handling

* Bump version to 2.0.5

* Bump version to 2.0.6

* Fix update popup showing for same version - add version comparison checks

* Bump version to 2.0.7

* Fix SHA512 checksum mismatch handling - clear cache and retry automatically

* Bump version to 2.0.8

* Bump version to 2.0.9

* Fix: Use explicit latest-linux.yml to prevent yml file collision

The glob pattern latest*.yml was matching both latest-linux.yml AND
latest.yml from the Linux build, causing the Windows latest.yml to be
overwritten with incorrect checksums.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Bump version to 2.0.10

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix: Remove portable target to fix SHA512 checksum mismatch

The portable and nsis targets both produced x64.exe files with the same
name, causing one to overwrite the other. The latest.yml contained the
checksum from one build while the actual file was from the other build.

Removed portable target - nsis installer is sufficient.
Bump version to 2.0.11

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Remove outdated documentation files related to auto-updates, build instructions, and testing updates. Update `dev-app-update.yml` and `package.json` to reflect the correct GitHub owner. This cleanup streamlines the project and ensures accurate configuration for future updates.

* Add semantic versioning policy documentation - numerical versions only

* Update package-lock.json to include new dependencies and versions, enhancing project stability and compatibility.

* fixed imgur restriction for UK

* fix: adds EGL env var to detect installed NVIDIA GPU

* Update release.yml

* patch v2.0.11-beta: fix env issue in GA release, warn Intel Mac users, add com templates. (#115)

* fix: throw error for Intel Mac user
* docs: first draft of issue and PR template
* fix: env of curseforge API key and discord client ID

* implemented late patch should be in #115

* Final patch for release.yml v2.0.11

---------

Co-authored-by: chasem-dev <myers.a.chase@gmail.com>
Co-authored-by: AMIAY <letudiantenrap.collab@gmail.com>
Co-authored-by: Rahul Sahani <110347707+Rahul-Sahani04@users.noreply.github.com>
Co-authored-by: Arnav Singh <72737311+ArnavSingh77@users.noreply.github.com>
Co-authored-by: Arnav Singh <hi.arnavsingh3@gmail.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-24 00:07:59 +08:00
Fazri Gading
032418b7f7 Merge branch 'fix/x86-mac-pwr-warning' into develop 2026-01-23 21:11:46 +08:00
Fazri Gading
70fe4203ef Merge branch 'develop' of https://github.com/amiayweb/Hytale-F2P into develop 2026-01-23 13:11:43 +08:00
Fazri Gading
f433120084 fix: adds EGL env var to detect installed NVIDIA GPU 2026-01-23 13:11:19 +08:00
Fazri Gading
e4576042be fix: throw error for Intel Mac user 2026-01-23 05:57:21 +08:00
chasem-dev
4c6e1a616e Merge upstream/develop into v2.0.11 - sync with main repository 2026-01-22 13:07:34 -05:00
chasem-dev
204d6b21f6 Fix SHA512 checksum mismatch handling - clear cache and retry automatically 2026-01-22 11:12:59 -05:00
chasem-dev
ce052add0d Fix update popup showing for same version - add version comparison checks 2026-01-22 10:36:18 -05:00
chasem-dev
61433bfeea Fix Linux metadata files in workflow and improve error handling 2026-01-22 10:18:28 -05:00
Arnav Singh
68d697576a feat: add 'Close launcher on game start' option and improve app termination behavior (#93)
* update main branch to release/v2.0.2b (#86)

* add more linux pkgs, create auto-release and pre-release feature for Github Actions

* removed package-lock from gitignore

* update .gitignore for local build

* add package-lock.json to maintain stability development

* update version to 2.0.2b also add deps for rpm and arch

* update 2.0.2b: add arm64 support, product and executable name, maintainers; remove snap;

* update 2.0.2b: add latest.yml for win & linux, arm64 support; remove snap

* fix release build naming

* Prepare release v2.0.2b

* feat: add 'Close launcher on game start' option and improve app termination behavior

- Added 'Close launcher on game start' setting in GUI and backend.
- Implemented automatic app quit after game launch if setting is enabled.
- Added Cmd+Q (Mac) and Ctrl+Q/Alt+F4 (Win/Linux) shortcuts to quit the app.
- Updated 'window-close' handler to fully quit the app instead of just closing the window.
- Added i18n support for the new setting in English, Spanish, and Portuguese.

---------

Co-authored-by: Fazri Gading <fazrigading@gmail.com>
Co-authored-by: Arnav Singh <hi.arnavsingh3@gmail.com>
2026-01-22 18:11:16 +08:00
Rahul Sahani
a8da559e93 Custom Mod loading fix (#92)
* feat: Add Repair Game functionality including UserData backup and cache clearing

* feat: Add In-App Logs Viewer and Logs Folder shortcut

* feat: Add Open Logs feature

* disable dev tools

* Fix Settings UI

* Implement custom mod loading, autoimport, auto repair

* Fixed Custom Mod loading issues and merge issues

* feat: Externalize sensitive API keys and Discord client ID into environment variables using dotenv.

* feat(mods): add profile-based mod management and auto-repair
2026-01-22 18:01:57 +08:00