diff --git a/Natives/CMakeLists.txt b/Natives/CMakeLists.txt index 5ff6144b..4fe2ba19 100644 --- a/Natives/CMakeLists.txt +++ b/Natives/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.6) project(PojavLauncher) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target arm64-apple-ios -fcommon -fobjc-arc -ObjC -F'${CMAKE_OSX_SYSROOT}/System/Cryptexes/OS/System/Library/Frameworks'") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target arm64-apple-ios -fcommon -fobjc-arc -fobjc-constant-literals -ObjC -F'${CMAKE_OSX_SYSROOT}/System/Cryptexes/OS/System/Library/Frameworks'") set(CMAKE_C_FLAGS_DEBUG "-funwind-tables -g") if("${CMAKE_HOST_SYSTEM_NAME}" MATCHES "Linux|^GNU$|Android") diff --git a/Natives/external/Apple/deviceids.m b/Natives/external/Apple/deviceids.m new file mode 100644 index 00000000..8c49f57f --- /dev/null +++ b/Natives/external/Apple/deviceids.m @@ -0,0 +1,9 @@ +// +// DeviceIdentifiers.m +// Labradorite +// +// Created by Eilionoir Tunnicliff on 9/26/22. +// + +#import "deviceids.h" + diff --git a/Natives/main.m b/Natives/main.m index 4013a869..8b74dfcc 100644 --- a/Natives/main.m +++ b/Natives/main.m @@ -148,10 +148,11 @@ void init_logDeviceAndVer(char *argument) { void init_migrateDirIfNecessary() { NSString *oldDir = @"/usr/share/pojavlauncher"; if ([fm fileExistsAtPath:oldDir]) { + NSString *newDir = @""; if ([@(getenv("HOME")) isEqualToString:@"/var/mobile"]) { - NSString *newDir = [NSString stringWithFormat:@"%s/Documents/PojavLauncher", getenv("HOME")]; + newDir = [NSString stringWithFormat:@"%s/Documents/PojavLauncher", getenv("HOME")]; } else { - NSString *newDir = [NSString stringWithFormat:@"%s/Documents", getenv("HOME")]; + newDir = [NSString stringWithFormat:@"%s/Documents", getenv("HOME")]; } [fm moveItemAtPath:oldDir toPath:newDir error:nil]; [fm removeItemAtPath:oldDir error:nil];