46 Commits
Author SHA1 Message Date
khanhduytran0 6935671308 Fix: launcher not proceeding after fully downloaded
Turns out 2 last commits were pointless and didn't fix the root issue at all
2024-08-04 06:00:06 +07:00
khanhduytran0 aafdeaf993 Fix[MCDL]: should dismiss download list view before alerting
A lot of users have been unable to proceed past 100% download, mostly
after fully downloading will get it stuck at 1 byte. I have no idea if
it fixes the issue, but it does 2 things:
- Dismiss download list view if it's visible, otherwise the JIT alert
will not he shown
- Change the progress string to Waiting for JIT after completing
download
2024-08-02 08:15:47 +07:00
khanhduytran0 958a668f7f Cleanup: remove legacy code and data migration 2024-07-15 10:02:59 +07:00
khanhduytran0 a9cbdda12a Feat+Fix[MCDL]: show speed and ETA, mitigate timeout 2024-06-24 20:46:57 +07:00
khanhduytran0 73e35f5365 Feat: notify TS user to enable URL Scheme for JIT 2024-04-09 13:41:16 +07:00
khanhduytran0 a7a74620b1 Fix: don't apply entitlements to libraries
Regression in
https://github.com/PojavLauncherTeam/PojavLauncher_iOS/commit/a722b4a
2024-03-20 17:32:48 +07:00
khanhduytran0 4c075f6941 [WIP] Add modpack installation
Added Modrinth, Fabric/Quilt automated installation
2024-02-14 10:16:13 +07:00
khanhduytran0 d7302326b9 Feat+Refactor[MCDL]: rewrite to allow download libraries in parallel 2024-02-10 18:20:07 +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 3937b3a56b Feat: add auto Forge & NeoForge installer
Basically, this downloads the installer and run with a scheduled Enter key press to automatically install.

Fabric installer now reload things; add stable loader version filter
2023-09-01 14:41:35 +07:00
Duy Tran Khanh 82113555df Fixes[Fabric installer]: crash in fresh instance, missing icon, log to debug
+ Allow specifying profile icon using url
2023-08-28 20:37:49 +07:00
khanhduytran0 6ede0a3a71 [JIT] Ensure AltKit stops discovering before game starts 2023-07-18 13:35:53 +07:00
Duy Tran Khanh 72edd15dfb Fix: potential crashes in profile mgr, wrong debug_logging category 2023-07-09 14:34:04 +07:00
khanhduytran0 aa90bea89c Fixes: local version list not reloaded; version name in error 2023-07-06 17:47:17 +07:00
khanhduytran0 094160fbee Fix[UI]: profile states on switch/delete 2023-07-06 16:15:41 +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 Khanh 6132c7dc53 Fix UI icons size
Makes icons size smaller

Refactor: clean instance file manager list code
2023-06-30 09:58:11 +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
Eilionoir Tunnicliff e906a797d5 No more large titles, change various localizations 2023-04-26 11:24:47 -04:00
Duy Tran Khanh bcfc13a4f1 Major cleanup for the controller config vc
- Cleanup unused parts
- Cleanup complicated dictionary constructions
- Fix lag spikes during scrolling in this screen

Allow audio settings to be changed ingame
2023-04-19 19:12:32 +07:00
Duy Tran Khanh d6a51017fc Return the old presentation style of GameDir VC 2023-03-25 20:50:09 +07:00
Eilionoir Tunnicliff de2b1843cc Use modals for presenting view controllers from Settings view
Also change "Minecraft game directory" to just "Game directory". Reduce output of reloadVersionList to just localized description.
This does require the modals to have dismissModalViewController() defined in their classes, not really an issue since all view controllers will be custom classes anyway.
2023-03-15 13:14:14 -04: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
Eilionoir Tunnicliff 7fd4b7902b Add option to disable AltKit, changes to dialogs, and larger navigation bar headers
Time to go play Destiny 2
2023-03-09 17:46:19 -05:00
Eilionoir Tunnicliff e2040fb3be Readd account button to Settings and only show text in landscape mode
There is a bug in this where the text can become "sticky" and stay the same when rotating if the sidebar is opened but no rows are selected (meaning that the app just finished launching and LauncherNewsViewController is still presented by LauncherNavigationController.) More needs to be done to fix this little bug, however it does not hinder the usability of the account button or anything else in the launcher so I'm pushing it now to fix later.
2023-03-09 13:13:32 -05:00
Duy Tran Khanh f53c3910d5 Refactor(MCDL): cleanup unreachable code
turn out this piece of code is not useful now
2023-01-31 18:40:39 +07:00
Duy Tran Khanh d4f78fda6f Fix+Refactor(MCDL): simplify fetchLocalVersionList
Fix for the previous workaround: modded versions disappear
2023-01-31 18:23:40 +07:00
Duy Tran Khanh f477db18a0 Workaround(MCDL): modded version breaks if vanilla not installed 2023-01-31 06:34:51 +07: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
Duy Tran Khanh 4c71a17a35 Fix(version picker): empty array/OOB crashes 2023-01-30 09:07:47 +07:00
khanhduytran0 9e03e36be7 Refactor: deduplicate code, use cleaner syntax 2023-01-20 08:36:26 +07:00
Duy Tran Khanh 8577636a4e Fix: user interaction issue on iOS below 14
The following changes apply for iOS 13.7 and below.
* Actually, a fake toolbar view is added on top of the real one, in
order for subviews (the version picker and the play button) to receive
user interaction properly
* Tweaked Split behavior to fix another dead-locked sidebar issue
* The toggle of hiding sidebar is now available
2023-01-19 20:45:34 +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 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
Eilionoir Tunnicliff c5d5ed0bfa Swap LNC + SVC home bar hiding 2022-11-25 11:14:57 -05:00
Duy Tran Khanh 5eae6015d6 Rearranged UI layout
* Moved account selection to the secondary NavigationController
* Added logo to fill in the primary one
* Moved buttons to the sidebar:
- Custom controls
- Install jar
- Send logs
* Fixed object memory leakage in LauncherNavigationController
* Set fullscreen=false on startup, workaround < 1.13 resizing issue
* Reduced mouse_pointer size

TODOs:
* Add icons for new items, will prefer copying from the Android
version.
* Remove LoginViewController: integrate add account to the account
selector, move Techno text+check to sidebar, etc..
* Instead of separate Microsoft, Demo login; display demo warning
before MS login.
2022-11-21 22:03:59 +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 838f99af1b Support external display resolution
TODO: add checks to not confuse with Stage Manager + external display

README.md: Added missing credits
2022-11-13 22:01:57 +07:00
Duy Tran Khanh 8f8ec8df89 Cleanup some stuff 2022-11-13 09:15:24 +07:00
Duy Tran Khanh 1f85287590 reloadVersionList: fetch local when there isn’t cache 2022-10-22 20:41:04 +07:00
Duy Tran Khanh bc060b5cdf Add a tiny Waiting for JIT dialog 2022-10-13 11:17:18 +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 c616cb152f Moved toolbar code, added WIP News tab 2022-09-25 11:13:59 +07:00