29 Commits
Author SHA1 Message Date
khanhduytran0 68ee5d09cd Fix[renderer]: add more OpenGL aliases for tinygl4angle
Hope to fix 1.21.5 crashing issue
2025-04-02 16:55:12 +07:00
khanhduytran0 d7302326b9 Feat+Refactor[MCDL]: rewrite to allow download libraries in parallel 2024-02-10 18:20:07 +07:00
Duy Tran Khanh a100785d68 Fix[ANGLE]: comment out test code 2023-07-30 18:15:20 +07:00
khanhduytran0 f2679bcec4 Feat[ANGLE]: update for basic shader support 2023-07-30 12:08:29 +01:00
Duy Tran Khanh 585ae2fd7d Feat[ANGLE]: update to https://github.com/PojavLauncherTeam/angle/commit/a097731
Fix: gl4es should now be able to run 1.17+
2023-07-26 21:32:03 +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
Eilionoir Tunnicliff 0c1c6f9ed8 Whoops 2023-05-08 12:10:53 -04:00
Duy Tran Khanh 954b57f748 Fix: iOS < 15 Symbol not found: kIOMainPortDefault
Use kIOMasterPortDefault instead
2023-04-26 11:07:02 +07:00
Eilionoir Tunnicliff 80a701a8b1 Use a much more robust method of getting device data
- Doesn't require a hardcoded list of IDs
- Allows me to move the legacy devices dict to main.m
  - Make it annoying so I remember to remove it with 2.3
  - Now log when on iOS 12/13 or 1GB device
- Allows seeing if being run on a Mac
  - Although currently installing on Mac is completely broken. Thanks AltKit.
-
2023-04-19 13:17:35 -04:00
Eilionoir Tunnicliff b60d7d5e5d Missed these two 2023-04-13 17:51:38 -04:00
Eilionoir Tunnicliff 5bc0c0c15f Make device names match Apple's officials better 2023-04-13 17:50:49 -04:00
Duy Tran Khanh 9183b1fecc Feature: show instance folder size
- Move AFNetworking to the separate dynamic library
2023-03-18 18:14:02 +07:00
Duy Tran Khanh 67e5080cb5 tinygl4angle: add VertexAttrib functions
Copy from gl4es:
https://github.com/ptitSeb/gl4es/blob/3b926be6f2fb47a8befd0604e64008db3
e0d779a/src/gl/wrap/gl4eswraps.c#L670-L704
2023-02-21 17:57:30 +07:00
Eilionoir Tunnicliff 224c86d689 Dormant environment variable 2023-01-19 11:34:12 -05:00
Eilionoir Tunnicliff a596e7fc8a Use as macro instead 2023-01-19 11:19:36 -05:00
Eilionoir Tunnicliff 64f4ee75cc Fix 2 2023-01-19 11:12:08 -05:00
Eilionoir Tunnicliff cdcfa224b0 Fix some issues 2023-01-19 11:03:24 -05:00
Eilionoir Tunnicliff 21aa26bbf8 Add deviceids.h
Makes identifying models easier for our helpers in the Discord. Also add ASU fallback for migrate directory function.
2023-01-19 10:47:01 -05:00
Eilionoir TunnicliffandDuy Tran Khanh c80f2022e4 Add AltJit support (#422)
* Integrate AltKit for JIT

* Bump min iOS to 12.2, delete AltKit-Swift.h

* Add title messages + prefer JitStreamer

* Tweaks to UI and order of operations

Co-authored-by: Duy Tran Khanh <[email protected]>
2022-11-14 17:06:25 -05:00
khanhduytran0 4726cf6e3c Update DBNumberedSlider 2022-09-04 17:04:35 +07:00
Eilionoir Tunnicliff cbc7c569fa Merge remote-tracking branch 'origin/main' into wip-new-pref-ui 2022-09-03 19:29:14 -04:00
Eilionoir Tunnicliff de977f67f8 Overhaul jailbreak detection mechanisms 2022-09-03 01:37:53 -04:00
Duy Tran Khanh be39a72e38 WIP: re-write the preferences UI 2022-08-18 08:13:26 +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 7bbbe2cb54 Cleanup + move tinygl4angle src + use piston-meta 2022-07-28 09:38:15 +07:00
khanhduytran0 0041edcc87 Bundle AFNetworking into the main executable
Trying to fix the following crash:

Exception type: EXC_BAD_ACCESS (SIGBUS)
Exception subtype: KERN_PROTECTION_FAILURE: 0x100fe76e8
Exception codes: 0x0000000000000002, 0x0000000100fe76e8
Culprit: Unknown
VM Protection: ---

Triggered by thread: 0
Thread name: Dispatch queue: com.apple.main-thread
Call stack:
0   AFNetworking                  	0x0000000100fe76e8 0x100fc8000 + 128744     	// +[_AFURLSessionTaskSwizzling load]
1   libobjc.A.dylib               	0x00000001a1b9321c 0x1a1b82000 + 70172      	// load_images
2   dyld                          	0x00000001012ee320 0x1012ec000 + 8992       	// dyld::notifySingle(dyld_image_states, ImageLoader const*, ImageLoader::InitializerTimingList*)
3   dyld                          	0x0000000101300c4c 0x1012ec000 + 85068      	// ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&)
4   dyld                          	0x0000000101300bb0 0x1012ec000 + 84912      	// ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&)
5   dyld                          	0x00000001012febb8 0x1012ec000 + 76728      	// ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&)
6   dyld                          	0x00000001012fec84 0x1012ec000 + 76932      	// ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&)
7   dyld                          	0x00000001012ee7f4 0x1012ec000 + 10228      	// dyld::initializeMainExecutable()
8   dyld                          	0x00000001012f3d88 0x1012ec000 + 32136      	// dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*)
9   dyld                          	0x00000001012ed258 0x1012ec000 + 4696       	// dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*)
10  dyld                          	0x00000001012ed038 0x1012ec000 + 4152       	// _dyld_start
2022-06-30 14:28:41 +07:00
Adam Tunnic 7ca6bf8a67 Fix Makefile error and move external_include to external/zink 2021-11-30 11:00:44 -05:00
Duy Tran Khanh 30f1b95693 Prepare for jailed version (no ETA)
I still have no idea how to start implementing JIT, do I just mprotect to swap between RW and RX?
2021-09-10 07:28:02 +07:00
Duy Tran Khanh 8f5059e741 Changes
- [Custom controls] Removed control size limit, prepare custom controls
screen.
- [Jailed] Use  directory as home instead of

- [Preference] Added "button scale"
- [Preferences] Moved into launcher_preferences.plist
2021-07-17 07:18:03 +07:00