Commit Graph
170 Commits
Author SHA1 Message Date
khanhduytran0 b48cecad94 Cleanup 2023-11-11 17:38:58 +07:00
khanhduytran0 d6fd6e1f10 Cleanup[settings]: remove layout debug switches
these settings are available in FLEX
2023-09-28 13:43:20 +07:00
Eva Luna af888219a5 [JIT] Remove AltKit disabling feature, as this is the only integration
For some reason on my iPad, isJITEnabled always returned true. This commit logistically should work, but it's technically untested.
2023-07-15 03:26:43 -04:00
Eva Luna 4eeb216ec5 [JIT] Remove support for JitStreamer and custom servers
The official JitStreamer servers were shut down a few months ago, and we haven't seen any reports of users self-hosting it due to the complicated setup required. Viable alternatives are AltJit, SideJit, and Jitterbug (just to name a few.)
2023-07-15 02:45:33 -04:00
Duy Tran Khanh 286f66452e Fix: settings crashes ingame, loses transparency
Fix: profile version key
2023-07-06 18:33:26 +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 3ee753dbd1 Refactor: split pref builder code, don't reinit views
launcher_profiles.json: set latest-release instead of unknown
2023-07-01 20:07:00 +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
Duy Tran Khanh 0839764694 Change picker's UIMenu style 2023-05-15 09:33:22 +07:00
Duy Tran Khanh 8aa3983bee Use UIMenu for presenting settings' picker view
Enforce compiling for Apple A8
Fix -fcommon cflag
Unset LIBGL_MIPMAP=3
2023-05-15 07:26:53 +07:00
Eilionoir Tunnicliff 4cff4dc949 Migrate environment variables to preferences view controller
Also, remove some more legacy code + make the migration code better
2023-05-08 13:49:52 -04:00
Eilionoir Tunnicliff 7e37dc567f Remove TOInsetGroupedTableView 2023-05-08 12:08:50 -04: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 0426c4ef32 Add option to disable on-screen haptics 2023-05-08 10:31:11 -04:00
Eilionoir Tunnicliff e906a797d5 No more large titles, change various localizations 2023-04-26 11:24:47 -04:00
Eilionoir Tunnicliff b396fef7c2 Disable Zink on iOS 16 and later with release builds
Don't want users switching to Zink and asking why it's broken. Temporary measure until we can get our copy updated and working
2023-04-21 14:22:38 -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
Duy Tran Khanh d932ef8152 Fix: crashes on opening launcher settings ingame
Exception type: NSInvalidArgumentException
Reason: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
2023-03-25 10:00:01 +07:00
Eilionoir Tunnicliff 8d4a223257 Add switch for customizing AVAudioSession (untested) 2023-03-23 21:50:57 -04:00
Eilionoir Tunnicliff 23aef2d1ca Fix slimmed check
Previously this was bugged so that you could never force Java 17.
2023-03-21 11:50:34 -04:00
Eilionoir Tunnicliff bcdcc080fb Controller configurator!
Same keycode names as the on-screen editor to make it easier to identify the possible values. Xbox and PlayStation button names for familiarity. Saving configs handled by the Save and Exit buttons on the navigation bar.

Currently known issues:
- may be jumpy when cells reload or load onto the screen
- loading a new configuration file does not update the value of the cells
- loading a new configuration file does not update the "Controller configurator" item in the main Settings window
	- both of these are solved by closing and reopening the view controller for now
2023-03-21 10:52:16 -04:00
Eilionoir Tunnicliff d8c2c68237 Changes
- Move controller init code to a file for the controller configurator code I'm working on locally
- Add option to limit framerate to 60FPS on ProMotion-enabled displays
2023-03-16 02:47:03 -04:00
Eilionoir Tunnicliff 0d6994c354 Add new "Penciled Development" app icon
Also switches to the new Universal app icon type. Backwards compatible to iOS 12, but requires Xcode 14+ to work.
2023-03-15 23:36:33 -04: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
Eilionoir Tunnicliff e96111c572 Feature: option to disable control overlay when a mouse or game controller is connected
To be paired with incoming game controller configuration, as right now the keyboard cannot be opened with this enabled and a controller connected.
2023-03-13 10:07:34 -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
Eilionoir Tunnicliff 0f89fdc0e2 Readd hidden sidebar option and fix issue with portrait mode on compact iPhones 2023-03-05 16:08:05 -05:00
Duy Tran Khanh e83b3a3bb3 Feature: mouse/hotbar gesture switches
Closes #519
2023-03-05 22:13:23 +07:00
Eilionoir Tunnicliff 8c90010b61 An actual workaround for the UI initialization bug without forcing the iPad UI
Basically consists of pushing the LauncherNewsViewController from LauncherNavigationController when the app first starts up, and setting the navigation bar items from the LNVC class. This commit also moves the account button to the right of the bar, removes the profile name outside of the list view, and does not appear on the Settings view. Removes the hidden sidebar option in favor of always hidden. Moves PID to the bottom of the General section footer. Tested on my iPad Pro (12.9-inch, 2nd generation), iPhone 14 Pro Max, iPhone 6s Plus, and iPhone SE (1st generation) over a grueling week of staring at code and banging my head against a wall. I'm going to bed now.
2023-03-05 00:23:31 -05:00
Duy Tran Khanh 1114a7a864 Feature: show pid in settings 2023-03-03 21:49:35 +07:00
Duy Tran Khanh be3a834b33 Fix(UI) empty line in action sheet; include missing header 2023-02-10 18:09:08 +07:00
Duy Tran Khanh 54c2564c2f Feature: gyroscope controls 2023-02-05 12:16:46 +07:00
Duy Tran Khanh 69f92a0209 Fix(settings): hide home indicator always disabled 2023-02-03 06:15:49 +07:00
Duy Tran Khanh d94fc6a9ac Chore: move config macros to generator
avoid rebuilding the whole project after every git commit
2023-01-31 19:16:50 +07:00
Eilionoir Tunnicliff d1cc9ac977 Add "slim" builds (#494)
* Merge 'main' into 'slim-building' (#493)

* Remove java-16-openjdk from environmentFailsafes()

Versions that use 16 can use 17 as well. Instead of wasting storage and installing both, use just 17 instead.

* Jailbreak JIT fixes

- palera1n detection
- enable JIT if jailbreak bit is set

* github.dev moment

Fix syntax error

* README changes

* Requirements + tvOS things

* Produce a "slimmed" build

Slimmed builds only include the Java 8 runtime, meaning only 1.16.5 and lower can be played. Made for those tight on storage or only using older versions.

* Move zip around

* No need for the * glob

* Escape globs

* --exclude instead of -x

I literally have no idea what's going on, this probably won't fix it

* Payload

* bruh
2023-01-27 09:18:50 -05:00
Duy Tran Khanh 642ce8f84d New option: Erase Demo game data
Since users have no access to the demo instance, this option is added
to make it possible to clean up it in case it is not needed anymore,
such as after buying Minecraft.
2023-01-20 13:43:02 +07:00
Eilionoir Tunnicliff 1c6b4f6e35 oops 2023-01-19 11:46:31 -05:00
Eilionoir Tunnicliff 289b47abfc Move demo mode stuffs to secure location
This way, local mode users cannot use it to download game files without a license.
2023-01-19 11:44:04 -05: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
Eilionoir Tunnicliff fe38eacf9d Port hidden sidebar stuffs from 2.1.1 branch
As well as add a new preference to enable hiding by default and when rotating for iOS 14 and newer.
2022-12-18 18:10:29 -05:00
Duy Tran Khanh 63c2fe0f30 Added option to control AirPlay mode
Closes #450

Internal change to debug: cache to debugBoundsEnabled instead of
getting preference every time
2022-12-17 21:25:23 +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
Duy Tran Khanh a0cb1c0789 Rename renderer: tinygl4angle to ANGLE
This avoids confusion between Android and iOS version when mentioning
this renderer
2022-12-06 18:33:47 +07:00
Duy Tran Khanh b46cfcfc82 New debug option: auto correction
Sometimes autocorrection can be annoying, so there's now a toggle,
enabled by default to preserve behavior.
2022-12-06 18:21:31 +07:00
Eilionoir Tunnicliff e645cfcde8 Changes
- Refine WKWebView on notched devices (worked fine on my 7 as well...)
- Add iDevice model, iOS version, and install to General footer
2022-12-06 00:12:26 -05:00
Duy Tran Khanh f1da61ef26 New debug option: hide home indicator
This allows home indicator to be hidden again, usually useful for users
who play with external controlling device without having to use Guided
Access.

Changed icon of some settings.
Home indicator, status bar and screen edge lock is now based on side
menu visibility.
2022-11-29 19:17:10 +07:00