73 Commits
Author SHA1 Message Date
khanhduytran0 fb75288831 Fix: update ANGLE and default binding to desktop
Updated ANGLE to
https://github.com/google/angle/commit/6024e9c05548480c3b2ea42836a11250
9a549a95. It sucks that newer commit completely removed Desktop GL
frontend (as well as no LTW since GLES 3.x aren't gonna be implemented
anytime soon)
Misc: exclude simulator and Mac Catalyst from get-task-allow
enforcement.
2024-12-11 19:22:03 +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 ec04885ce5 Feat: patch dylib for game dlopen calls
Now that game can directly load macOS's JNA native library,
libjnidispatch is removed.
2024-06-09 21:53:15 +07:00
khanhduytran0 c080c1641d Feat[renderers]: update ANGLE and MoltenVK
ANGLE:
https://github.com/PojavLauncherTeam/angle/commit/f9a36d70d40976bcaa987
7cba8184b1356e7efb4
MoltenVK:
https://github.com/khanhduytran0/MoltenVK/commit/eeccb3f407a3ebef28862f
29f21fc0564b5e47ad
2024-04-12 21:13:16 +07:00
Duy Tran Khanh c8304e4892 Feat[renderer]: update MoltenVK to https://github.com/KhronosGroup/MoltenVK/commit/aed91cb5631e112faa521fe5739935424b9a4675 2023-09-16 11:59:31 +07:00
khanhduytran0 d3b2bc193d Fix[ANGLE]: <1.13 panorama rendering 2023-08-17 05:49:05 +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 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 3510fdac5c Revert "Remove CAltKit"
This reverts commit 55db8ddf3f.
2023-04-29 14:33:54 +07:00
Eilionoir Tunnicliff 55db8ddf3f Remove CAltKit 2023-04-26 00:44:11 -04:00
khanhduytran0 8c70d7603d Revert "CI: Update gl4es"
This reverts commit d8d25949be.
2023-04-19 19:44:38 +07:00
github-actions d8d25949be CI: Update gl4es 2023-04-19 13:38:28 +01:00
Duy Tran Khanh 6a9443b464 Update to holy gl4es 1.1.5
Commit: 286c9ff1d9afbe450f8b2530de9e07058a1fc667
2023-04-19 19:12:33 +07:00
khanhduytran0 cf03acbe92 Update libjnidispatch, again
https://github.com/java-native-access/jna/blob/5.13.0/lib/native/darwin-aarch64.jar
See https://github.com/PojavLauncherTeam/PojavLauncher_iOS/commit/83b4323
2023-04-07 10:14:36 +07:00
Duy Tran Khanh b6f5f9cede Update lwjgl (may break, need more testings)
warns on calling missing GL function instead of crash
2023-04-04 18:18:52 +07:00
github-actions 95ec1d905e CI: Update gl4es 2023-04-04 11:31:20 +01:00
github-actions e7740fad30 CI: Update gl4es 2023-03-31 18:49:46 +01:00
github-actions f99d54fbad CI: Update gl4es 2023-03-31 18:40:50 +01:00
khanhduytran0 d58a731de7 Fix: Correct libjnidispatch (JNA) version build 2023-03-23 21:50:22 +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
github-actions 60e64e1236 CI: Update gl4es 2023-03-15 17:21:18 +00:00
github-actions 9a04ddcf22 CI: Update gl4es 2023-03-15 17:17:13 +00:00
github-actions 43ae7567ac CI: Update gl4es 2023-03-10 03:23:10 +00: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
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 a7a4e015f4 Don't exclude jinput; Updated gl4es to https://github.com/PojavLauncherTeam/gl4es-114-extra/commit/29ce130 2022-09-16 10:39:25 +07:00
khanhduytran0 5abca740d0 Updated MoltenVK to https://github.com/KhronosGroup/MoltenVK/commit/013a1924 2022-08-25 16:51:53 +07:00
Duy Tran Khanh ae1c86b113 Various fixes
- GLFW display mode array, fix 0x0 resolution bug
- OSMesa library (copied back 64f4042)
- Hacks for getting Spiral Knights to launch
- Error is now logged properly
2022-08-12 11:53:02 +07:00
Duy Tran Khanh 7bbbe2cb54 Cleanup + move tinygl4angle src + use piston-meta 2022-07-28 09:38:15 +07:00
Duy Tran Khanh ad9c6d482a Allow embedding JREs to PojavLauncher.app/jvm for IPA builds
The old IPA creation process: wrap every dylib files into framework;
this appears to be unnecessary, dylib files can be put outside without
breaking codesigning and validation (only tested with AltStore: it
scans and signs every Mach-O files).
Therefore, IPA builds now allow putting Java Runtimes to
`PojavLauncher.app/jvm`.
Makefile is yet tweaked to adapt this change, will be done later.

Other tweaks
- Disabled autocorrection for text fields in preferences
- The preferences now searches for installed JRE versions instead of
hardcoding them
- Bug fix: "accounts" folder was not created initially, leading to
"username.json does not exist" error
2022-07-25 20:54:41 +07:00
khanhduytran0 97433a5596 Add support for mods that use Vulkan for rendering
Known mods: Blaze4D (untested), VulkanMod, more?
- VulkanMod: needs a tiny modification to get it work with LWJGL 3.2.3
2022-06-10 12:13:23 +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
khanhduytran0 1d7e8a8214 Experimental Minecraft Downloader
This is not yet finished, there are 3 main things left
- Make sure everything works
- (Assets) download old structure
- Cleanup

What are implemented?
- Downloading file is handled with AFNetworking
- SHA1 validation, can be turned off in Preferences
- inheritsFrom support (need testing)
- Downloading assets with 20 jobs parallel

Known issue
- Assets SHA1 validating freezes the UI

Additional things
- [Custom controls] Dynamic position error is now handled instead of just crashes
- [Custom controls] The editor animation is now changed to fade in/out (for now, later might change)
- VGPU renderer is now made hidden, since it's too limited on iOS, removal planned
- [Code cleanup] Use NSDictionary instead of a set of fields for renderer list; Fix wrong field name.
- Some more stuff...
2022-04-20 20:45:47 +07:00
Adam Tunnic 959a4e2290 Merge branch 'backend-virgl' into main 2022-02-14 08:52:10 -05:00
Duy Tran Khanh 8e0bff8ce6 Remove codesign from Alderis + thin lib 2022-02-10 10:32:48 +07:00
Duy Tran Khanh dc5c5a9c65 [Custom controls] Added color picker for iOS < 14
Might aswell add an option to optionally use this instead of the system
color picker on iOS 14+. Used library: Alderis

Other changes
- [Custom controls] The editor is now fullscreen due to the
presentation of the color picker.
- Fixes scroll wheel input is always int
2022-02-01 21:58:54 +07:00
Duy Tran Khanh c226931441 Added VGPU renderer
Commit:
https://github.com/PojavLauncherTeam/VGPU/commit/9f4ded5934b24c62368d70
1647855c9c9077d903
2022-01-14 12:37:16 +07:00
khanhduytran0 72e0c69ad1 WIP virglrenderer
Current state: bind() returns errno -1 (Operation not permitted)
2021-11-30 04:29:09 +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 7fb5b55d8b Override JNA to 5.8.0
This fixes LabyMod 1.8.9 crashing.
2021-09-27 11:06:15 +07:00
Duy Tran Khanh 64f4042103 Changes
- Downgraded to Mesa 21.0 since 21.2.? goes brrr
- Zink renderer is now visible in the renderer picker.
- Makefile: test multi-line ssh script moment
2021-09-18 19:52:09 +07:00
Duy Tran Khanh b2ffd5edc3 Changes
- libpojavexec.dylib is now PojavCore.framework.
- More changes for Zink renderer. Note that Mesa 21.0 is included instead of 21.2.1 due to the new version seems to be broken, only display glClearColor.
2021-09-17 07:00:14 +07:00
Duy Tran Khanh 15e35734aa Updated libtinygl4angle: fix Render Regions crash
Missing function added: glMultiDrawElements
2021-09-05 13:12:14 +07:00
Duy Tran Khanh dd9be6e0c4 New renderer: Tiny GL wrapper for ANGLE
This renderer allows Minecraft 21w10a and newer to be rendered directly
in OpenGL ES through ANGLE with several wrapped functions, so the game
may runs with better performance.
Source code:
https://github.com/PojavLauncherTeam/gl4es/tree/master/tinygl4angle
2021-09-05 10:39:00 +07:00
Duy Tran Khanh 0a1e4fc855 Update gl4es 1.1.5 to support OptiFine 1.17.x 2021-08-18 17:24:44 +07:00
Duy Tran Khanh fe5f9e77a9 Changes
- Added a check to prevent attempt to launch 1.17+ with Java 8.
- Added an option to disable gl4es shaderconv in order to let ANGLE
processes them directly. This option lets Minecraft 1.17+ work
without the patch resource pack, OptiFine works aswell :)
- Changing renderer library no longer requires restart the launcher.
- Fixed some alert dialogs not displaying.
- PList default values are now set every time it loads.
2021-08-13 07:25:17 +07:00
Duy Tran Khanh a739cf7202 Resolution downscaler moment 2021-08-10 19:42:10 +07:00