32 Commits
Author SHA1 Message Date
khanhduytran0 7a097620d6 Fix: missing classes on tvOS
This is just getting it to launch, not very functional yet
2024-04-15 21:00:30 +07:00
khanhduytran0 faadb6081b Fix json error parsing 2024-02-15 05:42:18 +07:00
khanhduytran0 4c075f6941 [WIP] Add modpack installation
Added Modrinth, Fabric/Quilt automated installation
2024-02-14 10:16:13 +07:00
khanhduytran0 b48cecad94 Cleanup 2023-11-11 17:38:58 +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 b3422b3693 Fix: crash upon opening link ingame
Now weak-link with SafariServices instead of dynamically loading it
Uncomment window size callback in nativeSetInputReafy
2023-05-15 21:08:47 +07:00
Eilionoir Tunnicliff dc22673b06 Remove iOS 12/13 supporting code + Alderis
PojavLauncher 3.0 will require heavy modifications in order to work on those two iOS versions now.
2023-05-08 11:15:52 -04:00
khanhduytran0 9f9a3f706c Fix: broken TrollStore self-JIT in commit 23d9338
This adds a boolean to toggle JIT check between jailbreak and csops
because the jailbreak detection checks for CS_PLATFORM_BINARY, which
is available for both jailbroken and TrollStore
2023-01-31 05:45:34 +07:00
Eilionoir Tunnicliff a27876d187 github.dev moment
Fix syntax error
2023-01-26 10:26:01 -05:00
Eilionoir Tunnicliff 23d9338f04 Jailbreak JIT fixes
- palera1n detection
- enable JIT if jailbreak bit is set
2023-01-26 10:21:31 -05:00
Eilionoir Tunnicliff 957e175a05 Test out custom NSLog
No date, time, or executable name. May add filename + function in the future.
2023-01-19 13:57:48 -05:00
Duy Tran Khanh d0279af8aa Internal changes
- First changes for tvOS (very WIP) this will be a challenge to use
remote storage as ATV doesn't allow persistent storage (at least
without jailbreak). Low priority for now.
- Change regLog, debugLog to NSLog, NSDebugLog
- Rewrite most of JavaLauncher.m to ObjC
- Update README.md
2022-12-17 21:25:23 +07:00
khanhduytran0 78b788262c Move LoginViewController to parts
- The account selector now has Add Account item
- Last selected account is kept
- Account token refreshment is done on startup and on select if need
- Moved JIT status to LauncherMenuViewController's toolbar
- Primary View Controller is now LauncherSplitViewController
- More unmentioned(?), see diff.
2022-12-04 11:41:54 +07:00
Duy Tran Khanh 1af09ca02d Tweak NSLocalizedString; Keep split display mode
Tweak NSLocalizedString to return English if not yet localized.
Keep Split display mode between rotations.
New debug option: skip JIT wait, for #423
2022-11-17 21:46:38 +07:00
Duy Tran Khanh b46c64cc59 Changes and fixes to input, mark nonatomic to others
- Controller: implement ticking, swapped thumbstick mapping to match
common usage
- External mouse should continue sending move while mouse button is
being held
- Tweak touch scroll velocity division to 100
2022-10-02 10:54:04 +07:00
Duy Tran Khanh b806c5df3c Many changes and fixes
Changes:
- Decreased multithreaded download max threads to 10
- Moved launcher buttons to match Android UI
- Moved UIKit hooking code to separate file
- The Launcher tab is now marked as under construction.
- Updated README.md to avoid confusion between self-JIT and auto-JIT.

New settings section: UI debugging
- Unlock iPadOS UI: allow iPhone users to unlock every iPadOS-only
features (floating keyboard, popover alert, sheet-styled view
controllers, etc.)
- Show layout bounds, like the one in Android's developer setting
- Show layout overlapping

Fixes:
- App container data is not shown in the Files app due to
`no-container` entitlement, replaced it with `no-sandbox`.
- Ignore jinput-platform libraries to avoid download error
- Multithreaded assets download breaks
- `Send your logs` crashes on iPadOS
2022-09-22 09:52:56 +07:00
khanhduytran0 f27808464b Allow control settings to be changed ingame 2022-09-04 09:47:46 +07:00
khanhduytran0 8433a7d739 Added missing lwjglx funcs, perform some filters in currentVC func 2022-08-29 21:33:14 +07:00
Duy Tran Khanh 97c2f4b473 Added controller input (not tested)
This works by mapping gamepad keys to keyboard keys, just like
PojavLauncher Android.
2022-08-28 21:47:25 +07:00
Duy Tran Khanh ec1afe94ca Integrated JitStreamer attach on startup 2022-08-27 17:07:12 +07:00
Duy Tran Khanh 292fb8166f Custom controls: safe area is now customizable
Other changes:
- Cleanup unused functions
- Internal changes to access ViewController globally
- Moved ControlLayout to a separate file
2022-08-03 12:23:27 +07:00
khanhduytran0 ce292d518a Tweaks
Added UIRequiresFullScreen for iPad
Only force full navigation bar height on iPhone
The Virtual mouse preference can now be set by the toggle button
Use UIColor.whiteColor instead of RGB 255/255
Use arm64e-supported fishhook fork
2022-07-29 13:27:18 +07:00
Duy Tran Khanh 5261b41d3f Force the nav bar height same across size classes 2022-07-24 09:37:06 +07:00
Duy Tran Khanh d8459effc0 WIP: New User interface
UISplitViewController is being used to create split menu.
Currently, autolayout is not yet done.
Added account switcher to the split view.

Fixes:
- auth_session parameter for legacy Minecraft versions
- Updating self.view background color is now automated by
UIColor.systemBackgroundColor
2022-07-22 08:02:40 +07:00
Duy Tran Khanh 984647084b Fixes
- [Internal] Changed how setting current viewController work
- [Internal] Correct 018e46a: avoid duplicating code
- [Internal] Saving JSON now uses NSData to write directly
- Correct a check of the Launch .jar option
- Set the AWT window size for the game
2022-05-27 21:54:26 +07:00
khanhduytran0 bf12743457 Moved the JVM entry point to start when needed 2022-05-27 05:48:25 +07:00
khanhduytran0 2a9d3909f8 Internal, renderer and UI changes + 1.19-pre1 support
Minecraft 1.19 support:
- Since 1.19-pre1, LWJGL 3.3.1 is used. However, LWJGL 3.2.3 still works with it, at least for this Minecraft release.
- Added a hack to skip calling to ObjC codes (skipped an asset file to skip setting the icon)
- JNA version replacing: now only change to 5.8.0 if version < 5.8.0

Internal changes:
- Cleanup: moved global functions to a new place
- Handle demo user correctly: actually authenticate the game with demo's access token and use the Xbox gamertag as the username
- Start moving strings to Localizable.strings (WIP)
- Re-wrote the Microsoft authentication and account management to Objective-C
- Assets downloading: added a tiny sleep call so that the UI won’t be frozen when too many tasks are executed at the same time

Renderers changes
- gl4es: `init_constructor` is now enabled, therefore moved the preload part to before `eglInitialize` (or EGL will be de-init after gl4es's hardware test).
- gl4es-extra (aka holy gl4es 1.1.4) is now used to replace the regular gl4es. This fixes VBO issue on version < 1.13 and some extra stuff. https://github.com/PojavLauncherTeam/gl4es-114-extra/commit/d6cf5c4
- Removed gl4es 1.1.5 and `Disable gl4es shaderconv` as it's unnecessary for now
- Removed vgpu, as it requires some missing extensions when come to shaders

User interface:
- The account selection list now displays the skin head (or the Xbox gamerpic if demo) and the account type
2022-05-22 11:31:14 +07:00
Duy Tran Khanh 150cf861b1 Experimental things
* Multitouch handling, allows one of these actions below to work with
moving camera at the same time.
- Switching hotbar slot; might not work properly
- Destroying block (left mouse button) with another finger
long-pressed (without pressing the PRI button)
- Right mouse trigger with another finger tapped onto the screen
(without pressing the SEC button); not working properly yet
* Sub-pixel cursor support; not yet checked
2021-12-13 07:40:12 +07:00
Duy Tran KhanhandDuy Tran Khanh db0074d1e5 Merge custom control changes (#284)
* Move control loaders to CustomControlsUtils.m

* WIP Drawer support (currently broken)

Also, updated MetalANGLE for helping debug stuff on crash.

* temp

* ControlDrawer: free orientation

* Avoid scrolling the hotbar in grab mode

* Popover: fix the frame inside the arrow

* Changes

- Attempt to allow Microsoft login when offline.
- Custom controls: drawer and sub-buttons are now visible.
- Pickers in Preferences: pre-select at the saved index.

* Bump version code to 4, hide sub-button by default

* Fix text trucanting

* impl scroll buttons, rewrite some parts to objc

* Virtual mouse implementation

Also, possible fix for popover crashes on iPad

Exception type: NSInternalInconsistencyException
> Reason: Tried to set <UIBarButtonItem: 0x10fee5660> menuOnTouchDown
menu=0x2810dce10 image=<UIImage:0x280149050 symbol(system:
ellipsis.circle) {20, 19} baseline=3.5,contentInsets={1, 1.5, 1,
1.5},alignmentRectInsets={-0.5, 0, -0.5, 0}
config=<traits=(UserInterfaceIdiom = Pad, DisplayScale = 2,
DisplayGamut = sRGB, HorizontalSizeClass = Regular, VerticalSizeClass
= Regular, UserInterfaceStyle = Dark, UserInterfaceLayoutDirection =
LTR, PreferredContentSizeCategory = L, AccessibilityContrast =
Normal)>> as sourceView of
<_UIAlertControllerActionSheetRegularPresentationController:
0x12043f5a0>, even though it is not a kind of UIView.

Co-authored-by: Duy Tran Khanh <[email protected]>
2021-10-15 05:16:17 +07:00
Duy Tran Khanh 4f59e0ffff PojavCore is now inside the main executable
This took so long since there was a failed attempt in unloading and
reloading JVM to support Forge 1.17.x. Next attempt would be rewrite
everything to Objective-C and move the JVM entry point to the start of
the game.
2021-10-01 11:14:05 +07:00
Duy Tran Khanh 5dcacb6d00 Changes
- Fixes #272
- Replaced MGLLayer with EGL calls
- Re-implemented Zink renderer to work with new Renderer selection system (currently hidden due to unfinished)
2021-09-14 10:57:24 +07:00
doregon d660282606 C is boring, move to Obj-C
Also fix the macOS stuff as I research how to properly fix the issue
2021-07-06 17:14:41 -04:00