Skip to content

Commit

Permalink
WineskinApp: Imported at 3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcenx committed Jul 29, 2024
1 parent c5bc240 commit 19c2cb3
Show file tree
Hide file tree
Showing 30 changed files with 1,004 additions and 855 deletions.
296 changes: 170 additions & 126 deletions WineskinApp/Base.lproj/MainMenu.xib

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WineskinApp/CustomEXE.app/Contents/MacOS/CustomEXE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
####################################################
# Set all variables
CMACOSFOLD="$(dirname "$0")"
MACOSFOLD="$CMACOSFOLD/../../../Contents/MacOS"
MACOSFOLD="$CMACOSFOLD/../../../MacOS"
cd "$MACOSFOLD"
MACOSFOLD="$(echo "$PWD")"
CEXENAME="$(basename "${CMACOSFOLD%/Contents/MacOS}")"
Expand Down
23 changes: 22 additions & 1 deletion WineskinApp/NSComputerInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,28 @@
#define IS_SYSTEM_MAC_OS_10_14_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"10.14"] // Mojave
#define IS_SYSTEM_MAC_OS_10_15_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"10.15"] // Catalina
#define IS_SYSTEM_MAC_OS_10_15_4_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"10.15.4"] // Catalina ldtset
#define IS_SYSTEM_MAC_OS_11_0_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"11.00"] // Big Sur
#define IS_SYSTEM_MAC_OS_11_0_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"11.00"] // Big Sur
#define IS_SYSTEM_MAC_OS_12_0_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"12.0"] // Monterey
#define IS_SYSTEM_MAC_OS_13_0_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"13.0"] // Ventura
#define IS_SYSTEM_MAC_OS_14_0_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"14.0"] // Sonoma

#define IS_SYSTEM_MAC_OS_SNOW_LEOPARD_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_6_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_LION_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_7_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_MOUNTAIN_LION_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_8_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_MAVERICKS_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_9_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_YOSEMITE_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_10_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_EL_CAPITAN_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_11_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_SIERRA_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_12_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_HIGH_SIERRA_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_13_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_MOJAVE_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_14_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_CATALINA_OR_SUPERIOR IS_SYSTEM_MAC_OS_10_15_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_BIG_SUR_OR_SUPERIOR IS_SYSTEM_MAC_OS_11_0_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_MONTRREY_OR_SUPERIOR IS_SYSTEM_MAC_OS_12_0_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_VENTURA_OR_SUPERIOR IS_SYSTEM_MAC_OS_13_0_OR_SUPERIOR
#define IS_SYSTEM_MAC_OS_SONOMA_OR_SUPERIOR IS_SYSTEM_MAC_OS_14_0_OR_SUPERIOR

#define IsSetLdtSupported [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"10.15.4"] // Allow setting i386_set_ldt without entitlement
#define IsProcessTranslated [NSComputerInformation isProcessTranslated] // Check if running under Rosetta2

#import <Foundation/Foundation.h>

Expand All @@ -35,6 +54,8 @@

+(BOOL)isComputerMacDriverCompatible;

+(BOOL)isProcessTranslated;

@end

#endif
12 changes: 12 additions & 0 deletions WineskinApp/NSComputerInformation.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSComputerInformation.h"

#import "NSUtilities.h"
#import "VMMVersion.h"
#import "NSTask+Extension.h"
Expand Down Expand Up @@ -66,5 +67,16 @@ +(BOOL)isComputerMacDriverCompatible
return [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"10.6.8"];
}

+(BOOL)isProcessTranslated
{
// Starting with macOS Big Sur 11.0.1 with Apple Silicon systems
if ([self isSystemMacOsEqualOrSuperiorTo:@"11.0.1"]) {
NSString* appReturn = [NSTask runProgram:@"sysctl" atRunPath:nil withFlags:@[@"-in", @"sysctl.proc_translated"] wait:YES];
return [appReturn boolValue];
} else {
return false;
}
}

@end

1 change: 1 addition & 0 deletions WineskinApp/NSDropIconView.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSDropIconView.h"

#import "NSData+Extension.h"
#import "NSTask+Extension.h"
#import "NSImage+Extension.h"
Expand Down
3 changes: 3 additions & 0 deletions WineskinApp/NSExeSelection.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
//

#import "NSExeSelection.h"

#import "NSPortManager.h"

#import "NSPathUtilities.h"

#import "NSString+Extension.h"
#import "NSFileManager+Extension.h"

Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSFileManager+Extension.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSFileManager+Extension.h"

#import "NSAlert+Extension.h"
#import "NSTask+Extension.h"

Expand Down
3 changes: 2 additions & 1 deletion WineskinApp/NSPathUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSPathUtilities.h"

#import "NSString+Extension.h"
#import "NSFileManager+Extension.h"

Expand All @@ -15,7 +16,7 @@ @implementation NSPathUtilities
+(NSString*)wineskinAppBinaryForPortAtPath:(NSString*)path
{
// Used to run the Wineskin App which resides inside Wineskin wrappers
return [path stringByAppendingString:@"/Wineskin.app/Contents/MacOS/Wineskin"];
return [path stringByAppendingString:@"/Contents/Wineskin.app/Contents/MacOS/Wineskin"];
}
+(NSString*)wineskinLauncherBinForPortAtPath:(NSString*)path
{
Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSPortDataLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import <Foundation/Foundation.h>

#import "NSPortManager.h"
#import "NSWineskinEngine.h"

Expand Down
2 changes: 2 additions & 0 deletions WineskinApp/NSPortDataLoader.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#import "NSPortDataLoader.h"
#import "NSUtilities.h"
#import "NSPathUtilities.h"

#import "NSDropIconView.h"

#import "NSAlert+Extension.h"
#import "NSImage+Extension.h"
#import "NSString+Extension.h"
Expand Down
2 changes: 1 addition & 1 deletion WineskinApp/NSPortManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ -(NSMutableDictionary*)getFunctionFromDescription:(NSString*)description
}
-(NSArray*)getAvailableWinetricksList
{
NSString* winetricksPath = [NSString stringWithFormat:@"%@/Wineskin.app/Contents/Resources/winetricks",[[NSBundle mainBundle] bundlePath]];
NSString* winetricksPath = [NSString stringWithFormat:@"%@/Contents/Wineskin.app/Contents/Resources/winetricks",[[NSBundle mainBundle] bundlePath]];
NSString* winetricksRaw = [[NSString alloc] initWithContentsOfFile:winetricksPath encoding:NSASCIIStringEncoding error:nil];

NSMutableArray* newList = [[NSMutableArray alloc] init];
Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSProgressView.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSProgressView.h"

#import "NSThread+Extension.h"

@implementation NSProgressView
Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSSavePanel+Extension.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSSavePanel+Extension.h"

#import "NSComputerInformation.h"

@implementation NSSavePanel (PKSavePanel)
Expand Down
2 changes: 2 additions & 0 deletions WineskinApp/NSString+Extension.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
//

#import "NSString+Extension.h"

#import "NSData+Extension.h"
#import "NSTask+Extension.h"
#import "NSAlert+Extension.h"

#import "NSComputerInformation.h"

@implementation NSString (PKString)
Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSTask+Extension.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSTask+Extension.h"

#import "NSAlert+Extension.h"
#import "NSFileManager+Extension.h"

Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSUtilities.h"

#import "NSTask+Extension.h"
#import "NSString+Extension.h"
#import "NSThread+Extension.h"
Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSWebUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "NSWebUtilities.h"
#import <SystemConfiguration/SystemConfiguration.h>

#import "NSString+Extension.h"

#define SECONDS_IN_MINUTE 60
Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSWineskinEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "NSWineskinEngine.h"

#import "NSTask+Extension.h"
#import "NSAlert+Extension.h"
#import "NSString+Extension.h"
Expand Down
1 change: 1 addition & 0 deletions WineskinApp/NSWineskinPortDataWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import <Foundation/Foundation.h>

#import "NSPortManager.h"

@interface NSWineskinPortDataWriter : NSObject
Expand Down
18 changes: 5 additions & 13 deletions WineskinApp/NSWineskinPortDataWriter.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
//

#import "NSWineskinPortDataWriter.h"

#import "NSPathUtilities.h"
#import "NSWineskinEngine.h"

#import "NSComputerInformation.h"

#import "NSData+Extension.h"
#import "NSTask+Extension.h"
#import "NSString+Extension.h"
Expand Down Expand Up @@ -49,17 +52,6 @@ +(void)setMainExePath:(NSString*)exePath atPort:(NSPortManager*)port
//TODO: some 32bit exe files need to use this when launched via wine64
[port setPlistObject:@(![winPath.lowercaseString hasSuffix:@".exe"]) forKey:WINESKIN_WRAPPER_PLIST_KEY_RUN_PATH_IS_NOT_EXE];
[port setPlistObject:flags forKey:WINESKIN_WRAPPER_PLIST_KEY_RUN_PATH_FLAGS];

//TODO: Origin.exe needs to use Start.exe
if ([winPath contains:@"Origin.exe"])
{
[port setPlistObject:@TRUE forKey:WINESKIN_WRAPPER_PLIST_KEY_RUN_PATH_IS_NOT_EXE];
}
//TODO: Steam.exe needs to use Start.exe
if ([winPath contains:@"Steam.exe"])
{
[port setPlistObject:@TRUE forKey:WINESKIN_WRAPPER_PLIST_KEY_RUN_PATH_IS_NOT_EXE];
}
}
else
{
Expand Down Expand Up @@ -240,8 +232,8 @@ +(BOOL)setMainExeName:(NSString*)name version:(NSString*)version icon:(NSImage*)
}
+(BOOL)addCustomExeWithName:(NSString*)name version:(NSString*)version icon:(NSImage*)icon path:(NSString*)path atPortAtPath:(NSString*)portPath
{
NSString* customEXEapp = [NSString stringWithFormat:@"%@/Wineskin.app/Contents/Resources/CustomEXE.app",portPath];
NSString* customEXEPath = [NSString stringWithFormat:@"%@/%@.app",portPath,name];
NSString* customEXEapp = [NSString stringWithFormat:@"%@/Contents/Wineskin.app/Contents/Resources/CustomEXE.app",portPath];
NSString* customEXEPath = [NSString stringWithFormat:@"%@/Contents/%@.app",portPath,name];
[[NSFileManager defaultManager] copyItemAtPath:customEXEapp toPath:customEXEPath];

NSPortManager* activePort = [NSPortManager managerWithCustomExePath:customEXEPath];
Expand Down
10 changes: 0 additions & 10 deletions WineskinApp/Wineskin.entitlements

This file was deleted.

14 changes: 6 additions & 8 deletions WineskinApp/Wineskin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
A14ED61426E1021B0022EC36 /* winefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winefile; sourceTree = "<group>"; };
A14ED61526E1021B0022EC36 /* notepad */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = notepad; sourceTree = "<group>"; };
A14ED61626E1021B0022EC36 /* winemine */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winemine; sourceTree = "<group>"; };
A184191824946DD7008FDFC7 /* Wineskin.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Wineskin.entitlements; sourceTree = "<group>"; };
A1902F272897500F0085F0C9 /* realpath */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = realpath; sourceTree = "<group>"; };
A1938A2C278168F700B99A8F /* wineserver */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = wineserver; sourceTree = "<group>"; };
A1942B2D28C674B600332F75 /* wineskin7z */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = wineskin7z; sourceTree = "<group>"; };
Expand Down Expand Up @@ -227,7 +226,6 @@
29B97314FDCFA39411CA2CEA /* Wineskin */ = {
isa = PBXGroup;
children = (
A184191824946DD7008FDFC7 /* Wineskin.entitlements */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
Expand Down Expand Up @@ -571,7 +569,7 @@
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CREATE_INFOPLIST_SECTION_IN_BINARY = NO;
CURRENT_PROJECT_VERSION = 2.9.2.1;
CURRENT_PROJECT_VERSION = 3.0.6;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
GCC_DYNAMIC_NO_PIC = NO;
Expand All @@ -588,8 +586,8 @@
GCC_WARN_UNUSED_PARAMETER = NO;
INFOPLIST_FILE = "Wineskin-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.2.1;
MACOSX_DEPLOYMENT_TARGET = 10.15.4;
MARKETING_VERSION = 3.0.6;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.unofficial.wineskin;
PRODUCT_NAME = Wineskin;
Expand All @@ -610,7 +608,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CREATE_INFOPLIST_SECTION_IN_BINARY = NO;
CURRENT_PROJECT_VERSION = 2.9.2.1;
CURRENT_PROJECT_VERSION = 3.0.6;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
Expand All @@ -626,8 +624,8 @@
GCC_WARN_UNUSED_PARAMETER = NO;
INFOPLIST_FILE = "Wineskin-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.2.1;
MACOSX_DEPLOYMENT_TARGET = 10.15.4;
MARKETING_VERSION = 3.0.6;
PRODUCT_BUNDLE_IDENTIFIER = com.unofficial.wineskin;
PRODUCT_NAME = Wineskin;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
18 changes: 14 additions & 4 deletions WineskinApp/WineskinAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
IBOutlet NSButton *extEditButton;
IBOutlet NSButton *extPlusButton;
IBOutlet NSButton *extMinusButton;

IBOutlet NSButton *gptkCheckBoxButton;

//advanced menu - Tools Tab
IBOutlet NSButton *winecfgButton;
IBOutlet NSButton *regeditButton;
Expand All @@ -72,21 +73,25 @@

//advanced menu - Options Tab
IBOutlet NSButton *alwaysMakeLogFilesCheckBoxButton;
IBOutlet NSButton *setMaxFilesCheckBoxButton;
IBOutlet NSButton *mapUserFoldersCheckBoxButton;
IBOutlet NSButton *modifyMappingsButton;
IBOutlet NSButton *confirmQuitCheckBoxButton;
IBOutlet NSButton *fntoggleCheckBoxButton;
IBOutlet NSButton *commandCheckBoxButton;
IBOutlet NSButton *optionCheckBoxButton;
IBOutlet NSButton *esyncCheckBoxButton;
IBOutlet NSButton *msyncCheckBoxButton;

//advanced menu - Advanced Tab
IBOutlet NSButton *WinetricksNoLogsButton;
IBOutlet NSButton *disableCPUsCheckBoxButton;
IBOutlet NSButton *winedbgDisabledButton;
IBOutlet NSButton *geckoCheckBoxButton;
IBOutlet NSButtonCell *monoCheckBoxButton;

IBOutlet NSButton *metalhudCheckBoxButton;
IBOutlet NSButton *fastmathCheckBoxButton;
IBOutlet NSButton *cxmoltenvkCheckBoxButton;

//change engine window
IBOutlet NSWindow *changeEngineWindow;
IBOutlet NSPopUpButton *changeEngineWindowPopUpButton;
Expand Down Expand Up @@ -178,6 +183,9 @@
- (IBAction)installWindowsSoftwareButtonPressed:(id)sender;
- (IBAction)chooseExeOKButtonPressed:(id)sender;
- (IBAction)advancedButtonPressed:(id)sender;
- (IBAction)esyncButtonPressed:(id)sender;
- (IBAction)msyncButtonPressed:(id)sender;

//Installer window methods
- (IBAction)chooseSetupExecutableButtonPressed:(id)sender;
- (IBAction)copyAFolderInsideButtonPressed:(id)sender;
Expand Down Expand Up @@ -221,7 +229,6 @@

//advanced menu - Options Tab
- (IBAction)alwaysMakeLogFilesCheckBoxButtonPressed:(id)sender;
- (IBAction)setMaxFilesCheckBoxButtonPressed:(id)sender;
- (IBAction)mapUserFoldersCheckBoxButtonPressed:(id)sender;
- (IBAction)confirmQuitCheckBoxButtonPressed:(id)sender;
- (IBAction)modifyMappingsButtonPressed:(id)sender;
Expand All @@ -235,6 +242,9 @@
- (IBAction)winedbgDisabledButtonPressed:(id)sender;
- (IBAction)geckoButtonPressed:(id)sender;
- (IBAction)monoButtonPressed:(id)sender;
- (IBAction)metahudButtonPress:(id)sender;
- (IBAction)fastmathButtonPress:(id)sender;
- (IBAction)cxmoltenvkButtonPress:(id)sender;

//Winetricks
- (IBAction)winetricksButtonPressed:(id)sender;
Expand Down
Loading

0 comments on commit 19c2cb3

Please sign in to comment.