PojavLauncher_iOS
PojavLauncher_iOS copied to clipboard
[F-Req] Please add the ability to run non Minecraft jar files
Is this request related to a bug?
I would like to be able to run my other java programs on PojavLauncher and I already sort of can with the install .jar feature however there are no actual controls when doing that.
Describe the request.
Either add actual controls in the install jar section or add the ability to run non-Minecraft Jar files in the main section please.
Anything else?
No response
Even just the ability to customize the PRI and SEC buttons you already have in the install Jar area would be enough to make my situation work
Even just the ability to customize the PRI and SEC buttons you already have in the install Jar area would be enough to make my situation work
We'd like to know what are you trying to achieve
Right now I am just trying to run my own java game on my phone. I can get it running fine but the only controls I have been able to make for it do not work well without having any real keyboard/ mouse button access.
We'd like to know what are you trying to achieve
Not sure if i have to quote you for you to get a notif or not so i'm doing this just in case.
I've gotten it to the point where my Game runs in the main launcher and I can get the console output from it but it doesn't display anything. Im assuming this is because my game doesn't have openGL support. So why does the game display fine in the install.jar area?
Here are working vs non working logs in case they help. The 1.20.1.jar is my game renamed so it would actually be ran by the launcher.
Working [Pre-Init] PojavLauncher INIT! [Pre-Init] Version: 2.2-development [Pre-Init] Commit: d9877bc (main) [Pre-Init] Device: iPhone 14 Pro Max [Pre-Init] iOS 16.5.1 (Unjailbroken) [Pre-init] Entitlements availability:
- com.apple.developer.kernel.extended-virtual-addressing: NO
- com.apple.developer.kernel.increased-memory-limit: NO
- com.apple.private.security.no-sandbox: NO
- dynamic-codesigning: NO [Debugging] Debug log enabled: YES [Pre-init] Restored game directory preference (new) [JitStreamer] Server is 69.69.0.1, attempting to connect... [JitStreamer] Server not found or VPN not connected. Discovering servers... Connecting to service: <NSNetService 0x282931900> local. _altserver._tcp. MacBook 56805 [AltKit] Successfully enabled JIT compilation! ModInstaller: launching /private/var/mobile/Containers/Data/Application/B22CB940-FC9F-457D-839F-0C437785500A/tmp/net.kdt.pojavlauncher.F6RLN7874P-Inbox/1.20.1.jar [JavaLauncher] Beginning JVM launch [JavaLauncher] Restored preference: JAVA_HOME is set to /var/containers/Bundle/Application/7D2BFD2A-C9B3-4CB9-9F7C-088644442D53/App.app/java_runtimes/java-17-openjdk [JavaLauncher] Restored preference: RENDERER is set to auto [JavaLauncher] Max RAM allocation is set to 1923 MB [Init] Found JLI lib [Init] Calling JLI_Launch WARNING: Unknown module: cpw.mods.bootstraplauncher specified to --add-exports Skipped patch_FlatLAF_setLinux CacioComponentPeer::setZOrder: NOT YET IMPLEMENTED
Non working [Pre-Init] PojavLauncher INIT! [Pre-Init] Version: 2.2-development [Pre-Init] Commit: d9877bc (main) [Pre-Init] Device: iPhone 14 Pro Max [Pre-Init] iOS 16.5.1 (Unjailbroken) [Pre-init] Entitlements availability:
- com.apple.developer.kernel.extended-virtual-addressing: NO
- com.apple.developer.kernel.increased-memory-limit: NO
- com.apple.private.security.no-sandbox: NO
- dynamic-codesigning: NO [Debugging] Debug log enabled: YES [Pre-init] Restored game directory preference (new) [JitStreamer] Server is 69.69.0.1, attempting to connect... [MCDL] Downloading 1.20.1 [MCDL] Begin: download libraries [MCDL] Skipped library 1.20.1.jar [MCDL] Finished: download libraries [MCDL] Begin: download assets [MCDL] Finished: download assets [JitStreamer] Server not found or VPN not connected. Discovering servers... Connecting to service: <NSNetService 0x280c6c260> local. _altserver._tcp. MacBook 56805 [AltKit] Successfully enabled JIT compilation! [JavaLauncher] Beginning JVM launch [JavaLauncher] Restored preference: JAVA_HOME is set to /var/containers/Bundle/Application/7D2BFD2A-C9B3-4CB9-9F7C-088644442D53/App.app/java_runtimes/java-17-openjdk [JavaLauncher] Restored preference: RENDERER is set to auto [JavaLauncher] Max RAM allocation is set to 1923 MB [Init] Found JLI lib [Init] Calling JLI_Launch WARNING: Unknown module: cpw.mods.bootstraplauncher specified to --add-exports Launching Minecraft 1.20.1 Args init finished. Now starting game CacioComponentPeer::setZOrder: NOT YET IMPLEMENTED
What game are you trying to run?
What game are you trying to run?
Its a game I made.
I also just tested what i'm doing right now with someone else's project made with lwjgl and it displayed fine so i'm pretty sure the no opengl thing is the problem. I still have no idea why my game displays fine when i open it from the "install jar" section but not when doing it by clicking "Play" section.
What game are you trying to run?
Its a game I made.
I also just tested what i'm doing right now with someone else's project made with lwjgl and it displayed fine so i'm pretty sure the no opengl thing is the problem. I still have no idea why my game displays fine when i open it from the "install jar" section but not when doing it by clicking "Play" section.
That's why. Because the play section only renders the OpenGL surface, and the mod installer only renders the AWT surface
That's why. Because the play section only renders the OpenGL surface, and the mod installer only renders the AWT surface
I take it theres no way for me to change that?
Of course you can by modifying source code. If you just want more buttons for AWT, you can take a look in -[JavaGuiViewController loadCustomControls] The problem is we wrote Pojav iOS using Objective-C instead of Swift.
Well you see i considered trying to add buttons but then I realized I have no idea how to do that and i also have no idea how to then build the app into an ipa. My knowledge is very limited to only a few parts of java lol. I tried building it in xcode and it just kept yelling at me to install java 8 jdk. I tried installing it but it didn't seem to do anything so I probably did that wrong.
I can not figure out how to get past the Java 8 requirement. Ive tried installing like 5 different versions of java 8 jdk and none of them make a difference. I found one called azul openjdk which claimed it worked for M1 macs and that didn't matter either. java -version reports i'm using build 1.8.0_372 and javac -version also reports 1.8.0_372. I even tried commenting out the version checker in the make file and that got me further but it just fails anyway.
Check /usr/libexec/java_home -v 1.8
@MacBook ~ % /usr/libexec/java_home -v 1.8 /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
The path doesn’t look like a valid one, should be /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home.
I have export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home in my bash_profile and i did source ~/.bash_profile. Is there something else i should do?
This Makefile expects output from java_home command, not from environment variable. Make sure you placed Zulu jdk correctly into /Library/Java/JavaVirtualMachines/ then java_home will recognize it.
Not sure what im looking for but its in there and its contents are similar to my java19 jdk
So if i remove $(BOOTJDK) from in front of all the times it uses java it builds fine. How important are these parts exactly? also I have no idea how to try to run it. I read that I need to make a scheme for it? How would I go about doing that to see if it works like this?
Doing this gives me an ipa that when installed on my phone immediately crashes with no output in the log but will sometimes have [Pre-Init] PojavLauncher INIT! In the latestlog.old file.
Not sure what I did but I have a working ipa now. Where should I look to attempt to make it use the awt in the play section?
I tried adding a button here and it's there but it doesnt work. I see that there is a way to convert the GLFW_KEY to VK but I cant seem to figure out how to use it right.
[dict[@"mControlDataList"] addObject:createButton(@"D", (int[]){GLFW_KEY_D,0,0,0}, @"${margin} * 2 + ${width}", @"${bottom} - ${margin}", BTN_RECT )];
I’ll look into this and (maybe) I’ll figure out how to get the custom controls from the main Minecraft launcher to run in the import mod option.
I’m not actually sure on this, but would that make PojavLauncher the only JVM launcher for iOS? I’m not sure, since I don’t rly do much with Java other than, well, Minecraft lol
Update: I haven’t done anything with this at all tbh; however I now think I have a potential use case for this feature; if I remember to I’ll begin working on it in a couple weeks (I’m busy until then; plus the project I have in mind isn’t even currently theoretically usable on ARM64 ;)
If someone can’t wait that long/wants to learn obj-c this would probably be a good starting point; I’m assuming it would be as simple as porting the custom layout feature from the main client to this, as well as add extra java runtime options (I would need Java 11ish for example)