Commit Graph
91 Commits
Author SHA1 Message Date
Duy Tran Khanh ee2c68fb98 Fixes
Makefile: fix path
Moved GameSurfaceView to a separate class
Renamed MinecraftDownloader to MinecraftResourceUtils

Fix: Some versions fails because GLFW_CLIENT_API is not set
2022-07-01 07:02:25 +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
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
Duy Tran Khanh 7337d90eee All options are now applied without restarting
Instances manager: cleanup, now explicitly state the error message
Moved init_loadCustomEnv() back to JavaLauncher.m
2022-05-27 09:56:06 +07:00
Duy Tran Khanh 85bc35f679 Automatically change the Java version if needed
Manually-specified Java version still applies to:
- Minecraft versions below 1.17 (default is Java 8)
- Minecraft version 1.17.x (allow choosing between Java 16 and 17)
2022-05-27 09:01:39 +07:00
khanhduytran0 bf12743457 Moved the JVM entry point to start when needed 2022-05-27 05:48:25 +07:00
Eilionoir Tunnicliff 018e46a1fe Fix version toggles in LauncherPreferences 2022-05-23 14:52:53 -04:00
Eilionoir Tunnicliff ab4bddb941 Merge branch origin/main into objc-rewrite 2022-05-22 03:12:48 -04: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
Eilionoir Tunnicliff 8f502cd7db Fix build, change other Arc names to Cosmetica 2022-04-30 19:47:06 -04:00
Nebula 4a9d92a513 Update LauncherPreferencesViewController.m 2022-04-27 20:39:41 -04: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 2ed628f921 Add option to show virtual mouse at game launch 2022-02-22 00:37:47 -05:00
Adam Tunnic 80ba038c15 Fix POJAV_RENDERER, also add a7_allow now because why not 2022-02-20 00:22:41 -05:00
Duy Tran Khanh 14760195a6 Fix awt_xawt linking, use NSArray instead for renderer list 2022-02-19 21:21:39 +07:00
Adam Tunnic 6f7a8a7af2 Disable virgl 2022-02-14 09:14:55 -05:00
Adam Tunnic a736c900c0 Update LauncherPreferencesViewController.m 2022-02-14 08:57:12 -05:00
Adam Tunnic 959a4e2290 Merge branch 'backend-virgl' into main 2022-02-14 08:52:10 -05:00
Adam Tunnic b4aa54c50e Minor bug fix for Arc capes switch 2022-02-05 11:30:44 -05:00
Adam Tunnic 372831bc9e Add Arc capes 2022-02-05 11:28:51 -05:00
Duy Tran Khanh 50bdb73ab8 Update LauncherPreferencesViewController.m
This line was mistakenly removed
2022-01-14 13:25:19 +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
Duy Tran Khanh 1b0d564379 New toggle option: Restart before launching game
This option allows the launcher to restart itself before launching the
game, therefore all changes are applied such as JVM Arguments and Java
version. The restart mechanism doesn't always work, so a toggle is
here for now.
2021-12-17 21:13:50 +07:00
Adam Tunnic d11e113ec4 Reset preferences option, switch to POJAV_HOME 2021-12-08 21:43:02 -05:00
Adam Tunnic b056e5ed95 Add option to disable symlink to /var/mobile/Documents/.pojavlauncher (off by default) 2021-12-08 11:44:01 -05: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 33cb7d0125 Custom Controls revisions implemenation (#292)
* 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.

* Swap item between hands by double-tap item moment

* Basic editor (only several stuff implemented)

There's no save/load yet, so it's just a preview for now.

* Control editor (preview only)
TODO: Color picker for iOS < 14

* Save, load and set default are here

* Changes

- Ported Snap and Align from Android
- Added options: create and delete button

TODO:
- color picker for iOS < 14
- drawer editor
- maybe more

* Editor: Added orientation changer for drawer

Added some more check to determine whether dynamic position should be
visible (when the button is not a sub-button, or the parent drawer
doesn't use the FREE orientation)

* Editor: implemented adding drawer and sub-button

* Added a warning about unfinished custom controls

Co-authored-by: Duy Tran Khanh <[email protected]>
2021-11-26 10:35:21 +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 a3954539ea duplicate tag 2021-10-03 13:59:10 +07:00
Duy Tran Khanh c2a0e3ae80 Changes in LauncherPreferencesViewController
- Java arguments edit text box: moved the done button to the return button.
- New option: slideable hotbar. This option allows you to use a finger to slide between hotbar slots.
- View tag IDs are moved to macros.
2021-10-03 12:35:05 +07:00
Duy Tran Khanh ed54dd8474 @doregon didn't like it, so return to blur-then-terminate
but "According to Apple, ~~your app should not terminate on its own~~. Since the user did not hit the Home button, any return to the Home screen gives the user the impression that your app crashed. This is confusing, non-standard behavior and should be avoided."
2021-10-02 09:28:57 +07:00
Duy Tran Khanh 9f2b5be409 changes
Add some asserts in loadPreferences()
`-[UIApplication suspend]` transition
2021-10-01 20:40:47 +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 8ffbc4f653 :fruhh: 2021-09-16 08:29:50 +07:00
Duy Tran Khanh 48c59f5697 Bug fix: java_home saved as "Java 8/16"
Issue is similar to what happened in #272
2021-09-16 08:17:42 +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
Adam Tunnic 6d924a80e8 wtfman i did the same thing again 2 2021-09-13 23:39:09 -04:00
Adam Tunnic 6df3d3ea0b wtfman i did the same thing again 2021-09-13 23:34:24 -04:00
doregon 9c790cd936 Java home is now a UIPicker 2021-09-12 11:28:27 -04:00
doregon 0a979a90bc ahaha that didn't happen
hotfix for renderer switching
2021-09-12 10:44:21 -04:00
doregon a7cc15302c Allow version switches to change without restart 2021-09-12 10:26:42 -04:00
doregon bc2c679cd0 Ok Duy. 2021-09-11 22:09:32 -04:00
doregon 38fbfe2b34 Make game directory option a picker
- Create and delete instances from inside the app
- Fix a wrong debug line
- Fix PojavLauncher Discord link (rip vanity url)
2021-09-11 20:34:08 -04:00
doregon b38fe4df4e Better checks 2021-09-05 20:43:19 -04:00
doregon 1fe2e380af :waitwhat: Fix renderer issue 2021-09-05 18:40:14 -04:00
doregon 0c1122c0ea Debug logging switch, currently not used 2021-09-05 15:01:35 -04: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
doregon 63a6b62988 Bug fix for smaller displays 2021-09-04 13:14:00 -04:00
Adam Tunnic bd2d2e1285 Version trimming
- Switches to show releases, snapshots, old betas, and old alphas
- Refined the preferences screen, table view look
- Tapping on a text field now scrolls up
2021-09-03 05:56:40 -04:00