Commit Graph
331 Commits
Author SHA1 Message Date
khanhduytran0 6eb7ecdde3 Fix[JNA]: use agent to replace class at runtime
Fixes duplicate module package on recent Forge versions.
2025-01-25 11:47:27 +07:00
khanhduytran0 4a789ab98c Build: rewrite java code compilation recipe
Every jar sources are now in its respective folder to avoid clutters. Rewrote javac recipe to allow compiling simultaneously.
2025-01-25 11:47:27 +07:00
khanhduytran0 ccde0efa60 Fix[audio]: hopefully solve output issue and microphone
Now this provides a fake com.sun.jna.Platform class so that voice chat
mods won't override to javax implementation
2024-08-30 21:35:03 +07:00
khanhduytran0 fe3e9f7440 Fix: correct caciocavallo17 libs
Pulled from
https://github.com/PojavLauncherTeam/caciocavallo17/actions/runs/102768
25478
The previous update (15d2e1b) didn't work for some reason.
2024-08-19 06:33:25 +07:00
khanhduytran0 15d2e1b275 Feat[caciocavallo17]: update for java 21 compat 2024-08-07 09:09:35 +07:00
khanhduytran0 958a668f7f Cleanup: remove legacy code and data migration 2024-07-15 10:02:59 +07:00
khanhduytran0 4cf5906be0 Feat[LWJGL]: add freetype module for 1.21
Separate freetype native library is required since LWJGL requires
up-to-date module.
2024-07-14 14:24:36 +07:00
khanhduytran0 2ad1ed32fc Feat[LWJGL]: update to 3.3.3 2024-07-13 14:20:08 +07:00
khanhduytran0 77fa8b1c99 Fix #696: return string for glfwGetGamepadName 2024-06-09 21:53:15 +07:00
khanhduytran0 879f852277 Workaround: ignore jna and stub new function
Fix a check on replacing JNA, add a missing function.
These are sufficient for 1.21-pre1 for now as it's requiring LWJGL
3.3.3, which will be updated later.
2024-05-31 13:26:31 +07:00
khanhduytran0 b2aa432848 fix(tools): forge libraries erasing themselves
This was due to a side effect of our de-doubling algorithm
Port of:
https://github.com/PojavLauncherTeam/PojavLauncher/commit/5656176c950b9
50271221436700777196233b31f
2024-05-26 05:54:18 +07:00
khanhduytran0 89c9ad4c05 Fix[auth]: unexpectedly try to get token from local acc 2024-04-16 19:55:56 +07:00
khanhduytran0 f7163ceb31 Fix[init]: unexpectedly preload LWJGL
Migrating token storage to keychain accidentally causes LWJGL to be
preloaded, making Fabric fails to init.
Add JNI library PojavAccountJNI to do the task of sending access token
from keychain to JVM space.
2024-04-09 13:37:55 +07:00
khanhduytran0 28df9fcc68 Feat[auth]: move tokens to keychain
Previously, tokens were saved in json under plain text, making it
insecure. Now, they are stored in iOS's keychian with the hope of
making it more secure.
2024-04-04 19:12:32 +07:00
khanhduytran0 a722b4a8c9 Build: split sandboxed & TrollStore JIT version
Sandboxed version installed using TrollStore will use URL Scheme to
enable JIT. tipa build keeps self-JIT but is unsafe to use.
2024-01-29 20:48:01 +07:00
khanhduytran0 7829917534 Refactor[jar launcher]: rework swap thread & classpath 2024-01-28 14:26:42 +07:00
khanhduytran0 3d8f84d445 Feat[auth]: set user_type based on xuid arg existence 2023-12-12 05:12:39 +07:00
khanhduytran0 8bf56d7443 Feat[jar launcher]: add log output
- rename 'Install .jar' to 'Execute .jar'
2023-11-15 05:56:17 +07:00
khanhduytran0 b48cecad94 Cleanup 2023-11-11 17:38:58 +07:00
khanhduytran0 79919baa02 Feat[input]: support extra mouse buttons 2023-09-09 05:10:16 +07:00
khanhduytran0 921babed4b Feat[lib]: replace ASM <5 with ASM 5.0.4 2023-08-27 15:30:03 +07:00
khanhduytran0 5f2d4a3883 Fix[rendering]: gl4es 1.17+ black world
Updated lwjgl-opengl.jar to https://github.com/PojavLauncherTeam/lwjgl3/commit/d26eb7e215c4af8c23560402b9a1116adced836b
2023-08-21 10:59:13 +07:00
khanhduytran0 d2709a95da Fix[Cosmetica]: broken DNS injector in java 8
This has been fixed for a while on Android but has yet been copied to iOS
2023-08-18 20:00:36 +07:00
khanhduytran0 63261cf60a Fix[glfw]: add missing function for 23w31a 2023-08-03 13:17:45 +07:00
khanhduytran0 2ae408f5dd Fix: stack queue check
Now explicitly check the caller class
2023-07-30 12:06:55 +01:00
khanhduytran0 1ca1c0671e Feat: support AWT clipboard for 1.12.2 and lower 2023-07-14 08:21:36 +07:00
Duy Tran Khanh c6e21b4f88 Fixes for LabyMod 4 (except the shader part) 2023-07-13 11:19:18 +07:00
khanhduytran0 6cf61e62c0 Feats: preference isolation & profile management
- Rewrote LauncherPreferences -> PLPreferences
 + Now the file layout is the same as UI layout
 + (get/set)Preference are replaced with corresponding get/set types + Getting/setting is now done through keyPath instead of manually iterating over subdictionaries.
 + Implemented an isolation layer, allowing an instance to have its own settings. This is off by default

- Implemented launcher_profiles
 + Added Profile manager that can be accessed from the sidebar
 + Moved "Game directory (instances)" to this screen
 + Replaced version selector with profile selector. Version selector is moved into profile editor.

- Other changes
 + Cleanup code by using NSPredicate instead of huge for loops
 + Titles in settings are made multilined
 + Controller config: replaced bar button items with localized ones

Due to how large the changes are, this is committed directly to the mainline branch. Bugs are expected to be found (although I did enough tests for this locally)
2023-07-06 13:59:07 +07:00
Duy Tran KhanhandDuy Tran Khanh 8d6d66dd94 Feats: external runtime, update LWJGL to 3.3.1 (#579)
* Feat: external runtime manager

Currently missing: mmap hook

* we're past this ui todo

* feat: Bypass Library Validation (untested)

This bypass works because of JIT enabled, so the process can patch
anything loaded in the memory. Unsigned dylib works with JIT too.

* Fix `could not get real path` on iOS 14.x

iOS 15+ is untested, it may need patching in dyld instead of libSystem

* Make redirectFunction syscall-friendly

Replaced builtin_mprotect and vm_protect with a simple syscall to
_kernelrpc_mach_vm_protect_trap

* Add dyld hook back for iOS 15+, auto symlink xawt lib

* Cleanup Tools.java:showError+comments

Use System.exit(1) to drop to Game Exited screen instead of presenting
alert dialog on exception handled.

* Patch both to bypass codesigning at best

* Proper way of ignoring SIGBUS during patch

Turns out other background thread might also be calling inside dirty
page, so let's SIG_IGN them all until page permission is back to RX.

* Feat(install jar): auto detect java version

Rename Default version to Preferred version to match the behavior or
Install .jar detection: only override if selected version > required
version.
Add UnzipKit just to check jar file

Refactor(showDialog): remove viewController parameter, now use its own
ViewController to present.

* Feat: update LWJGL to 3.3.1
(tinygl4angle) add alias for GL_KHR_debug functions
Include nanovg for OneConfig mod
Move all LWJGLX classes to lwjgl3 repo
Set org.lwjgl.util.NoChecks=true to improve performance

* Fix: Forge 1.20 crashes (wrong artifact path)
Now use json-provided artifact path instead of generating one
Make lwjgl fat jar again

* Fix: handle null library artifact

* Fix: fatal glfw callback cleanup

* Build: fix copying LWJGL libraries

* Perf: set default settings

* Fix: incorrect SolClient useStackQueue check

* Feat: builtin runtime installer

Refactor parts of LauncherNavigationController.m
Workaround(LogView): disable animation on update to mitigate overload

* Fix: random game directory failures

This is caused by having current working directory unchanged after
re-making symlink.

* Fixes: TL-style artifact, update arc_dns_injector

Change pojavInit names

* Fix: 1.13+ isUseStackQueueCall check

* Build: update liblwjgl.dylib in attempt to fix ffi_closure_alloc

* Fix and improvements to the logger

- Dynamically get stdout/stderr fileno instead of fixed value
- Improve file migration logging
- Improve dyld bypass logging

* Fix(pickers): file permission issue

---------

Co-authored-by: Duy Tran Khanh <[email protected]>
2023-06-28 21:49:15 +07:00
Duy Tran Khanh fb75420503 Fix: random ClassNotFoundException LWJGL classes
Cleanup: remove unused code
2023-05-26 18:09:09 +07:00
Duy Tran Khanh 35dc75e69c Fix: 0x0 window if getter called before input ready 2023-05-15 19:28:32 +07:00
Duy Tran Khanh 91eb8725bb Move nativeSetInputReady to native code 2023-05-15 19:26:01 +07:00
Duy Tran Khanh 58bb3c2c45 Update java dependencies
Remove org.json (used by Java MSA, no longer used)
Update gson to 2.10.1 (may fix random issues, vulns)
2023-04-26 11:11:43 +07:00
Eilionoir TunnicliffandDuy Tran Khanh 57ecfbf096 Use native input for controls (#524)
* WIP feature: native input

* Fixes: 1.13+, jar installer input
What's left: fix hotbar position

* Fix broken hotbar

---------

Co-authored-by: Duy Tran Khanh <[email protected]>
2023-04-09 13:33:30 +07:00
Boulay Mathias 9300cb15a0 Fix[GLFW]: better isExtensionSupported signature 2023-04-04 17:27:35 +07:00
khanhduytran0 740d53723c Fix(GLFW): missing forward-compatible functions 2023-03-22 22:05:53 +07:00
Duy Tran Khanh 83b43238c9 Fix(JNA): snprintf() output has been truncated
Update JNA to 5.13.0:
https://github.com/java-native-access/jna/blob/767662a/lib/native/darwi
n-aarch64.jar
$ vtool -arch arm64 -set-build-version 2 12.0 16.0 -replace -output
libjnidispatch.dylib libjnidispatch.dylib
$ install_name_tool -change
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
/System/Library/Frameworks/Foundation.framework/Foundation
libjnidispatch.dylib
2023-03-19 16:04:15 +07:00
Duy Tran Khanh 881dc5cf54 Fixes: Invisible toolbar views on iOS 12-13
Correct GLFWInputImplementation.java location
Add back Swipeable Hotbar option (removed by accident)
2023-03-10 07:11:45 +07:00
Duy Tran Khanh c431f9eb6f Fix #512: move spiral gamedir properties 2023-02-24 04:56:57 +07:00
Duy Tran Khanh 7f65ad1e4f Fix window size for Minecraft 1.2.1-1.2.4 (https://github.com/PojavLauncherTeam/PojavLauncher/commit/4c43522) 2023-01-31 22:15:33 +07:00
Duy Tran Khanh 54a7f2b152 Fix(input_bridge): crash due to window resize called in wrong way
Actually, this pick up changes in
https://github.com/PojavLauncherTeam/PojavLauncher/commit/e2641813562c8
4290281c9f01d560ebca39ad595
2023-01-31 21:19:47 +07:00
Duy Tran Khanh b9b0e0959b Fix: broken mouse coord input again
Turns out another fix broke it
2023-01-30 21:59:51 +07:00
Duy Tran Khanh fd436d9f88 Fix: issues with legacy versions
This picks up the following commits from Android repo:
*
https://github.com/PojavLauncherTeam/PojavLauncher/commit/4716e99df12ab
5bfcaade881774e3b07e8e35450: Don't call Display.create in AWTGLCanvas
constructor (fixes Minecraft 1.2.1-1.2.4)
*
https://github.com/PojavLauncherTeam/PojavLauncher/commit/693cff45b09b3
ca09784a3038a3f9c89cacd391f: Infdev cursor grab: the Pojav part +
Window resize on first key even poll (actual on iOS is on grab state
changes because Android's approach does not work)
*
https://github.com/PojavLauncherTeam/PojavLauncher/commit/ee39334bf31ed
0687c750f37229cf6bea8919b4c (Comment out unnecessary calls to resize)
2023-01-30 09:57:15 +07:00
khanhduytran0 b0203d6fc7 Text input for jar launcher, update lib, fixes
News
- Added text input support for jar launcher.
- Updated MoltenVK to https://github.com/KhronosGroup/MoltenVK/commit/d880f4c

Internal changes
- Added more handling cases to avoid missing call to pojav_initOpenGL()
- Moved custom control’s global functions and properties to ControlLayout.
- Moved dylib framework outside its folder, as it’s not necessary to be bundled in framework.
- Reusing custom controls to produce flexible buttons in jar launcher, which might be extended in the future.

Fixes
- Multistage text input (Japanese, Chinese, etc) should now work again.
- Pointer lock should now function properly again.

- Updated README.md to reflect current stuff
2023-01-19 09:54:55 +07:00
Duy Tran Khanh 652316e8f6 Various fixes and enhancements
- Change setNeedsUpdateOfPrefersPointerLocked logic to hopefully fix
issues with mouse not recognizing on iPhones
- Change reloadVersionList logic to load Installed version list
instantly at startup
- Enable game's CALayer opaque and drawsAsynchronously to improve
rendering performance
- Handle natives_directory variable for legacy modded versions
- Set LD_LIBRARY_PATH to silent Caciocavallo NPE error in locating
Android-only code
- Tapping Play when no version selected will now bring up the version
picker instead of doing nothing
2023-01-13 20:11:50 +07:00
Duy Tran Khanh 61929eb9ad Fix modded client library priority
Removed ancient(v2) parameter: optifineLib

Wrap invokeAfterJITEnabled's handler in main_queue for a more clean
stack
2023-01-07 21:33:49 +07:00
Duy Tran Khanh 7c6c986b68 Fix: missing JNA version override 2023-01-05 11:59:47 +07:00
Duy Tran Khanh 18c59126ba Fix Realms API broke due to UUID with dashes
It’s weird that Realms API just returns empty list whenever UUID with dashes is passed. Without dashes, Realms is now working.
2022-12-20 17:52:32 +07:00
Duy Tran Khanh 85563047a8 GLFW.java: add glfwExtensionSupported 2022-12-06 18:41:09 +07:00
khanhduytran0 99c9e05f1c Add missing icons + tweaks
Fixes/changes
- Compile error in input_bridge_v3.m
- Removed calls to end editing of text fields in CustomControlsViewController.m
- Simplified FlatLAF patch error
2022-11-25 19:52:54 +07:00