Commit Graph
62 Commits
Author SHA1 Message Date
Adam Tunnic 959a4e2290 Merge branch 'backend-virgl' into main 2022-02-14 08:52:10 -05:00
Duy Tran Khanh bd6ba67745 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
2022-02-07 05:20:05 +07:00
Adam Tunnic 372831bc9e Add Arc capes 2022-02-05 11:28:51 -05:00
Duy Tran Khanh e5018cc094 Bug fix: Fabric 1.17+ crash at startup(fixes #304)
Microsoft account now set accountType to msa.
Minor change in custom control view controller.
2022-02-05 16:47:04 +07:00
3105c754a4 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]>
2022-01-28 17:42:22 -05:00
khanhduytran0 fbde4948d5 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.
2022-01-17 08:18:06 +07:00
Adam Tunnic 3084243fec Fix undeclared identifier 2022-01-12 11:15:55 -05:00
Adam Tunnic 08b94c340d Merge remote-tracking branch 'refs/remotes/origin/main' 2022-01-12 09:56:53 -05:00
Adam Tunnic 77a817d937 Consolidate some code 2022-01-12 09:56:40 -05:00
Duy Tran Khanh 93b146d65a Use the old jvm arguments parser back for now
There’s no handling for backslash yet, or ignoring spaces inside delimiters.
2022-01-04 10:06:34 +07:00
khanhduytran0 b6f552df85 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).
2022-01-04 09:55:47 +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 ec0ec560a3 Mitigation for the Apache Log4j RCE in 1.8.x-1.18 2021-12-10 13:13:30 -05:00
Adam Tunnic d11e113ec4 Reset preferences option, switch to POJAV_HOME 2021-12-08 21:43:02 -05:00
khanhduytran0 72e0c69ad1 WIP virglrenderer
Current state: bind() returns errno -1 (Operation not permitted)
2021-11-30 04:29:09 +07: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 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 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 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
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 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
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
Duy Tran Khanh 30f1b95693 Prepare for jailed version (no ETA)
I still have no idea how to start implementing JIT, do I just mprotect to swap between RW and RX?
2021-09-10 07:28:02 +07:00
Adam Tunnic 5b2392d053 Remove RENDERER failsafe
No longer required, now that the UIPickerView is in place.
2021-09-03 00:29:32 -04:00
doregon 11974a497f Changes
- exit app button in pojavlauncher prefs
- jailbreak warning on non-pro strapped jailbreaks
- better deciphering of what jailbreak is in use
2021-09-01 23:54:19 -04:00
Duy Tran Khanh 49125524d3 Preliminary support for v2 (code 3) control
TODO:
- Control editor
- Implement Drawer

FIXME:
-[MGLLayer init] crashes. Maybe replace with CAMetalLayer?
2021-08-30 07:13:39 +07:00
Duy Tran Khanh f00b09af2e Changes
- [Custom controls] Implemented `isSwipeable` property.
- VGPU has error at `sampler2DShadow`, so ignore it for now.
- WIP changes on jailed version.
2021-08-27 20:55:38 +07:00
doregon 15a6cf0acf MultiMC-like instances:
- now stores the minecraft directory in .pojavlauncher/instances/default
- configurable straight from the preferences
- migrates your existing minecraft folder to instances/default
- moves L/AS/m from Documents/ to .pojavlauncher/
- changes home directory to .pojavlauncher/
- automatically switches the L/AS/m symlink based on the current instance
- accounts stay the same between instances
2021-08-24 02:56:00 -04:00
Duy Tran Khanh 5ce5dbcc00 Changes
- Avoid printing "Session ID". Several Minecraft versions do that.
- Fixes Minecraft 1.13 snapshot due to the usage of LWJGL functions from an older version.
- Minecraft's built in Fullscreen Resolution scaler is available now, but not working properly.
- Regal internal changes (still fail at )
2021-08-23 11:19:54 +07:00
doregon b3fe21efb4 Add RAM slider, part 2
Fully functional.
2021-08-21 22:31:56 -04:00
doregon 3c1ef94cc6 Now log device model, iOS version, and jailbreak used 2021-08-21 19:52:54 -04:00
Duy Tran Khanh de6479f1e6 Changes
- test regal stuff (lib not added)
- auto init symlinks for jailed JRE
2021-08-18 05:52:40 +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
doregon 798e5790ad Merge remote-tracking branch 'origin/main' 2021-08-10 20:02:45 -04:00
doregon 9bcf627eaf Fix custom_env.txt 2021-08-10 20:02:33 -04:00
Duy Tran Khanh a739cf7202 Resolution downscaler moment 2021-08-10 19:42:10 +07:00
Duy Tran Khanh 2858c06755 oof LIBGL_NOINTOVLHACK=1 2021-08-08 17:49:36 +07:00
doregon dc674c10c5 Replace GL4ES_LIBNAME with RENDERER 2021-08-07 01:28:55 -04:00
doregon e669b6b766 Added failsafe for GL4ES_LIBNAME 2021-08-07 00:11:07 -04:00
doregon 1a1da77f39 Added check plist function 2021-08-06 23:28:44 -04:00
doregon 85524e251c Fix that last commit 2021-08-06 17:05:08 -04:00
doregon 505719deec JAVA_HOME now repairs itself when incorrect path is chosen 2021-08-06 15:41:53 -04:00
doregon 2606262ebe Fix issue with vars == nil 2021-08-06 14:58:40 -04:00
doregon 961b81d039 A bit of latestlog stuff 2021-08-05 21:10:07 -04:00
Adam Tunnic 0696174d4c Fix compile warnings 2021-08-05 03:57:31 -04:00
Adam Tunnic 87c2d5f19b Fix java_home issue 2021-08-05 03:42:22 -04:00
doregon 69a8e82efd Committing my WIP code
This builds fine, but does not yet run. I am committing so I can switch from CLion to my phone. Anyway:

- gl4es_libname is now in the plist
- working on java_home, that's the reason this code breaks
   - javaHome_pre returns null rather than the intended string
2021-08-05 02:21:46 -04:00