* 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]>
151 lines
8.8 KiB
Objective-C
151 lines
8.8 KiB
Objective-C
#import "UpdateHistoryViewController.h"
|
||
|
||
#include "utils.h"
|
||
|
||
#if CONFIG_RELEASE == 1
|
||
# define CONFIG_TYPE "release"
|
||
#else
|
||
# define CONFIG_TYPE "debug"
|
||
#endif
|
||
|
||
@interface UpdateHistoryViewController () {
|
||
}
|
||
-(UILabel *)uhContent:(bool)isHeading size:(int)size text:(NSString *)text width:(int)width;
|
||
@end
|
||
|
||
@implementation UpdateHistoryViewController
|
||
CGFloat uhcurrY = 4.0;
|
||
- (void)viewDidLoad
|
||
{
|
||
[super viewDidLoad];
|
||
viewController = self;
|
||
|
||
[self setTitle:@"Update History"];
|
||
|
||
CGRect screenBounds = [[UIScreen mainScreen] bounds];
|
||
CGFloat screenScale = [[UIScreen mainScreen] scale];
|
||
|
||
int width = (int) roundf(screenBounds.size.width);
|
||
int height = (int) roundf(screenBounds.size.height) - self.navigationController.navigationBar.frame.size.height;
|
||
int rawHeight = (int) roundf(screenBounds.size.height);
|
||
|
||
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, width, rawHeight)];
|
||
[self.view addSubview:scrollView];
|
||
scrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||
|
||
// Update color mode once
|
||
if(@available(iOS 13.0, *)) {
|
||
[self traitCollectionDidChange:nil];
|
||
} else {
|
||
self.view.backgroundColor = [UIColor whiteColor];
|
||
}
|
||
|
||
uhcurrY = 4.0;
|
||
|
||
[scrollView addSubview:[self uhContent:true size:25 text:@"Current version" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:20 text:[NSString stringWithFormat:@"2.1 (%s)", CONFIG_TYPE] width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Changes" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- Now shows when currently logging in\n"
|
||
"- Play button is greyed out when launching\n"
|
||
"- Back button is hidden when launching\n"
|
||
"- New toggle to allow restarting JVM before launching\n"
|
||
"- Added WIP Demo mode support!\n"
|
||
"- Patch log4shell exploit in client\n"
|
||
"- Keyboard and mouse support deepened\n"
|
||
"- New \"vgpu\" renderer, exports OpenGL 3.0\n"
|
||
"- Custom controls UI completed\n"
|
||
"- Arc custom capes integration!" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Fixes" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- Slight changes to error messages\n"
|
||
"- Fix Makefile errors in `deploy` and `ipa`\n"
|
||
"- Fix some instances of Mojang login failing\n"
|
||
"- Fix NullPointerException when launching ≤1.6.4\n"
|
||
"- Fix NullPointerException when setting inherited fields\n"
|
||
"- Fix \"Share your logs\" not working\n"
|
||
"- Fix Fabric 1.17+ not launching\n"
|
||
"- Fix postinst issue on Procursus" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Issues" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- Mouse support requires iOS 14.0 or later, keyboards require iOS 13.4 or later\n"
|
||
"- Old custom control .json files no longer work, remove to fix" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:25 text:@"Previous versions" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:20 text:@"2.0 - Raw Iron" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Changes" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- The Login view has been simplified to three easy buttons\n"
|
||
"- The Offline Account has been replaced with Local Account. Installing Minecraft now requires a Mojang or Microsoft account logged in.\n"
|
||
"- New FAQ page to show quick answers to questions\n"
|
||
"- New About view to show quick details, links, and update history\n"
|
||
"- Ability to send logs from within the launcher\n"
|
||
"- The Select Account screen is now a pop-up window\n"
|
||
"- New picker view to switch versions without typing them manually\n"
|
||
"- Support to show your locally installed clients\n"
|
||
"- New settings page to manage preferences\n"
|
||
"- OpenJDK 8 support, to allow older versions of modded Minecraft\n"
|
||
"- New mod installer, built into the launcher\n"
|
||
"- Unfinished in-launcher custom controls\n"
|
||
"- Move to /usr/share, for better rootFS compatibility\n"
|
||
"- New packaging format\n"
|
||
" - release, for iOS 14 and lower (full root access jailbreaks)\n"
|
||
" - release-rootless, for iOS 15 (Procursus rootless jailbreak)" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Fixes" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- WIP fix for typing on 1.12.2 and older\n"
|
||
"- The hotbar now works across GUI scales\n"
|
||
"- (With JDK 8) Forge 1.8.9 - 1.15.2 now work\n"
|
||
"- (With JDK 8) Vanilla 1.5.2 and under now work\n"
|
||
"- Buttons now scale correctly according to screen size" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Issues" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- Crash if login to Microsoft fails\n"
|
||
"- Old custom control .json files no longer work, remove to fix\n"
|
||
"- Custom controls settings page is not complete, there may be some issues!\n"
|
||
"- An unknown issue might cause Taurine, 14.3, and A12+ to crash on launch." width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:20 text:@"1.2" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Changes" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- Use new method for Microsoft login\n"
|
||
"- Added gl4es 1.1.5 as an option\n"
|
||
"- WIP custom controls (can be changed by placing at /var/mobile/Documents/.pojavlauncher/controlmap/default.json). Note that some functions may not work properly.\n"
|
||
"- WIP external mouse support\n"
|
||
"- Custom environment variables, in /var/mobile/Documents/.pojavlauncher/custom_env.txt\n"
|
||
"- Reduction of file size with removal of unused binaries\n"
|
||
"- Moved latestlog.txt and overrideargs.txt to /var/mobile/Documents/.pojavlauncher" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Fixes" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- Fix file permission issues during install of package\n"
|
||
"- Hide home bar like Bedrock Edition\n"
|
||
"- Properly hide iPad status bar" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:17 text:@"Issues" width:width]];
|
||
[scrollView addSubview:[self uhContent:false size:0 text:@"- Crash if login to Microsoft fails\n"
|
||
"- Several Forge versions won’t work due to removed deprecated classes (see #67 and #68)\n"
|
||
"- Control buttons notch offset seems doubled\n"
|
||
"- Text input will not work on 1.12.2 and below" width:width]];
|
||
[scrollView addSubview:[self uhContent:true size:20 text:@"See the GitHub for even earlier releases" width:width]];
|
||
|
||
|
||
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, uhcurrY);
|
||
|
||
}
|
||
|
||
-(UILabel *)uhContent:(bool)isHeading size:(int)size text:(NSString *)text width:(int)width {
|
||
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(4.0, uhcurrY, width - 40, 30.0)];
|
||
label.text = text;
|
||
label.lineBreakMode = NSLineBreakByWordWrapping;
|
||
label.numberOfLines = 0;
|
||
if(isHeading) {
|
||
[label setFont:[UIFont boldSystemFontOfSize:size]];
|
||
} else {
|
||
[label sizeToFit];
|
||
}
|
||
uhcurrY+=label.frame.size.height;
|
||
return label;
|
||
}
|
||
|
||
|
||
-(void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||
if(@available(iOS 13.0, *)) {
|
||
if (UITraitCollection.currentTraitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||
self.view.backgroundColor = [UIColor blackColor];
|
||
} else {
|
||
self.view.backgroundColor = [UIColor whiteColor];
|
||
}
|
||
}
|
||
}
|
||
|
||
@end
|