Commit Graph
1015 Commits
Author SHA1 Message Date
64f7e82c1e Merge main into backend-virgl (#316)
* Fix Duy's deploy and install stuffs

* Fix Makefile error and move external_include to external/zink

* Bug fix: version ordering when types are disabled

This commit fixes #293

* Update README.md

* Add option to disable symlink to /var/mobile/Documents/.pojavlauncher (off by default)

* Reset preferences option, switch to POJAV_HOME

* Update bug_report.yml

Update pojavlauncher directory location

* Mitigation for the Apache Log4j RCE in 1.8.x-1.18

* Experimental things

* Multitouch handling, allows one of these actions below to work with
moving camera at the same time.
- Switching hotbar slot; might not work properly
- Destroying block (left mouse button) with another finger
long-pressed (without pressing the PRI button)
- Right mouse trigger with another finger tapped onto the screen
(without pressing the SEC button); not working properly yet
* Sub-pixel cursor support; not yet checked

* Completely fix Log4J RCE (1.7-1.16.5) (not yet tested)

TODO: checker with SHA1

* Log4J RCE patch config: disable XML format output

This applies for Minecraft 1.12+
Disable XML formatting for now until we have a log viewer.

* Create newsfeed.html

* Update newsfeed.html

* Delete newsfeed.html

* WIP Demo mode stuff

Sign in with a Microsoft account that doesn't own the game, demo_user will be made. This is very much WIP as my iPhone 7 doesn't feel like launching PojavLauncher.

* 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.

* A few UI changes

Disable the Play button until version list finished loading
Disable ability to go back while a version is downloading
Display loading alert while logging in

* Possible fix for broken Mojang login

* Fix a NullPointerException when launching ≤ 1.6.4

* Bug fix: NPE when setting inherited fields

Unable to insert id=null
java.lang.NoSuchFieldException: id
	at java.lang.Class.getDeclaredField(Class.java:2070)
	at net.kdt.pojavlaunch.Tools.insertSafety(Tools.java:544)
	at net.kdt.pojavlaunch.Tools.getVersionInfo(Tools.java:466)
	at net.kdt.pojavlaunch.PLaunchApp.launchMinecraft(PLaunchApp.java:61)
	at
net.kdt.pojavlaunch.uikit.UIKit.callback_SurfaceViewController_launchMi
necraft(UIKit.java:104)
	at net.kdt.pojavlaunch.uikit.UIKit.launchUI(Native Method)
	at net.kdt.pojavlaunch.PLaunchApp.main(PLaunchApp.java:40)

* Keyboard + Mouse input handling; some cleanups
* Keyboard input: KeyboardInput.m
- Requires iOS 13.4. Used pressesBegan and pressesEnded.
- Not all keys are handled, these will be handled later.

* Mouse input
- Requires iOS 13.0 for hovering. Used UIHoverGestureRecognizer.
- Requires iOS 14.0 for L/R mouse buttons and scroll handling. Used GCMouse for now. We will use iOS 13.4(?)'s API later.
- Pointer lock is not yet handled.

These above apply to iPadOS aswell, not sure about tvOS. iPhone users need to disable "Perform Touch Gestures" in the AssistiveTouch Accessibility settings in order to get the pointer hovering to work.

* Cleanups
- Use asprintf instead of sprintf when possible
- CallbackBridge functions: removed unnecessary JNI fields.
- Condition cleanup (managing virtual mouse position).

* Use the old jvm arguments parser back for now

There’s no handling for backslash yet, or ignoring spaces inside delimiters.

* Remove duplicated code

* Support for input cursor movement from keyboard
New class: TrackedTextField. This class keeps track of the pointer in the text field. The hidden text field now has 40 placeholder spaces and the pointer is placed at the middle. When typing, placeholder spaces won't get removed as before. Autocorrect seem to be broken a bit for now.

Additional changes:
- Added missing GLFW functions (array version of other functions)
- Hotbar handling: doubled barWidth and barHeight

Bug fix:
- Touching onto the hotbar breaks the handling of on-screen tap/long-press gestures

* Bug fix: inputStringLength is not set back to 40

This caused a bug that clears the text when pressing backspace after
the keyboard is displayed again.

* Consolidate some code

* Fix undeclared identifier

* Consolidate some more code, fix my dumb mistake

* Added VGPU renderer

Commit:
https://github.com/PojavLauncherTeam/VGPU/commit/9f4ded5934b24c62368d70
1647855c9c9077d903

* Update LauncherPreferencesViewController.m

This line was mistakenly removed

* Various bug fixes
- Input cursor movement seems too fast, attempt to reduce it by setting larger font size in the hidden text field.
- latestlog.txt doesn't log in 1.12+ since Log4j patch. Fixed by adding some config lines.
- Makefile: building is broken when run make from a path with space(s). Fixed by handling spaces with backslashes.
- text2speech is not overridden properly. Fixed by excluding it from download list and adding launcher.jar itself to the classpath.
- XML log output in < 1.12 since Log4j patch. Fixed by using our own configuration file.

Some more changes:
- Commented out a debug line in LWJGLX
- Fix a typo.
- JavaLauncher: use (ObjC)BOOL instead of (std)bool.

* Better click handling

* Finish make ipa

Still requires proper codesigning afterwards, and until I figure out the depends folder you'll need to download a copy of the Azul JDK artifact on our android-openjdk-build-multiarch repository and extract it to depends/jre. Tested and working on my MacBook Pro, although I need to find out why libjsig.dylib is defined twice (this issue doesn't hinder the build though, install_name_tool just doesn't apply changes).

* Added readable MSA errors

* Merge unjailbroken changes with main (#313)

* fix that lol

* IPABuilder moment

* typo moment

* Hooking changes
Now hook only dladdr and realpath, JRE works now. However, need to obtain libffi.

* Sole more changes

Add RPATH to libraries
Hook dlopen since loading libawt_headless somehow point to Frameworks
directory.

* Update development.yml

* Update development.yml

Co-authored-by: Duy Tran Khanh <[email protected]>
Co-authored-by: Duy Tran Khanh <[email protected]>

* Fix issue with text alignment

* Makefile: multi-jobs building native code

* Bump to Xcode 13.2.1

* Bump to Xcode 13.2.1 pt 2

* use gnproc and nproc (for procursus on macos)

on the road development is bumpy

* oops

* [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

* I’m too tired of getting dpkg exits, so it’s here

* Fix broken share log

* Bug fix: Fabric 1.17+ crash at startup(fixes #304)

Microsoft account now set accountType to msa.
Minor change in custom control view controller.

* Add Arc capes

* Minor bug fix for Arc capes switch

* Change how the login progress is displayed

Login progress now displays on the title bar instead of a dialog. This
will prevent infinite loading in case a connection error occurs.
Closes #315

* Bug fix: Arc DNS injector breaks on Java 16+

This is caused by a missing function in our class loader.

Error:
System class loader does not define the
appendToClassPathForInstrumentation method
Unable to add
/Applications/PojavLauncher.app/libs/arc_dns_injector.jar to system
class path - the system class loader does not define the
appendToClassPathForInstrumentation method or the method failed
FATAL ERROR in native method: processing of -javaagent failed,
appending to system class path failed

* Why did I add set -e

* Add changelog for 2.1 release

* FAQ changes

* Workflow changes and typo fix

* Workflow changes part 2

* Fixes swipeable button state handling

* Update informational.yml

* Add A7 warning

* Remove codesign from Alderis + thin lib

* Only load Alderis.framework when needed

* CC editor: view controller now follow bounds(#326)

* Update README.md (#324)

* Update LauncherPreferencesViewController.m

Co-authored-by: Duy Tran Khanh <[email protected]>
Co-authored-by: Duy Tran Khanh <[email protected]>
Co-authored-by: Silly Sock <[email protected]>
2022-02-14 09:13:58 -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 Khanh 96ea5fd687 Cleanup unused files
~~also fix a bit of grammar :trollface:~~
2021-11-27 15:11:09 +07:00
Duy Tran Khanh d533bfbb10 Local account: update the error message a bit 2021-11-27 13:55:43 +07:00
Adam Tunnic eef1310629 Bump to 2.1 2021-11-26 12:48:33 -05:00
Adam Tunnic a2145e33de icons 2021-11-26 00:34:05 -05:00
Adam Tunnic 8a94037b3e Update postinst v2.0 2021-11-26 00:19:39 -05:00
Adam Tunnic 131cb61be6 smh my head x2 2021-11-26 00:13:53 -05:00
Adam Tunnic f1707045b0 smh my head 2021-11-26 00:10:16 -05:00
Adam Tunnic cfd2dde8fa Fix postinst properly 2021-11-26 00:07:22 -05:00
Adam Tunnic 788cb5ae57 fix postinst 2021-11-25 23:56:34 -05:00
Adam Tunnic 6798ed2ee6 FAQ changes 2021-11-25 23:47:31 -05:00
Adam Tunnic 649976de7f fix version 2021-11-25 23:45:21 -05:00
Adam Tunnic 325c43bbcc typing to fast, fix release deb names 2021-11-25 23:40:41 -05:00
Adam Tunnic 14b634b6c9 Fix release building again 2021-11-25 23:36:11 -05:00
Adam Tunnic d58a6d6006 Fix release building 2021-11-25 23:34:06 -05:00
Adam Tunnic 59b152c427 Makefile for 2.0 (#291)
* my brain hurts. let's keep going:

- iOS 15 packaging support
- rewrote the makefile to not copy and paste over and over
- dSYM generation in the makefile itself
- started working on ipabuilder in the makefile

* delete unneeded files

* delete unneeded files 2

* ahaha

* PojavCore.dSYM is a directory

* why am i such an idiot smh

* Update release.yml (#279)

* Add /usr/share changes, pt 1

* Fix old dir removal and migration

* Add check for already migrated + remove unneeded stuffs

* Remove free() from removed vars

* Fix workflow

* Fix Makefile

* Fix Makefile... again

* Add unjailbroken branch's IPABuilder

* Push what I have

* Push more changes

* control file stuff
2021-11-25 23:29:20 -05: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 Khanh bf58df6927 <:fr:855474693208014879> 2021-10-18 06:34:19 +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 b353a69421 Update README.md
OpenJDK 8 port was done for a long time
2021-10-05 05:40:27 +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 b7e2334639 Bug fix: scroll the hotbar
since scrolling is too fast, disable it moment
2021-10-02 14:12:26 +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 4f59e0ffff PojavCore is now inside the main executable
This took so long since there was a failed attempt in unloading and
reloading JVM to support Forge 1.17.x. Next attempt would be rewrite
everything to Objective-C and move the JVM entry point to the start of
the game.
2021-10-01 11:14:05 +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
Adam Tunnic aee11c3a22 Update release.yml 2021-09-24 22:52:23 -04:00
Adam Tunnic ca4dd3e3e1 Create release.yml 2021-09-24 22:38:50 -04:00
Adam Tunnic 54fdad03a3 Rename ios.yml to development.yml 2021-09-24 22:37:50 -04:00
Adam Tunnic 2910a6340b Rename CI 2021-09-24 22:37:35 -04:00
Adam Tunnic 9d6a7c0e99 wrong branch but ok 2021-09-24 09:17:26 -04:00
Adam Tunnic c06ebc22f2 Generate dSYM for PojavLauncher main executable 2021-09-24 09:13:36 -04:00
Adam Tunnic 8f0a7a5cab Update ios.yml 2021-09-21 11:59:16 -04:00
Adam Tunnic 4fdc115ed8 Update ios.yml 2021-09-21 11:56:22 -04:00
Adam Tunnic 1153368ed5 Update CI to macOS Big Sur, Xcode 12.5.1 2021-09-21 11:54:36 -04:00
Adam Tunnic d6f3a0e636 1.3 is now 2.0 2021-09-21 11:47:59 -04:00
Duy Tran Khanh a26ce4b499 JRE failsafe: use java 17 when 16 is not installed 2021-09-21 15:27:00 +07:00
Duy Tran Khanh 267f96162b Update README.md 2021-09-18 20:29:15 +07:00
Duy Tran Khanh 699d3a3873 Update README.md 2021-09-18 20:28:27 +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
doregon 4658a55e89 Reorganize java home failsafe code 2021-09-18 02:23:13 -04:00
Adam Tunnic 03074d42f2 PojavCore, not libpojavexec 2021-09-17 20:24:21 -04:00
Duy Tran Khanh 5b68b0648b libpojavexec.dylib -> PojavCore 2021-09-17 07:06:49 +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 7cd74e2004 Bug fix: version index is not set
This lead to wrong selected version in some cases.
2021-09-15 09:30:48 +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