Makefile: add Mac Catalyst (PLATFORM=6)

Build for Mac Catalyst is mainly for debugging purpose on Apple Silicon
Macs.
This commit is contained in:
Duy Tran Khanh authored and khanhduytran0 committed 2023-05-15 07:26:53 +07:00
1 parent 6b3d66a33f
commit ea767f7962
2 files changed
+6 -5

No files matched your search

+3
View File
@@ -80,6 +80,9 @@ $(warning Set PLATFORM to 2, which is equal to iOS.)
else ifeq ($(PLATFORM),3)
PLATFORM_NAME := tvos
$(warning Set PLATFORM to 3, which is equal to tvOS.)
else ifeq ($(PLATFORM),6)
PLATFORM_NAME := maccatalyst
$(warning Set PLATFORM to 6, which is equal to Mac Catalyst.)
else ifeq ($(PLATFORM),7)
PLATFORM_NAME := iossimulator
$(warning Set PLATFORM to 7, which is equal to iOS Simulator.)
+3 -5
View File
@@ -300,11 +300,9 @@ void init_setupHomeDirectory() {
NSString *homeDir;
NSError *homeError;
if ([@(getenv("HOME")) isEqualToString:@"/var/mobile"]) {
homeDir = @"/var/mobile/Documents/PojavLauncher";
} else {
homeDir = [NSString stringWithFormat:@"%s/Documents", getenv("HOME")];
}
BOOL isNotSandboxed = [@(getenv("HOME")).lastPathComponent isEqualToString:NSUserName()];
homeDir = [NSString stringWithFormat:@"%s/Documents%@", getenv("HOME"),
isNotSandboxed ? @"/PojavLauncher":@""];
if (![fm fileExistsAtPath:homeDir] ) {
[fm createDirectoryAtPath:homeDir withIntermediateDirectories:NO attributes:nil error:&homeError];