diff --git a/Wineskin Winery/English.lproj/MainMenu.xib b/Wineskin Winery/Base.lproj/MainMenu.xib similarity index 99% rename from Wineskin Winery/English.lproj/MainMenu.xib rename to Wineskin Winery/Base.lproj/MainMenu.xib index 7f32804..5167597 100644 --- a/Wineskin Winery/English.lproj/MainMenu.xib +++ b/Wineskin Winery/Base.lproj/MainMenu.xib @@ -317,7 +317,7 @@ - + @@ -1495,7 +1507,18 @@ Gw - + + + + @@ -1557,12 +1580,12 @@ Gw - + - + @@ -1679,7 +1702,7 @@ Gw - + @@ -1706,7 +1729,7 @@ Gw - + @@ -1792,7 +1815,7 @@ DQ - + @@ -1893,10 +1916,10 @@ Gw - + - + - + @@ -2129,11 +2147,11 @@ DQ - + - + @@ -2208,7 +2226,7 @@ Gw - + @@ -2388,7 +2406,7 @@ Gw - + @@ -2634,7 +2652,7 @@ Gw - + @@ -2647,11 +2665,11 @@ Gw - + - + - + @@ -2837,7 +2855,7 @@ Gw - + @@ -2882,11 +2900,11 @@ Gw - + - + @@ -3066,6 +3084,8 @@ For more information see + + @@ -3082,8 +3102,9 @@ For more information see + - + @@ -3145,14 +3166,14 @@ For more information see - - + + - + - + - + - + @@ -3203,7 +3224,7 @@ For more information see - + @@ -3212,7 +3233,7 @@ For more information see - + @@ -3221,7 +3242,7 @@ For more information see - + @@ -3230,16 +3251,16 @@ For more information see - + - + - + @@ -3248,16 +3269,16 @@ For more information see - + - + - + @@ -3266,16 +3287,16 @@ For more information see - + - + - + @@ -3284,11 +3305,11 @@ For more information see - + - + @@ -3319,7 +3340,7 @@ For more information see - + @@ -3328,7 +3349,7 @@ For more information see + + + + + + + + + + - + - + @@ -3388,7 +3429,7 @@ Gw - + @@ -3396,20 +3437,29 @@ Gw + + + + + + + + + - + - - - - - + + + + + - + diff --git a/WineskinApp/Codecs/Rar.so b/WineskinApp/Codecs/Rar.so new file mode 100755 index 0000000..1392a87 Binary files /dev/null and b/WineskinApp/Codecs/Rar.so differ diff --git a/WineskinApp/CustomEXE.app/Contents/Info.plist b/WineskinApp/CustomEXE.app/Contents/Info.plist index 70166d7..9690145 100644 --- a/WineskinApp/CustomEXE.app/Contents/Info.plist +++ b/WineskinApp/CustomEXE.app/Contents/Info.plist @@ -7,7 +7,7 @@ CFBundleIconFile Wineskin.icns CFBundleInfoDictionaryVersion - 1.0 + 6.0 CFBundlePackageType APPL CFBundleShortVersionString diff --git a/WineskinApp/CustomEXE.app/Contents/Info.plist.cexe b/WineskinApp/CustomEXE.app/Contents/Info.plist.cexe index b606eb8..db6f7b4 100755 --- a/WineskinApp/CustomEXE.app/Contents/Info.plist.cexe +++ b/WineskinApp/CustomEXE.app/Contents/Info.plist.cexe @@ -11,7 +11,7 @@ CFBundleIdentifier com.Wineskin.Wineskin CFBundleInfoDictionaryVersion - 1.0 + 6.0 CFBundleName Wineskin CFBundlePackageType diff --git a/WineskinApp/CustomEXE.app/Contents/MacOS/CustomEXE b/WineskinApp/CustomEXE.app/Contents/MacOS/CustomEXE index 91f744f..a41f322 100755 --- a/WineskinApp/CustomEXE.app/Contents/MacOS/CustomEXE +++ b/WineskinApp/CustomEXE.app/Contents/MacOS/CustomEXE @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ################################################### # CustomEXE code for Wineskin wrappers # Made by doh123@doh123.com diff --git a/WineskinApp/CustomEXE.app/Contents/_CodeSignature/CodeRequirements b/WineskinApp/CustomEXE.app/Contents/_CodeSignature/CodeRequirements deleted file mode 100644 index 60c2cba..0000000 Binary files a/WineskinApp/CustomEXE.app/Contents/_CodeSignature/CodeRequirements and /dev/null differ diff --git a/WineskinApp/CustomEXE.app/Contents/_CodeSignature/CodeResources b/WineskinApp/CustomEXE.app/Contents/_CodeSignature/CodeResources deleted file mode 100644 index ae26edd..0000000 --- a/WineskinApp/CustomEXE.app/Contents/_CodeSignature/CodeResources +++ /dev/null @@ -1,34 +0,0 @@ - - - - - files - - Resources/Wineskin.icns - - UBpxhSgh3LiMn1F2KOP/AQZqw3w= - - - rules - - ^Resources/ - - ^Resources/.*\.lproj/ - - optional - - weight - 1000 - - ^Resources/.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^version.plist$ - - - - diff --git a/WineskinApp/NSComputerInformation.h b/WineskinApp/NSComputerInformation.h index 7eae1f2..1fa3eb2 100755 --- a/WineskinApp/NSComputerInformation.h +++ b/WineskinApp/NSComputerInformation.h @@ -18,6 +18,8 @@ #define IS_SYSTEM_MAC_OS_10_13_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"10.13"] // High Sierra #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_11_00_OR_SUPERIOR [NSComputerInformation isSystemMacOsEqualOrSuperiorTo:@"11.00"] // Big Sur +#define IS_SYSTEM_NAC_OS_12_0_OR_SUPERIOR [VMMComputerInformation isSystemMacOsEqualOrSuperiorTo:@"12.0"] // Monterey #import diff --git a/WineskinApp/NSComputerInformation.m b/WineskinApp/NSComputerInformation.m index 283e718..0163105 100755 --- a/WineskinApp/NSComputerInformation.m +++ b/WineskinApp/NSComputerInformation.m @@ -7,10 +7,8 @@ // #import "NSComputerInformation.h" - #import "NSUtilities.h" #import "VMMVersion.h" - #import "NSTask+Extension.h" #import "NSArray+Extension.h" #import "NSString+Extension.h" diff --git a/WineskinApp/NSDropIconView.m b/WineskinApp/NSDropIconView.m index dd1c6a8..eb1d7ed 100755 --- a/WineskinApp/NSDropIconView.m +++ b/WineskinApp/NSDropIconView.m @@ -7,7 +7,6 @@ // #import "NSDropIconView.h" - #import "NSData+Extension.h" #import "NSTask+Extension.h" #import "NSImage+Extension.h" diff --git a/WineskinApp/NSExeSelection.m b/WineskinApp/NSExeSelection.m index 496e912..a2304a9 100755 --- a/WineskinApp/NSExeSelection.m +++ b/WineskinApp/NSExeSelection.m @@ -7,11 +7,8 @@ // #import "NSExeSelection.h" - #import "NSPortManager.h" - #import "NSPathUtilities.h" - #import "NSString+Extension.h" #import "NSFileManager+Extension.h" diff --git a/WineskinApp/NSFileManager+Extension.m b/WineskinApp/NSFileManager+Extension.m index b240071..f4315c7 100755 --- a/WineskinApp/NSFileManager+Extension.m +++ b/WineskinApp/NSFileManager+Extension.m @@ -7,7 +7,6 @@ // #import "NSFileManager+Extension.h" - #import "NSAlert+Extension.h" #import "NSTask+Extension.h" diff --git a/WineskinApp/NSPathUtilities.m b/WineskinApp/NSPathUtilities.m index f555943..aaeceb0 100755 --- a/WineskinApp/NSPathUtilities.m +++ b/WineskinApp/NSPathUtilities.m @@ -7,7 +7,6 @@ // #import "NSPathUtilities.h" - #import "NSString+Extension.h" #import "NSFileManager+Extension.h" diff --git a/WineskinApp/NSPortDataLoader.h b/WineskinApp/NSPortDataLoader.h index c1b3990..b5f64bc 100755 --- a/WineskinApp/NSPortDataLoader.h +++ b/WineskinApp/NSPortDataLoader.h @@ -7,7 +7,6 @@ // #import - #import "NSPortManager.h" #import "NSWineskinEngine.h" diff --git a/WineskinApp/NSPortDataLoader.m b/WineskinApp/NSPortDataLoader.m index 80fdaa9..71ea0fa 100644 --- a/WineskinApp/NSPortDataLoader.m +++ b/WineskinApp/NSPortDataLoader.m @@ -7,12 +7,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" @@ -22,7 +19,8 @@ @implementation NSPortDataLoader +(NSString*)wineskinEngineOfPortAtPath:(NSString*)path { - NSString* wswineVersion = [NSString stringWithFormat:@"%@/Contents/Frameworks/wswine.bundle/version",path]; + NSString* wswineVersion = [NSString stringWithFormat:@"%@/Contents/SharedSupport/wine/version",path]; + //NSString* wswineVersion = [NSString stringWithFormat:@"%@/Contents/SharedSupport/wswine.bundle/version",path]; if ([[NSFileManager defaultManager] fileExistsAtPath:wswineVersion]) { diff --git a/WineskinApp/NSPortManager.m b/WineskinApp/NSPortManager.m index 4601d12..d789a32 100644 --- a/WineskinApp/NSPortManager.m +++ b/WineskinApp/NSPortManager.m @@ -209,7 +209,7 @@ -(NSMutableDictionary*)getFunctionFromDescription:(NSString*)description } -(NSArray*)getAvailableWinetricksList { - NSString* winetricksPath = [NSString stringWithFormat:@"%@/Wineskin.app/Contents/Resources/winetricks",self.path]; + NSString* winetricksPath = [NSString stringWithFormat:@"%@/Wineskin.app/Contents/Resources/winetricks",[[NSBundle mainBundle] bundlePath]]; NSString* winetricksRaw = [[NSString alloc] initWithContentsOfFile:winetricksPath encoding:NSASCIIStringEncoding error:nil]; NSMutableArray* newList = [[NSMutableArray alloc] init]; @@ -300,7 +300,7 @@ -(NSString*)getPathForRegistryFile:(NSString*)reg return cxPath; } - return [NSString stringWithFormat:@"%@/Contents/Resources/%@.reg",self.path,reg]; + return [NSString stringWithFormat:@"%@/Contents/SharedSupport/prefix/%@.reg",self.path,reg]; } -(BOOL)addRegistry:(NSString*)lines fromRegistryFileNamed:(NSString*)reg { diff --git a/WineskinApp/NSProgressView.m b/WineskinApp/NSProgressView.m index fd3333d..46fe06d 100755 --- a/WineskinApp/NSProgressView.m +++ b/WineskinApp/NSProgressView.m @@ -7,7 +7,6 @@ // #import "NSProgressView.h" - #import "NSThread+Extension.h" @implementation NSProgressView diff --git a/WineskinApp/NSSavePanel+Extension.m b/WineskinApp/NSSavePanel+Extension.m index 03230b1..e0b188b 100755 --- a/WineskinApp/NSSavePanel+Extension.m +++ b/WineskinApp/NSSavePanel+Extension.m @@ -7,7 +7,6 @@ // #import "NSSavePanel+Extension.h" - #import "NSComputerInformation.h" @implementation NSSavePanel (PKSavePanel) diff --git a/WineskinApp/NSString+Extension.m b/WineskinApp/NSString+Extension.m index 2507e51..7247dd5 100755 --- a/WineskinApp/NSString+Extension.m +++ b/WineskinApp/NSString+Extension.m @@ -7,11 +7,9 @@ // #import "NSString+Extension.h" - #import "NSData+Extension.h" #import "NSTask+Extension.h" #import "NSAlert+Extension.h" - #import "NSComputerInformation.h" @implementation NSString (PKString) diff --git a/WineskinApp/NSTask+Extension.m b/WineskinApp/NSTask+Extension.m index 7eeec39..f4a312a 100755 --- a/WineskinApp/NSTask+Extension.m +++ b/WineskinApp/NSTask+Extension.m @@ -7,7 +7,6 @@ // #import "NSTask+Extension.h" - #import "NSAlert+Extension.h" #import "NSFileManager+Extension.h" diff --git a/WineskinApp/NSUtilities.m b/WineskinApp/NSUtilities.m index 31cec87..55df1a8 100755 --- a/WineskinApp/NSUtilities.m +++ b/WineskinApp/NSUtilities.m @@ -7,7 +7,6 @@ // #import "NSUtilities.h" - #import "NSTask+Extension.h" #import "NSString+Extension.h" #import "NSThread+Extension.h" diff --git a/WineskinApp/NSWebUtilities.m b/WineskinApp/NSWebUtilities.m index 32bf30a..a2b0c33 100755 --- a/WineskinApp/NSWebUtilities.m +++ b/WineskinApp/NSWebUtilities.m @@ -8,7 +8,6 @@ #import "NSWebUtilities.h" #import - #import "NSString+Extension.h" #define SECONDS_IN_MINUTE 60 diff --git a/WineskinApp/NSWineskinEngine.h b/WineskinApp/NSWineskinEngine.h index 5d5bbbe..8b912cd 100755 --- a/WineskinApp/NSWineskinEngine.h +++ b/WineskinApp/NSWineskinEngine.h @@ -40,6 +40,7 @@ typedef enum { -(BOOL)csmtUsesNewRegistry; -(BOOL)isCompatibleWithHighQualityMode; -(BOOL)isCompatibleWith16Bit; +-(BOOL)isForceWinetricksNeeded; +(NSString*)localPathForEngine:(NSString*)engine; diff --git a/WineskinApp/NSWineskinEngine.m b/WineskinApp/NSWineskinEngine.m index d49d71f..e2231a2 100755 --- a/WineskinApp/NSWineskinEngine.m +++ b/WineskinApp/NSWineskinEngine.m @@ -7,13 +7,11 @@ // #import "NSWineskinEngine.h" - #import "NSTask+Extension.h" #import "NSAlert+Extension.h" #import "NSString+Extension.h" #import "NSFileManager+Extension.h" #import "NSMutableArray+Extension.h" - #import "NSUtilities.h" #import "NSWebUtilities.h" #import "VMMVersion.h" @@ -651,12 +649,11 @@ -(BOOL)csmtUsesNewRegistry case NSWineskinEngineCrossOver: - // As of 2017-10-02 (CX 16.2.5), CX last merge with Wine was with Wine 2.0, so it doesn't have Wine's CSMT, - // but Wine's CSMT may have came from CrossOver, so CrossOver CSMT possibly always had the new registry. - // TODO: Needs to check, and might change in the future in case 'false' - - return false; + // CrossOver 18 is based on Wine 3.14 + // https://www.codeweavers.com/products/more-information/changelog#18.0.0 + return [self isWineVersionAtLeast:@"18.0.0"]; + case NSWineskinEngineWineStaging: // Technically, Staging CSMT should have been replaced by Wine's in 1.9.10 @@ -664,6 +661,9 @@ -(BOOL)csmtUsesNewRegistry return [self isWineVersionAtLeast:@"1.9.10"]; + case NSWineskinEngineProton: + return true; + case NSWineskinEngineWine: // CSMT was added to Wine in the 2.6 version, and it always used it in that way @@ -747,7 +747,31 @@ -(BOOL)isCompatibleWith16Bit return true; } - +//TODO: Is force winetricks needed +-(BOOL)isForceWinetricksNeeded +{ + switch (self.engineType) + { + case NSWineskinEngineCrossOverGames: + return false; + + case NSWineskinEngineCrossOver: + // Winetricks blocks wine-6.0 from installing .Net 4.5/4.8 + //return [self isWineVersionAtLeast:@"21.0.0"]; + return false; + + case NSWineskinEngineWineStaging: + return false; + + case NSWineskinEngineWine: + return false; + + default: + break; + } + + return true; +} +(NSString*)localPathForEngine:(NSString*)engine { NSString* engineFile; diff --git a/WineskinApp/NSWineskinPortDataWriter.h b/WineskinApp/NSWineskinPortDataWriter.h index 33f0ac5..e7c9a39 100644 --- a/WineskinApp/NSWineskinPortDataWriter.h +++ b/WineskinApp/NSWineskinPortDataWriter.h @@ -7,7 +7,6 @@ // #import - #import "NSPortManager.h" @interface NSWineskinPortDataWriter : NSObject diff --git a/WineskinApp/NSWineskinPortDataWriter.m b/WineskinApp/NSWineskinPortDataWriter.m index 1cd1873..c1a8f2d 100644 --- a/WineskinApp/NSWineskinPortDataWriter.m +++ b/WineskinApp/NSWineskinPortDataWriter.m @@ -7,12 +7,9 @@ // #import "NSWineskinPortDataWriter.h" - #import "NSPathUtilities.h" #import "NSWineskinEngine.h" - #import "NSComputerInformation.h" - #import "NSData+Extension.h" #import "NSTask+Extension.h" #import "NSString+Extension.h" @@ -52,6 +49,12 @@ +(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]; + } } else { @@ -104,7 +107,7 @@ +(BOOL)saveCloseSafely:(NSNumber*)closeSafely atPort:(NSPortManager*)port } +(BOOL)saveCopyrightsAtPort:(NSPortManager*)port { - NSString *companyFile = [NSString stringWithFormat:@"%@/Contents/Resources/English.lproj/InfoPlist.strings",port.path]; + NSString *companyFile = [NSString stringWithFormat:@"%@/Contents/Resources/en.lproj/InfoPlist.strings",port.path]; long year = (long)[[[NSCalendar currentCalendar] components:NSYearCalendarUnit fromDate:NSDate.date] year]; NSString* copyright = [NSString stringWithFormat:@"Copyright © 2014-%ld PortingKit.com. All rights reserved.", year]; diff --git a/WineskinApp/WSGamma b/WineskinApp/WSGamma deleted file mode 100755 index d441cff..0000000 Binary files a/WineskinApp/WSGamma and /dev/null differ diff --git a/WineskinApp/Wineskin.entitlements b/WineskinApp/Wineskin.entitlements new file mode 100644 index 0000000..74342d2 --- /dev/null +++ b/WineskinApp/Wineskin.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.automation.apple-events + + com.apple.security.cs.allow-unsigned-executable-memory + + + diff --git a/WineskinApp/Wineskin.xcodeproj/project.pbxproj b/WineskinApp/Wineskin.xcodeproj/project.pbxproj index 73a2983..618b043 100644 --- a/WineskinApp/Wineskin.xcodeproj/project.pbxproj +++ b/WineskinApp/Wineskin.xcodeproj/project.pbxproj @@ -38,24 +38,44 @@ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; + A11031EB249474BD00E16174 /* wine32on64 in Resources */ = {isa = PBXBuildFile; fileRef = A11031E9249474BC00E16174 /* wine32on64 */; }; + A11031EC249474BD00E16174 /* wine64 in Resources */ = {isa = PBXBuildFile; fileRef = A11031EA249474BC00E16174 /* wine64 */; }; + A12E8EAB2491CBE600401C0E /* unrar in Resources */ = {isa = PBXBuildFile; fileRef = A12E8EAA2491CBE600401C0E /* unrar */; }; + A12E8EAE2492662B00401C0E /* wine in Resources */ = {isa = PBXBuildFile; fileRef = A10B62A2248FC277003FE411 /* wine */; }; + A14ED5F926D5D5000022EC36 /* fntoggle in Resources */ = {isa = PBXBuildFile; fileRef = A1A1153B21EAD98D00D5A97F /* fntoggle */; }; + A14ED61726E1021B0022EC36 /* wineconsole in Resources */ = {isa = PBXBuildFile; fileRef = A14ED60B26E1021B0022EC36 /* wineconsole */; }; + A14ED61926E1021B0022EC36 /* winedbg in Resources */ = {isa = PBXBuildFile; fileRef = A14ED60D26E1021B0022EC36 /* winedbg */; }; + A14ED61A26E1021B0022EC36 /* msiexec in Resources */ = {isa = PBXBuildFile; fileRef = A14ED60E26E1021B0022EC36 /* msiexec */; }; + A14ED61B26E1021B0022EC36 /* regedit in Resources */ = {isa = PBXBuildFile; fileRef = A14ED60F26E1021B0022EC36 /* regedit */; }; + A14ED61C26E1021B0022EC36 /* winecfg in Resources */ = {isa = PBXBuildFile; fileRef = A14ED61026E1021B0022EC36 /* winecfg */; }; + A14ED61D26E1021B0022EC36 /* winepath in Resources */ = {isa = PBXBuildFile; fileRef = A14ED61126E1021B0022EC36 /* winepath */; }; + A14ED61E26E1021B0022EC36 /* wineboot in Resources */ = {isa = PBXBuildFile; fileRef = A14ED61226E1021B0022EC36 /* wineboot */; }; + A14ED61F26E1021B0022EC36 /* regsvr32 in Resources */ = {isa = PBXBuildFile; fileRef = A14ED61326E1021B0022EC36 /* regsvr32 */; }; + A14ED62026E1021B0022EC36 /* winefile in Resources */ = {isa = PBXBuildFile; fileRef = A14ED61426E1021B0022EC36 /* winefile */; }; + A14ED62126E1021B0022EC36 /* notepad in Resources */ = {isa = PBXBuildFile; fileRef = A14ED61526E1021B0022EC36 /* notepad */; }; + A14ED62226E1021B0022EC36 /* winemine in Resources */ = {isa = PBXBuildFile; fileRef = A14ED61626E1021B0022EC36 /* winemine */; }; + A1938A2D278168F700B99A8F /* wineserver in Resources */ = {isa = PBXBuildFile; fileRef = A1938A2C278168F700B99A8F /* wineserver */; }; A19CB3FB2433D36F00DDC9AF /* appdb in Resources */ = {isa = PBXBuildFile; fileRef = A19CB3FA2433D36F00DDC9AF /* appdb */; }; - A1A1153C21EAD98D00D5A97F /* fntoggle in Resources */ = {isa = PBXBuildFile; fileRef = A1A1153B21EAD98D00D5A97F /* fntoggle */; }; - A1CA021B21C6B16A00257CD5 /* WS7za in Resources */ = {isa = PBXBuildFile; fileRef = A1CA021A21C6B16A00257CD5 /* WS7za */; }; + A1B70482245E56EC00B573A9 /* cabextract in Resources */ = {isa = PBXBuildFile; fileRef = A1B70481245E56EC00B573A9 /* cabextract */; }; + A1C6AA8727012187007485C5 /* Codecs in Resources */ = {isa = PBXBuildFile; fileRef = A1C6AA8627012187007485C5 /* Codecs */; }; + A1C6AA9527015225007485C5 /* 7z in Resources */ = {isa = PBXBuildFile; fileRef = A1C6AA9327015225007485C5 /* 7z */; }; + A1C6AA9627015225007485C5 /* wineskin7z in Resources */ = {isa = PBXBuildFile; fileRef = A1C6AA9427015225007485C5 /* wineskin7z */; }; + A1DD875F2495906300E4D0DE /* 7za in Resources */ = {isa = PBXBuildFile; fileRef = A1DD875E2495906300E4D0DE /* 7za */; }; + A1E4C63426FEA74000A7B2A3 /* 7z.so in Resources */ = {isa = PBXBuildFile; fileRef = A1DD87662496EDBA00E4D0DE /* 7z.so */; }; + A1E4C63727011E2800A7B2A3 /* 7zr in Resources */ = {isa = PBXBuildFile; fileRef = A1E4C63627011E2800A7B2A3 /* 7zr */; }; + A1E4C63927011E3C00A7B2A3 /* 7zCon.sfx in Resources */ = {isa = PBXBuildFile; fileRef = A1E4C63827011E3C00A7B2A3 /* 7zCon.sfx */; }; A82645D5153ADC3D00FA0306 /* WineskinBanner2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = A82645D4153ADC3D00FA0306 /* WineskinBanner2.jpg */; }; A82E5B8C133E73B8007AA611 /* CustomEXE.app in Resources */ = {isa = PBXBuildFile; fileRef = A868FC2E12820240001EBA25 /* CustomEXE.app */; }; A82E5B90133E73EF007AA611 /* remakedefaults.reg in Resources */ = {isa = PBXBuildFile; fileRef = A868FC2C12820230001EBA25 /* remakedefaults.reg */; }; - A82E5B94133E7407007AA611 /* WSGamma in Resources */ = {isa = PBXBuildFile; fileRef = A868FC2512820212001EBA25 /* WSGamma */; }; A82E5B95133E740C007AA611 /* Wineskin.icns in Resources */ = {isa = PBXBuildFile; fileRef = A88CCE4E127B9CED007FBC32 /* Wineskin.icns */; }; A82E5B96133E7411007AA611 /* WineskinBanner.jpg in Resources */ = {isa = PBXBuildFile; fileRef = A88CCE4C127B9C02007FBC32 /* WineskinBanner.jpg */; }; A84DB68B153230490071D4F8 /* winehelp in Resources */ = {isa = PBXBuildFile; fileRef = A84DB68A153230490071D4F8 /* winehelp */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 162AD88B1434CE2800FC0426 /* Defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Defaults.plist; sourceTree = ""; }; - 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; 256AC3D80F4B6AC300CF3369 /* WineskinAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WineskinAppDelegate.h; sourceTree = ""; }; 256AC3D90F4B6AC300CF3369 /* WineskinAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WineskinAppDelegate.m; sourceTree = ""; }; 256AC3F00F4B6AF500CF3369 /* Wineskin_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Wineskin_Prefix.pch; sourceTree = ""; }; @@ -113,12 +133,39 @@ 4EA284021F003ABE00E61883 /* NSExeSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSExeSelection.m; sourceTree = ""; }; 8D1107310486CEB800E47090 /* Wineskin-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Wineskin-Info.plist"; sourceTree = ""; }; 8D1107320486CEB800E47090 /* Wineskin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wineskin.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A10B62A2248FC277003FE411 /* wine */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = wine; sourceTree = ""; }; + A11031E9249474BC00E16174 /* wine32on64 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = wine32on64; sourceTree = ""; }; + A11031EA249474BC00E16174 /* wine64 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = wine64; sourceTree = ""; }; + A12E8EAA2491CBE600401C0E /* unrar */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = unrar; sourceTree = ""; }; + A14D00CA2489AD13007806A5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + A14D00CC2489AD18007806A5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + A14ED60926E1020B0022EC36 /* wineapploader.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = wineapploader.in; sourceTree = ""; }; + A14ED60B26E1021B0022EC36 /* wineconsole */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = wineconsole; sourceTree = ""; }; + A14ED60C26E1021B0022EC36 /* msidb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = msidb; sourceTree = ""; }; + A14ED60D26E1021B0022EC36 /* winedbg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winedbg; sourceTree = ""; }; + A14ED60E26E1021B0022EC36 /* msiexec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = msiexec; sourceTree = ""; }; + A14ED60F26E1021B0022EC36 /* regedit */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = regedit; sourceTree = ""; }; + A14ED61026E1021B0022EC36 /* winecfg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winecfg; sourceTree = ""; }; + A14ED61126E1021B0022EC36 /* winepath */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winepath; sourceTree = ""; }; + A14ED61226E1021B0022EC36 /* wineboot */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = wineboot; sourceTree = ""; }; + A14ED61326E1021B0022EC36 /* regsvr32 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = regsvr32; sourceTree = ""; }; + A14ED61426E1021B0022EC36 /* winefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winefile; sourceTree = ""; }; + A14ED61526E1021B0022EC36 /* notepad */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = notepad; sourceTree = ""; }; + A14ED61626E1021B0022EC36 /* winemine */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winemine; sourceTree = ""; }; + A184191824946DD7008FDFC7 /* Wineskin.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Wineskin.entitlements; sourceTree = ""; }; + A1938A2C278168F700B99A8F /* wineserver */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = wineserver; sourceTree = ""; }; A19CB3FA2433D36F00DDC9AF /* appdb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = appdb; sourceTree = ""; }; A1A1153B21EAD98D00D5A97F /* fntoggle */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = fntoggle; sourceTree = ""; }; - A1CA021A21C6B16A00257CD5 /* WS7za */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = WS7za; path = "../Wineskin Winery/WS7za"; sourceTree = ""; }; + A1B70481245E56EC00B573A9 /* cabextract */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = cabextract; sourceTree = ""; }; + A1C6AA8627012187007485C5 /* Codecs */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Codecs; sourceTree = ""; }; + A1C6AA9327015225007485C5 /* 7z */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = 7z; sourceTree = ""; }; + A1C6AA9427015225007485C5 /* wineskin7z */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = wineskin7z; sourceTree = ""; }; + A1DD875E2495906300E4D0DE /* 7za */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = 7za; sourceTree = ""; }; + A1DD87662496EDBA00E4D0DE /* 7z.so */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.bundle"; path = 7z.so; sourceTree = ""; }; + A1E4C63627011E2800A7B2A3 /* 7zr */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = 7zr; sourceTree = ""; }; + A1E4C63827011E3C00A7B2A3 /* 7zCon.sfx */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = 7zCon.sfx; sourceTree = ""; }; A82645D4153ADC3D00FA0306 /* WineskinBanner2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = WineskinBanner2.jpg; sourceTree = ""; }; A84DB68A153230490071D4F8 /* winehelp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = winehelp; sourceTree = ""; }; - A868FC2512820212001EBA25 /* WSGamma */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = WSGamma; sourceTree = ""; }; A868FC2C12820230001EBA25 /* remakedefaults.reg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = remakedefaults.reg; sourceTree = ""; }; A868FC2E12820240001EBA25 /* CustomEXE.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = CustomEXE.app; sourceTree = ""; }; A88CCE4C127B9C02007FBC32 /* WineskinBanner.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = WineskinBanner.jpg; sourceTree = ""; }; @@ -178,11 +225,13 @@ 29B97314FDCFA39411CA2CEA /* Wineskin */ = { isa = PBXGroup; children = ( + A184191824946DD7008FDFC7 /* Wineskin.entitlements */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, + A14ED5F826D5D2D80022EC36 /* Recovered References */, ); name = Wineskin; sourceTree = ""; @@ -199,14 +248,38 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + A14ED60C26E1021B0022EC36 /* msidb */, + A14ED60E26E1021B0022EC36 /* msiexec */, + A14ED61526E1021B0022EC36 /* notepad */, + A14ED60F26E1021B0022EC36 /* regedit */, + A14ED61326E1021B0022EC36 /* regsvr32 */, + A14ED61226E1021B0022EC36 /* wineboot */, + A14ED61026E1021B0022EC36 /* winecfg */, + A14ED60B26E1021B0022EC36 /* wineconsole */, + A14ED60D26E1021B0022EC36 /* winedbg */, + A14ED61426E1021B0022EC36 /* winefile */, + A14ED61626E1021B0022EC36 /* winemine */, + A14ED61126E1021B0022EC36 /* winepath */, + A14ED60926E1020B0022EC36 /* wineapploader.in */, A82645D4153ADC3D00FA0306 /* WineskinBanner2.jpg */, A84DB68A153230490071D4F8 /* winehelp */, A19CB3FA2433D36F00DDC9AF /* appdb */, A868FC2E12820240001EBA25 /* CustomEXE.app */, A868FC2C12820230001EBA25 /* remakedefaults.reg */, - A1CA021A21C6B16A00257CD5 /* WS7za */, + A1C6AA8627012187007485C5 /* Codecs */, + A1C6AA9327015225007485C5 /* 7z */, + A1C6AA9427015225007485C5 /* wineskin7z */, + A1DD87662496EDBA00E4D0DE /* 7z.so */, + A1E4C63827011E3C00A7B2A3 /* 7zCon.sfx */, + A1DD875E2495906300E4D0DE /* 7za */, + A1E4C63627011E2800A7B2A3 /* 7zr */, + A1B70481245E56EC00B573A9 /* cabextract */, + A12E8EAA2491CBE600401C0E /* unrar */, + A10B62A2248FC277003FE411 /* wine */, + A11031E9249474BC00E16174 /* wine32on64 */, + A11031EA249474BC00E16174 /* wine64 */, + A1938A2C278168F700B99A8F /* wineserver */, A1A1153B21EAD98D00D5A97F /* fntoggle */, - A868FC2512820212001EBA25 /* WSGamma */, A88CCE4E127B9CED007FBC32 /* Wineskin.icns */, A88CCE4C127B9C02007FBC32 /* WineskinBanner.jpg */, 8D1107310486CEB800E47090 /* Wineskin-Info.plist */, @@ -321,6 +394,13 @@ name = Controller; sourceTree = ""; }; + A14ED5F826D5D2D80022EC36 /* Recovered References */ = { + isa = PBXGroup; + children = ( + ); + name = "Recovered References"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -357,13 +437,11 @@ }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Wineskin" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + en, + Base, ); mainGroup = 29B97314FDCFA39411CA2CEA /* Wineskin */; projectDirPath = ""; @@ -379,19 +457,41 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + A1C6AA8727012187007485C5 /* Codecs in Resources */, + A1E4C63426FEA74000A7B2A3 /* 7z.so in Resources */, + A1E4C63927011E3C00A7B2A3 /* 7zCon.sfx in Resources */, + A1C6AA9527015225007485C5 /* 7z in Resources */, + A1C6AA9627015225007485C5 /* wineskin7z in Resources */, + A1DD875F2495906300E4D0DE /* 7za in Resources */, + A1E4C63727011E2800A7B2A3 /* 7zr in Resources */, + A12E8EAE2492662B00401C0E /* wine in Resources */, + A11031EC249474BD00E16174 /* wine64 in Resources */, + A14ED62126E1021B0022EC36 /* notepad in Resources */, + A14ED61E26E1021B0022EC36 /* wineboot in Resources */, + A14ED62026E1021B0022EC36 /* winefile in Resources */, + A11031EB249474BD00E16174 /* wine32on64 in Resources */, + A14ED61F26E1021B0022EC36 /* regsvr32 in Resources */, + A84DB68B153230490071D4F8 /* winehelp in Resources */, + A19CB3FB2433D36F00DDC9AF /* appdb in Resources */, + A14ED5F926D5D5000022EC36 /* fntoggle in Resources */, + A14ED61C26E1021B0022EC36 /* winecfg in Resources */, + A1B70482245E56EC00B573A9 /* cabextract in Resources */, + A12E8EAB2491CBE600401C0E /* unrar in Resources */, + A1938A2D278168F700B99A8F /* wineserver in Resources */, 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, - A1A1153C21EAD98D00D5A97F /* fntoggle in Resources */, A82E5B96133E7411007AA611 /* WineskinBanner.jpg in Resources */, A82E5B95133E740C007AA611 /* Wineskin.icns in Resources */, - A82E5B94133E7407007AA611 /* WSGamma in Resources */, + A14ED61926E1021B0022EC36 /* winedbg in Resources */, A82E5B90133E73EF007AA611 /* remakedefaults.reg in Resources */, A82E5B8C133E73B8007AA611 /* CustomEXE.app in Resources */, 162AD88C1434CE2800FC0426 /* Defaults.plist in Resources */, - A1CA021B21C6B16A00257CD5 /* WS7za in Resources */, - A84DB68B153230490071D4F8 /* winehelp in Resources */, - A19CB3FB2433D36F00DDC9AF /* appdb in Resources */, + A14ED62226E1021B0022EC36 /* winemine in Resources */, + A14ED61726E1021B0022EC36 /* wineconsole in Resources */, A82645D5153ADC3D00FA0306 /* WineskinBanner2.jpg in Resources */, + A14ED61A26E1021B0022EC36 /* msiexec in Resources */, + A14ED61D26E1021B0022EC36 /* winepath in Resources */, + A14ED61B26E1021B0022EC36 /* regedit in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -437,7 +537,7 @@ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 089C165DFE840E0CC02AAC07 /* English */, + A14D00CA2489AD13007806A5 /* en */, ); name = InfoPlist.strings; sourceTree = ""; @@ -445,7 +545,7 @@ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( - 1DDD58150DA1D0A300B32029 /* English */, + A14D00CC2489AD18007806A5 /* Base */, ); name = MainMenu.xib; sourceTree = ""; @@ -457,14 +557,19 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_ENTITLEMENTS = Wineskin.entitlements; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.9.0.7; + CREATE_INFOPLIST_SECTION_IN_BINARY = NO; + CURRENT_PROJECT_VERSION = 2.9.1.0; DEVELOPMENT_TEAM = ""; + ENABLE_HARDENED_RUNTIME = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; @@ -479,9 +584,9 @@ GCC_WARN_UNUSED_PARAMETER = NO; INFOPLIST_FILE = "Wineskin-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; - MACOSX_DEPLOYMENT_TARGET = 10.6; - "MACOSX_DEPLOYMENT_TARGET[sdk=macosx10.6][arch=i386]" = 10.6; - MARKETING_VERSION = 2.9.0.7; + MACOSX_DEPLOYMENT_TARGET = 10.9; + "MACOSX_DEPLOYMENT_TARGET[sdk=macosx10.6][arch=i386]" = 10.9; + MARKETING_VERSION = 2.9.1.0; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.unofficial.wineskin; PRODUCT_NAME = Wineskin; @@ -493,14 +598,19 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_ENTITLEMENTS = Wineskin.entitlements; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 2.9.0.7; + CREATE_INFOPLIST_SECTION_IN_BINARY = NO; + CURRENT_PROJECT_VERSION = 2.9.1.0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; + ENABLE_HARDENED_RUNTIME = NO; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Wineskin_Prefix.pch; @@ -513,8 +623,8 @@ GCC_WARN_UNUSED_PARAMETER = NO; INFOPLIST_FILE = "Wineskin-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; - MACOSX_DEPLOYMENT_TARGET = 10.6; - MARKETING_VERSION = 2.9.0.7; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MARKETING_VERSION = 2.9.1.0; PRODUCT_BUNDLE_IDENTIFIER = com.unofficial.wineskin; PRODUCT_NAME = Wineskin; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -531,7 +641,7 @@ GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.13; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; VALID_ARCHS = x86_64; @@ -547,7 +657,7 @@ GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.13; SDKROOT = macosx; VALID_ARCHS = x86_64; }; diff --git a/WineskinApp/Wineskin.xcodeproj/xcshareddata/xcschemes/Wineskin.xcscheme b/WineskinApp/Wineskin.xcodeproj/xcshareddata/xcschemes/Wineskin.xcscheme index a1d551b..03df607 100644 --- a/WineskinApp/Wineskin.xcodeproj/xcshareddata/xcschemes/Wineskin.xcscheme +++ b/WineskinApp/Wineskin.xcodeproj/xcshareddata/xcschemes/Wineskin.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - - #import "NSExeSelection.h" - #import "NSPortManager.h" - #import "NSPathUtilities.h" @implementation NSExeSelection diff --git a/WineskinLauncher/NSPathUtilities.h b/WineskinLauncher/NSPathUtilities.h index 60f7ffc..d874e63 100755 --- a/WineskinLauncher/NSPathUtilities.h +++ b/WineskinLauncher/NSPathUtilities.h @@ -8,7 +8,6 @@ #ifndef NSPathUtilities_Class #define NSPathUtilities_Class - #import @interface NSPathUtilities : NSObject diff --git a/WineskinLauncher/NSPortDataLoader.h b/WineskinLauncher/NSPortDataLoader.h index 52bc8b1..cd9e834 100755 --- a/WineskinLauncher/NSPortDataLoader.h +++ b/WineskinLauncher/NSPortDataLoader.h @@ -7,7 +7,6 @@ // #import - #import "NSPortManager.h" @interface NSPortDataLoader : NSObject diff --git a/WineskinLauncher/NSPortDataLoader.m b/WineskinLauncher/NSPortDataLoader.m index 20a0bb3..7394d6b 100644 --- a/WineskinLauncher/NSPortDataLoader.m +++ b/WineskinLauncher/NSPortDataLoader.m @@ -8,7 +8,6 @@ #import "NSPortDataLoader.h" #import - #import "NSPathUtilities.h" @implementation NSPortDataLoader diff --git a/WineskinLauncher/NSPortManager.m b/WineskinLauncher/NSPortManager.m index 86547f7..8cb6957 100644 --- a/WineskinLauncher/NSPortManager.m +++ b/WineskinLauncher/NSPortManager.m @@ -7,19 +7,14 @@ // #import "NSPortManager.h" - #import - #import "NSExeSelection.h" #import "NSPathUtilities.h" - #import "NSPortDataLoader.h" #define SMALLER_ICONSET_NEEDED_SIZE 16 #define BIGGEST_ICONSET_NEEDED_SIZE 1024 - #define TIFF2ICNS_ICON_SIZE 512 - #define DESKTOP_FOLDER [NSString stringWithFormat:@"%@/Desktop/",NSHomeDirectory()] #define NOTHING_EXE_PATH @"C:/nothing.exe" diff --git a/WineskinLauncher/NSWineskinEngine.h b/WineskinLauncher/NSWineskinEngine.h index 6875601..e879814 100755 --- a/WineskinLauncher/NSWineskinEngine.h +++ b/WineskinLauncher/NSWineskinEngine.h @@ -31,13 +31,13 @@ typedef enum { @property (nonatomic, strong) NSString* complement; @property (nonatomic) NSWineskinEngineType engineType; @property (nonatomic) BOOL is64Bit; - + +(NSWineskinEngine*)wineskinEngineWithString:(NSString*)engineString; +(NSWineskinEngine*)wineskinEngineOfType:(NSWineskinEngineType)engineType is64Bit:(BOOL)is64Bit ofVersion:(NSString*)version withComplement:(NSString*)complement; +(NSWineskinEngine*)wineskinEngineOfPortAtPath:(NSString*)path; - + -(NSString*)engineName; -(BOOL)isCompatibleWithMacDriver; -(BOOL)isMacDriverDefaultGraphics; diff --git a/WineskinLauncher/NSWineskinEngine.m b/WineskinLauncher/NSWineskinEngine.m index ef1d97b..0811dfa 100755 --- a/WineskinLauncher/NSWineskinEngine.m +++ b/WineskinLauncher/NSWineskinEngine.m @@ -7,14 +7,11 @@ // #import "NSWineskinEngine.h" - #import "NSPortManager.h" #import "NSPathUtilities.h" #define MINIMUM_ENGINE_NAME_LENGTH 4 - #define IDENTIFIER_PREFIX_LENGTH 2 - #define DEFAULT_WINESKIN_ENGINE_IDENTIFIER @"WS" #define DEFAULT_WINESKIN_ENGINE_VERSION 9 @@ -314,7 +311,7 @@ +(NSString*)getWineskinWrapperEngineFromInfFileAtPath:(NSString*)wineInfPath ofVersion:newWrapperEngine withComplement:nil].engineName; } } - + +(NSWineskinEngine*)wineskinEngineOfPortAtPath:(NSString*)path { NSString* firstEngine = [self getWineskinWrapperEngineFromVersionFileOfPortAtPath:path]; diff --git a/WineskinLauncher/Wineskin.icns b/WineskinLauncher/Wineskin.icns new file mode 100644 index 0000000..bb9f9ef Binary files /dev/null and b/WineskinLauncher/Wineskin.icns differ diff --git a/WineskinLauncher/WineskinLauncher.entitlements b/WineskinLauncher/WineskinLauncher.entitlements index 0c67376..8f0743f 100644 --- a/WineskinLauncher/WineskinLauncher.entitlements +++ b/WineskinLauncher/WineskinLauncher.entitlements @@ -1,5 +1,10 @@ - + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.automation.apple-events + + diff --git a/WineskinLauncher/WineskinLauncher.xcodeproj/project.pbxproj b/WineskinLauncher/WineskinLauncher.xcodeproj/project.pbxproj index 0e8732e..7f8b3c3 100644 --- a/WineskinLauncher/WineskinLauncher.xcodeproj/project.pbxproj +++ b/WineskinLauncher/WineskinLauncher.xcodeproj/project.pbxproj @@ -19,7 +19,7 @@ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; A1A1154F21F3E71400D5A97F /* NSFileManager+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = A1A1154E21F3E71400D5A97F /* NSFileManager+Extension.m */; }; A1A6E5A821E29DC200C70E80 /* ObjectiveC_Extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A17FC0372168E09800577991 /* ObjectiveC_Extension.framework */; }; - A1A6E5A921E29DC200C70E80 /* ObjectiveC_Extension.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A17FC0372168E09800577991 /* ObjectiveC_Extension.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + A1A6E5A921E29DC200C70E80 /* ObjectiveC_Extension.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A17FC0372168E09800577991 /* ObjectiveC_Extension.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; A8C23E5A18DB810500ACD355 /* WineStart.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C23E5918DB810500ACD355 /* WineStart.m */; }; /* End PBXBuildFile section */ @@ -373,11 +373,13 @@ C01FCF4B08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = x86_64; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = WineskinLauncher.entitlements; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; + CREATE_INFOPLIST_SECTION_IN_BINARY = NO; DEVELOPMENT_TEAM = ""; GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; @@ -387,10 +389,12 @@ INFOPLIST_FILE = "WineskinLauncher-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.unofficial.wineskinlauncher; PRODUCT_NAME = WineskinLauncher; PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; VALID_ARCHS = x86_64; }; name = Debug; @@ -398,10 +402,12 @@ C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = x86_64; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = WineskinLauncher.entitlements; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; + CREATE_INFOPLIST_SECTION_IN_BINARY = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; GCC_MODEL_TUNING = G5; @@ -410,10 +416,12 @@ INFOPLIST_FILE = "WineskinLauncher-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.unofficial.wineskinlauncher; PRODUCT_NAME = WineskinLauncher; PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; VALID_ARCHS = x86_64; }; name = Release; @@ -450,7 +458,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; VALID_ARCHS = x86_64; @@ -487,7 +495,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = NO; SDKROOT = macosx; VALID_ARCHS = x86_64; diff --git a/WineskinLauncher/WineskinLauncher.xcodeproj/xcshareddata/xcschemes/WineskinLauncher.xcscheme b/WineskinLauncher/WineskinLauncher.xcodeproj/xcshareddata/xcschemes/WineskinLauncher.xcscheme index 851727d..686c42d 100644 --- a/WineskinLauncher/WineskinLauncher.xcodeproj/xcshareddata/xcschemes/WineskinLauncher.xcscheme +++ b/WineskinLauncher/WineskinLauncher.xcodeproj/xcshareddata/xcschemes/WineskinLauncher.xcscheme @@ -40,9 +40,9 @@ /dev/null 2>&1",xRes,yRes]]; @@ -1189,7 +1126,7 @@ - (void)startXQuartz CFUserNotificationDisplayNotice(0, 0, NULL, NULL, NULL, CFSTR("ERROR"), CFSTR("Error: XQuartz cannot already be running if using Override Fullscreen option!\n\nPlease close XQuartz and try again!"), NULL); [fm removeItemAtPath:lockfile]; [fm removeItemAtPath:tmpFolder]; - [fm removeItemAtPath:tmpwineFolder]; + //[fm removeItemAtPath:tmpwineFolder]; [NSApp terminate:nil]; } @@ -1353,951 +1290,9 @@ - (BOOL)isPID:(NSString *)pid named:(NSString *)name - (BOOL)isWineserverRunning { - //return ([[self systemCommand:[NSString stringWithFormat:@"killall -0 \"%@\" 2>&1",wineServerName]] length] < 1); - return ([[self systemCommand:[NSString stringWithFormat:@"killall -0 \"wineserver\" 2>&1"]] length] < 1); - -} - -// Checks to see what wine engine is being used -- (void)fixWineExecutableNames -{ - - //wine64 - if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64",pathToWineBinFolder]] && ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine",pathToWineBinFolder]] && ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]] && ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]] && ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]) - { - [self fixWine64_No_Wine32_ExecutableNames]; - } - - - //wine32on64-preloader, wine-preloader without wine64-preloader - else if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]] && [fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]] && - ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]) - { - [self fixWine32on64ExecutableNames]; - } - - - - - - //wine64-preloader without wine32on64-preloader & wine-preloader - else if (![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]] && ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]] && - [fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]) - { - [ self fixWinestaging64_No_Wine32_ExecutableNames]; - } - - - - //wine32on64-preloader, without wine-preloader & wine64-preloader - else if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]] && ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]] && - ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]) - { - [self fixWine32on64_No_Wine32_ExecutableNames]; - } - - - //wine32on64-preloader, & wine64-preloader without wine-preloader - else if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]] && [fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]] && ![fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]]) - { - [self fixWine32on64_64Bit_No_Wine32_ExecutableNames]; - } - - - //wine32on64-preloader, wine-preloader with wine64-preloader - else if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]] && [fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]] && - [fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]) - { - [self fixWine32on64_64BitExecutableNames]; - } - - //wine64-preloader and wine-preloader - else if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]] && [fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]]) - { - [self fixWineStaging64ExecutableNames]; - } - - //wine64 and wine - else if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine64",pathToWineBinFolder]] && [fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine",pathToWineBinFolder]]) - { - [self fixWine64ExecutableNames]; - } - - //wine-preloader only - else if ([fm fileExistsAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]]) - { - [self fixWineStagingExecutableNames]; - } - - //wine - else - { - [self fixWine32ExecutableNames]; - } - -} - -- (void)fixWine32ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWineName = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine"]) - { - oldWineName = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWineName == nil) - { - oldWineName=@"wine"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWineName hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wineName = [NSString stringWithFormat:@"%@",oldWineName]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wineName = [NSString stringWithFormat:@"%@%dWine",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wineBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineName]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - [wineBash writeToFile:[NSString stringWithFormat:@"%@/wine",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - -- (void)fixWine64ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWineName = nil; - NSString *oldWine64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine"]) - { - oldWineName = [NSString stringWithFormat:@"%@",item]; - - } - if ([item hasSuffix:@"Wine64"]) - { - oldWine64Name = [NSString stringWithFormat:@"%@",item]; - - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWineName == nil) - { - oldWineName=@"wine"; - } - if (oldWine64Name == nil) - { - oldWine64Name=@"wine64"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWineName hasPrefix:appName] && [oldWine64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wineName = [NSString stringWithFormat:@"%@",oldWineName]; - wine64Name = [NSString stringWithFormat:@"%@",oldWine64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine, wine64 and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wineName = [NSString stringWithFormat:@"%@%dWine",appName,bundleRandomInt1]; - wine64Name = [NSString stringWithFormat:@"%@%dWine64",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWine64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine64",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wineBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineName]; - NSString *wine64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wine64Name]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - [wineBash writeToFile:[NSString stringWithFormat:@"%@/wine",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wine64Bash writeToFile:[NSString stringWithFormat:@"%@/wine64",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - -// Wine-Staging engines only work correctly on 10.8+ systems according to wine-staging.com -// Renaming can only apply to wine-preloader for staging engines -- (void)fixWineStagingExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWineStagingName = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine-preloader"]) - { - oldWineStagingName = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWineStagingName == nil) - { - oldWineStagingName=@"wine-preloader"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWineStagingName hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wineStagingName = [NSString stringWithFormat:@"%@",oldWineStagingName]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine-preloader and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wineStagingName = [NSString stringWithFormat:@"%@%dWine-preloader",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStagingName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wineStagingBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStagingName]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - //write out bash scripts to launch wine - [wineStagingBash writeToFile:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - -// Wine-Staging engines only work correctly on 10.8+ systems according to wine-staging.com -// Renaming can only apply to wine-preloader/wine64-preloader for staging engines -- (void)fixWineStaging64ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWineStagingName = nil; - NSString *oldWineStaging64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine-preloader"]) - { - oldWineStagingName = [NSString stringWithFormat:@"%@",item]; - } - if ([item hasSuffix:@"Wine64-preloader"]) - { - oldWineStaging64Name = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWineStagingName == nil) - { - oldWineStagingName=@"wine-preloader"; - } - if (oldWineStaging64Name == nil) - { - oldWineStaging64Name=@"wine64-preloader"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWineStagingName hasPrefix:appName] && [oldWineStaging64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wineStagingName = [NSString stringWithFormat:@"%@",oldWineStagingName]; - wineStaging64Name = [NSString stringWithFormat:@"%@",oldWineStaging64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine-preloader, wine64-preloader and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wineStagingName = [NSString stringWithFormat:@"%@%dWine-preloader",appName,bundleRandomInt1]; - wineStaging64Name = [NSString stringWithFormat:@"%@%dWine64-preloader",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStagingName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStaging64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wineStagingBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStagingName]; - NSString *wineStaging64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStaging64Name]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - - [wineStagingBash writeToFile:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineStaging64Bash writeToFile:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - -// Renaming can only apply to wine-preloader/wine64-preloader -- (void)fixWine32on64ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWineStagingName = nil; - NSString *oldWine32on64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine-preloader"]) - { - oldWineStagingName = [NSString stringWithFormat:@"%@",item]; - } - if ([item hasSuffix:@"Wine32on64-preloader"]) - { - oldWine32on64Name = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWineStagingName == nil) - { - oldWineStagingName=@"wine-preloader"; - } - if (oldWine32on64Name == nil) - { - oldWine32on64Name=@"wine32on64-preloader"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWineStagingName hasPrefix:appName] && [oldWine32on64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wineStagingName = [NSString stringWithFormat:@"%@",oldWineStagingName]; - wine32on64Name = [NSString stringWithFormat:@"%@",oldWine32on64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine-preloader, wine64-preloader and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wineStagingName = [NSString stringWithFormat:@"%@%dWine-preloader",appName,bundleRandomInt1]; - wine32on64Name = [NSString stringWithFormat:@"%@%dWine32on64-preloader",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStagingName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWine32on64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wineStagingBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStagingName]; - NSString *wine32on64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wine32on64Name]; - - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - - [wineStagingBash writeToFile:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wine32on64Bash writeToFile:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - -// Renaming can only apply to wine-preloader/wine64-preloader -- (void)fixWine32on64_64BitExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWineStagingName = nil; - NSString *oldWine32on64Name = nil; - NSString *oldWineStaging64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine-preloader"]) - { - oldWineStagingName = [NSString stringWithFormat:@"%@",item]; - } - if ([item hasSuffix:@"Wine32on64-preloader"]) - { - oldWine32on64Name = [NSString stringWithFormat:@"%@",item]; - } - if ([item hasSuffix:@"Wine64-preloader"]) - { - oldWineStaging64Name = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWineStagingName == nil) - { - oldWineStagingName=@"wine-preloader"; - } - if (oldWine32on64Name == nil) - { - oldWine32on64Name=@"wine32on64-preloader"; - } - if (oldWineStaging64Name == nil) - { - oldWineStaging64Name=@"wine64-preloader"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWineStagingName hasPrefix:appName] && [oldWine32on64Name hasPrefix:appName] && [oldWineStaging64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wineStagingName = [NSString stringWithFormat:@"%@",oldWineStagingName]; - wine32on64Name = [NSString stringWithFormat:@"%@",oldWine32on64Name]; - wineStaging64Name = [NSString stringWithFormat:@"%@",oldWineStaging64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine-preloader, wine64-preloader and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wineStagingName = [NSString stringWithFormat:@"%@%dWine-preloader",appName,bundleRandomInt1]; - wine32on64Name = [NSString stringWithFormat:@"%@%dWine32on64-preloader",appName,bundleRandomInt1]; - wineStaging64Name = [NSString stringWithFormat:@"%@%dWine64-preloader",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStagingName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStagingName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWine32on64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStaging64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wineStagingBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStagingName]; - NSString *wine32on64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wine32on64Name]; - NSString *wineStaging64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStaging64Name]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - - [wineStagingBash writeToFile:[NSString stringWithFormat:@"%@/wine-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wine32on64Bash writeToFile:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineStaging64Bash writeToFile:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - - - -//TODO: add more definitions - -- (void)fixWine64_No_Wine32_ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWine64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine64"]) - { - oldWine64Name = [NSString stringWithFormat:@"%@",item]; - - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWine64Name == nil) - { - oldWine64Name=@"wine64"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWine64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wine64Name = [NSString stringWithFormat:@"%@",oldWine64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine, wine64 and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wine64Name = [NSString stringWithFormat:@"%@%dWine64",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWine64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine64",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wine64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wine64Name]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - [wine64Bash writeToFile:[NSString stringWithFormat:@"%@/wine64",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; } - - - -//fix wine32on64-prelodare without wine & wine64 -// Renaming can only apply to wine-preloader/wine64-preloader -- (void)fixWinestaging64_No_Wine32_ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWineStaging64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine64-preloader"]) - { - oldWineStaging64Name = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWineStaging64Name == nil) - { - oldWineStaging64Name=@"wine64-preloader"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWineStaging64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wineStaging64Name = [NSString stringWithFormat:@"%@",oldWineStaging64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine-preloader, wine64-preloader and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wineStaging64Name = [NSString stringWithFormat:@"%@%dWine64-preloader",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStaging64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wineStaging64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStaging64Name]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - [wineStaging64Bash writeToFile:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - - - - - -//fix wine32on64-prelodare without wine & wine64 -// Renaming can only apply to wine-preloader/wine64-preloader -- (void)fixWine32on64_No_Wine32_ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWine32on64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine32on64-preloader"]) - { - oldWine32on64Name = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWine32on64Name == nil) - { - oldWine32on64Name=@"wine32on64-preloader"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWine32on64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wine32on64Name = [NSString stringWithFormat:@"%@",oldWine32on64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine-preloader, wine64-preloader and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wine32on64Name = [NSString stringWithFormat:@"%@%dWine32on64-preloader",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWine32on64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wine32on64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wine32on64Name]; - - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - - [wine32on64Bash writeToFile:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - - - -//fix wine32on64-prelodare & wine64 without wine -- (void)fixWine32on64_64Bit_No_Wine32_ExecutableNames -{ - BOOL fixWine=YES; - NSString *oldWine32on64Name = nil; - NSString *oldWineStaging64Name = nil; - NSString *oldWineServerName = nil; - NSArray *engineBinContents = [fm contentsOfDirectoryAtPath:pathToWineBinFolder]; - for (NSString *item in engineBinContents) - { - if ([item hasSuffix:@"Wine32on64-preloader"]) - { - oldWine32on64Name = [NSString stringWithFormat:@"%@",item]; - } - if ([item hasSuffix:@"Wine64-preloader"]) - { - oldWineStaging64Name = [NSString stringWithFormat:@"%@",item]; - } - else if ([item hasSuffix:@"Wineserver"]) - { - oldWineServerName = [NSString stringWithFormat:@"%@",item]; - } - } - if (oldWine32on64Name == nil) - { - oldWine32on64Name=@"wine32on64-preloader"; - } - if (oldWineStaging64Name == nil) - { - oldWineStaging64Name=@"wine64-preloader"; - } - if (oldWineServerName == nil) - { - oldWineServerName=@"wineserver"; - } - if ([oldWine32on64Name hasPrefix:appName] && [oldWineStaging64Name hasPrefix:appName] && [oldWineServerName hasPrefix:appName]) - { - fixWine=NO; - wine32on64Name = [NSString stringWithFormat:@"%@",oldWine32on64Name]; - wineStaging64Name = [NSString stringWithFormat:@"%@",oldWineStaging64Name]; - wineServerName = [NSString stringWithFormat:@"%@",oldWineServerName]; - } - - if (fixWine == false) return; - - // set CFBundleID too - srand((unsigned)time(0)); - bundleRandomInt1 = (int)(rand()%999999999); - if (bundleRandomInt1 < 0) - { - bundleRandomInt1 = bundleRandomInt1*(-1); - } - - //set names for wine-preloader, wine64-preloader and wineserver - wineServerName = [NSString stringWithFormat:@"%@%dWineserver",appName,bundleRandomInt1]; - wine32on64Name = [NSString stringWithFormat:@"%@%dWine32on64-preloader",appName,bundleRandomInt1]; - wineStaging64Name = [NSString stringWithFormat:@"%@%dWine64-preloader",appName,bundleRandomInt1]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWine32on64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wine32on64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineStaging64Name] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineStaging64Name]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - [fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,oldWineServerName] - toPath:[NSString stringWithFormat:@"%@/%@",pathToWineBinFolder,wineServerName]]; - - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder]]; - - NSString* binBash = @"#!/bin/bash\n"; - NSString* dyldFallbackLibraryPath = @"DYLD_FALLBACK_LIBRARY_PATH=\"${WINESKIN_LIB_PATH_FOR_FALLBACK}\""; - - NSString *wine32on64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wine32on64Name]; - NSString *wineStaging64Bash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineStaging64Name]; - NSString *wineServerBash = [NSString stringWithFormat:@"%@ %@ \"$(dirname \"$0\")/%@\" \"$@\"", - binBash,dyldFallbackLibraryPath,wineServerName]; - - [wine32on64Bash writeToFile:[NSString stringWithFormat:@"%@/wine32on64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineStaging64Bash writeToFile:[NSString stringWithFormat:@"%@/wine64-preloader",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - [wineServerBash writeToFile:[NSString stringWithFormat:@"%@/wineserver",pathToWineBinFolder] atomically:YES encoding:NSUTF8StringEncoding]; - - [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@\"",pathToWineBinFolder]]; -} - - - - (void)wineBootStuckProcess { //kills Wine if a Wine process is stuck with 90%+ usage. Very hacky work around @@ -2357,7 +1352,7 @@ - (void)startWine:(WineStart *)wineStartInfo //calling wineboot is a simple builtin refresh that needs to NOT prompt for gecko NSString *mshtmlLine; - if ([wssCommand isEqualToString:@"WSS-wineboot"] || [[self.portManager plistObjectForKey:WINESKIN_WRAPPER_PLIST_KEY_DISABLE_MONO_GECKO] intValue] == 1 ) + if ([wssCommand isEqualToString:@"WSS-wineboot"] || [[self.portManager plistObjectForKey:WINESKIN_WRAPPER_PLIST_KEY_DISABLE_MONO] intValue] == 1 ) { mshtmlLine = @"export WINEDLLOVERRIDES=\"mscoree,mshtml=\";"; } @@ -2370,9 +1365,9 @@ - (void)startWine:(WineStart *)wineStartInfo //launch monitor thread for killing stuck wineboots (work-a-round Macdriver bug for 1.5.28) [NSThread detachNewThreadSelector:@selector(wineBootStuckProcess) toTarget:self withObject:nil]; NSArray* command = @[mshtmlLine, - [NSString stringWithFormat:@"export WINESKIN_LIB_PATH_FOR_FALLBACK=\"%@\";",dyldFallBackLibraryPath], + [NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";",dyldFallBackLibraryPath], [NSString stringWithFormat:@"export WINEDEBUG=%@;",wineDebugLine], - [NSString stringWithFormat:@"export PATH=\"%@/wswine.bundle/bin:%@/wstools.bundle/bin:$PATH:/opt/local/bin:/opt/local/sbin\";",frameworksFold,frameworksFold], + [NSString stringWithFormat:@"export PATH=\"%@/:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";",pathToWineBinFolder], [NSString stringWithFormat:@"export DISPLAY=%@;",theDisplayNumber], [NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix], [NSString stringWithFormat:@"export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";"], @@ -2381,6 +1376,20 @@ - (void)startWine:(WineStart *)wineStartInfo [self systemCommand:[command componentsJoinedByString:@" "]]; usleep(3000000); + // apparently wineboot doesn't wait for the prefix to be ready + // (to reproduce, run 'wine wineboot ; ls ~/.wine' it will often return before the .reg files are present + // https://github.com/Winetricks/winetricks/commit/e9e9f9b6f0bb4289dbf5e6c2d5642c029c547eff + NSArray* postcommand = @[mshtmlLine, + [NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";",dyldFallBackLibraryPath], + [NSString stringWithFormat:@"export WINEDEBUG=%@;",wineDebugLine], + [NSString stringWithFormat:@"export PATH=\"%@/:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";",pathToWineBinFolder], + [NSString stringWithFormat:@"export DISPLAY=%@;",theDisplayNumber], + [NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix], + [NSString stringWithFormat:@"export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";"], + [NSString stringWithFormat:@"DYLD_FALLBACK_LIBRARY_PATH=\"%@\"",dyldFallBackLibraryPath], + [NSString stringWithFormat:@"wineserver -w"]]; + [self systemCommand:[postcommand componentsJoinedByString:@" "]]; + if ([wssCommand isEqualToString:@"WSS-wineprefixcreate"]) //only runs on build new wrapper, and rebuild { //make sure windows/profiles is using users folder @@ -2414,9 +1423,9 @@ - (void)startWine:(WineStart *)wineStartInfo } //load Wineskin default reg entries - NSArray* loadRegCommand = @[[NSString stringWithFormat:@"export WINESKIN_LIB_PATH_FOR_FALLBACK=\"%@\";",dyldFallBackLibraryPath], + NSArray* loadRegCommand = @[[NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";",dyldFallBackLibraryPath], [NSString stringWithFormat:@"export WINEDEBUG=%@;",wineDebugLine], - [NSString stringWithFormat:@"export PATH=\"%@/wswine.bundle/bin:%@/wstools.bundle/bin:$PATH:/opt/local/bin:/opt/local/sbin\";",frameworksFold,frameworksFold], + [NSString stringWithFormat:@"export PATH=\"%@:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";",pathToWineBinFolder], [NSString stringWithFormat:@"export DISPLAY=%@;",theDisplayNumber], [NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix], [NSString stringWithFormat:@"DYLD_FALLBACK_LIBRARY_PATH=\"%@\"",dyldFallBackLibraryPath], @@ -2556,12 +1565,13 @@ - (void)startWine:(WineStart *)wineStartInfo (winetricksCommands.count == 1 && ([winetricksCommands[0] isEqualToString:@"list"] || [winetricksCommands[0] hasPrefix:@"list-"]))) { + //TODO: Change winetricks //just getting a list of packages... X should NOT be running. - [self systemCommand:[NSString stringWithFormat:@"export WINESKIN_LIB_PATH_FOR_FALLBACK=\"%@\";export WINEDEBUG=%@;cd \"%@/\";export PATH=\"$PWD:%@/wswine.bundle/bin:$PATH:%@/wstools.bundle/bin:/opt/local/bin:/opt/local/sbin\";export DISPLAY=%@;export WINEPREFIX=\"%@\";export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";DYLD_FALLBACK_LIBRARY_PATH=\"%@\" winetricks --no-isolate %@ > \"%@/Logs/WinetricksTemp.log\"",dyldFallBackLibraryPath,wineDebugLine,winePrefix,frameworksFold,frameworksFold,theDisplayNumber,winePrefix,dyldFallBackLibraryPath,[winetricksCommands componentsJoinedByString:@" "],winePrefix]]; + [self systemCommand:[NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";export WINEDEBUG=%@;cd \"%@/../Wineskin.app/Contents/Resources\";export PATH=\"$PWD:%@:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";export DISPLAY=%@;export WINEPREFIX=\"%@\";export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";DYLD_FALLBACK_LIBRARY_PATH=\"%@\" winetricks --no-isolate %@ > \"%@/Logs/WinetricksTemp.log\"",dyldFallBackLibraryPath,wineDebugLine,contentsFold,pathToWineBinFolder,theDisplayNumber,winePrefix,dyldFallBackLibraryPath,[winetricksCommands componentsJoinedByString:@" "],winePrefix]]; } else { - [self systemCommand:[NSString stringWithFormat:@"export WINESKIN_LIB_PATH_FOR_FALLBACK=\"%@\";export WINEDEBUG=%@;cd \"%@/\";export PATH=\"$PWD:%@/wswine.bundle/bin:$PATH:%@/wstools.bundle/bin:/opt/local/bin:/opt/local/sbin\";export DISPLAY=%@;export WINEPREFIX=\"%@\";export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";%@DYLD_FALLBACK_LIBRARY_PATH=\"%@\" winetricks %@ --no-isolate \"%@\" > \"%@/Logs/Winetricks.log\" 2>&1",dyldFallBackLibraryPath,wineDebugLine,winePrefix,frameworksFold,frameworksFold,theDisplayNumber,winePrefix,[wineStartInfo getCliCustomCommands],dyldFallBackLibraryPath,silentMode,[winetricksCommands componentsJoinedByString:@"\" \""],winePrefix]]; + [self systemCommand:[NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";export WINEDEBUG=%@;cd \"%@/../Wineskin.app/Contents/Resources\";export PATH=\"$PWD:%@:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";export DISPLAY=%@;export WINEPREFIX=\"%@\";export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";%@DYLD_FALLBACK_LIBRARY_PATH=\"%@\" winetricks %@ --no-isolate \"%@\" > \"%@/Logs/Winetricks.log\" 2>&1",dyldFallBackLibraryPath,wineDebugLine,contentsFold,pathToWineBinFolder,theDisplayNumber,winePrefix,[wineStartInfo getCliCustomCommands],dyldFallBackLibraryPath,silentMode,[winetricksCommands componentsJoinedByString:@"\" \""],winePrefix]]; } usleep(5000000); // sometimes it dumps out slightly too fast... just hold for a few seconds return; @@ -2590,14 +1600,14 @@ - (void)startWine:(WineStart *)wineStartInfo if ([item hasPrefix:@"/"]) { - [self systemCommand:[NSString stringWithFormat:@"export WINESKIN_LIB_PATH_FOR_FALLBACK=\"%@\";export PATH=\"%@/wswine.bundle/bin:%@/wstools.bundle/bin:$PATH:/opt/local/bin:/opt/local/sbin\";%@export WINEDEBUG=%@;export DISPLAY=%@;export WINEPREFIX=\"%@\";%@cd \"%@/wswine.bundle/bin\";export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";DYLD_FALLBACK_LIBRARY_PATH=\"%@\" %@ start /unix \"%@\" > \"%@\" 2>&1 &", dyldFallBackLibraryPath,frameworksFold,frameworksFold, [wineStartInfo getULimitNumber], wineDebugLine, theDisplayNumber, winePrefix, [wineStartInfo getCliCustomCommands],frameworksFold, dyldFallBackLibraryPath, wineExecutable, item, wineLogFileLocal]]; + [self systemCommand:[NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";export PATH=\"%@:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";%@export WINEDEBUG=%@;export DISPLAY=%@;export WINEPREFIX=\"%@\";%@cd \"%@/wswine.bundle/bin\";export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";DYLD_FALLBACK_LIBRARY_PATH=\"%@\" %@ start /unix \"%@\" > \"%@\" 2>&1 &", dyldFallBackLibraryPath,pathToWineBinFolder, [wineStartInfo getULimitNumber], wineDebugLine, theDisplayNumber, winePrefix, [wineStartInfo getCliCustomCommands],frameworksFold, dyldFallBackLibraryPath, wineExecutable, item, wineLogFileLocal]]; } else { NSArray* launchWineCommand = @[ - [NSString stringWithFormat:@"export WINESKIN_LIB_PATH_FOR_FALLBACK=\"%@\";",dyldFallBackLibraryPath], + [NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";",dyldFallBackLibraryPath], [NSString stringWithFormat:@"%@export WINEDEBUG=%@;",[wineStartInfo getULimitNumber],wineDebugLine], - [NSString stringWithFormat:@"export PATH=\"%@/wswine.bundle/bin:%@/wstools.bundle/bin:$PATH:/opt/local/bin:/opt/local/sbin\";",frameworksFold,frameworksFold], + [NSString stringWithFormat:@"export PATH=\"%@:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";",pathToWineBinFolder], [NSString stringWithFormat:@"export DISPLAY=%@;",theDisplayNumber], [NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix], [NSString stringWithFormat:@"export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";"], @@ -2610,23 +1620,33 @@ - (void)startWine:(WineStart *)wineStartInfo } else { + //TODO: Try to launch wineserver first to force Rosetta2 to translate it + //NSArray* prelaunchWineCommand = @[ + //[NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";",dyldFallBackLibraryPath], + //[NSString stringWithFormat:@"export WINEDEBUG=%@;",wineDebugLine], + //[NSString stringWithFormat:@"export PATH=\"%@:$PATH:/opt/local/bin:/opt/local/sbin\";",pathToWineBinFolder], + //[NSString stringWithFormat:@"export DISPLAY=%@;",theDisplayNumber], + //[NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix], + //[NSString stringWithFormat:@"export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";"], + //[NSString stringWithFormat:@"%@cd \"%@\";",[wineStartInfo getCliCustomCommands],[wineStartInfo getWineRunLocation]], + //[NSString stringWithFormat:@"DYLD_FALLBACK_LIBRARY_PATH=\"%@\"",dyldFallBackLibraryPath], + //[NSString stringWithFormat:@"wineserver -p6"]]; + //system([[prelaunchWineCommand componentsJoinedByString:@" "] UTF8String]); + //usleep(125000); + //launch Wine normally //TODO: change to using NSTask check runProgram in ObjectiveC_Extension.framework NSArray* launchWineCommand = @[ - [NSString stringWithFormat:@"export WINESKIN_LIB_PATH_FOR_FALLBACK=\"%@\";",dyldFallBackLibraryPath], + [NSString stringWithFormat:@"export WINETRICKS_FALLBACK_LIBRARY_PATH=\"%@\";",dyldFallBackLibraryPath], [NSString stringWithFormat:@"export WINEDEBUG=%@;",wineDebugLine], - [NSString stringWithFormat:@"export PATH=\"%@/wswine.bundle/bin:%@/wstools.bundle/bin:$PATH:/opt/local/bin:/opt/local/sbin\";",frameworksFold,frameworksFold], + [NSString stringWithFormat:@"export PATH=\"%@:$PATH:/opt/local/bin:/opt/local/sbin\";",pathToWineBinFolder], [NSString stringWithFormat:@"export DISPLAY=%@;",theDisplayNumber], [NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix], [NSString stringWithFormat:@"export FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\";"], [NSString stringWithFormat:@"%@cd \"%@\";",[wineStartInfo getCliCustomCommands],[wineStartInfo getWineRunLocation]], [NSString stringWithFormat:@"DYLD_FALLBACK_LIBRARY_PATH=\"%@\"",dyldFallBackLibraryPath], [NSString stringWithFormat:@"%@ %@ \"%@\"%@ > \"%@\" 2>&1 &",wineExecutable, startExeLine,[wineStartInfo getWineRunFile],[wineStartInfo getProgramFlags],wineLogFileLocal]]; - - system([[launchWineCommand componentsJoinedByString:@" "] UTF8String]); - - //[self systemCommand:[launchWineCommand componentsJoinedByString:@" "]]; } NSMutableString *vdResolution = [[wineStartInfo getVdResolution] mutableCopy]; @@ -2646,15 +1666,8 @@ - (void)sleepAndMonitor { NSString* logsFolderPath = [NSString stringWithFormat:@"%@/Logs",winePrefix]; NSString *timeStampFile = [NSString stringWithFormat:@"%@/.timestamp",logsFolderPath]; - if (useGamma) - { - [self setGamma:gammaCorrection]; - } NSMutableString *newScreenReso = [[NSMutableString alloc] init]; - NSString *xRandRTempFile = @"/tmp/WineskinXrandrTempFile"; NSString *timestampChecker = [NSString stringWithFormat:@"find \"%@\" -type f -newer \"%@\"",logsFolderPath,timeStampFile]; - BOOL fixGamma = NO; - int fixGammaCounter = 0; if (fullScreenOption) { [self systemCommand:[NSString stringWithFormat:@"> \"%@\"",timeStampFile]]; @@ -2696,29 +1709,6 @@ - (void)sleepAndMonitor } } } - //check for xrandr made file in /tmp to know to do a gamma change - if (useGamma) - { - if ([fm fileExistsAtPath:xRandRTempFile]) - { - [fm removeItemAtPath:xRandRTempFile]; - - ///tmp/WineskinXrandrTempFile is written by WineskinX11 when there is a resolution change - //when this happens Gamma is set to default, so we need to fix it, but there could be a delay, so it needs to try a few times over a few moments before giving up. - //if it doesn't give up, multiple wrappers will fight eachother endlessly - fixGamma = YES; - fixGammaCounter = 0; - } - if (fixGamma) - { - [self setGamma:gammaCorrection]; - ++fixGammaCounter; - if (fixGammaCounter > 6) - { - fixGamma = NO; - } - } - } usleep(1000000); // sleeping in background 1 second } [fm removeItemAtPath:timeStampFile]; @@ -2764,9 +1754,9 @@ - (void)cleanUpAndShutDown { [fm removeItemAtPath:wineLogFile]; [fm removeItemAtPath:x11LogFile]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/Winetricks.log",winePrefix]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/Logs/Winetricks.log",winePrefix]]; - [fm removeItemAtPath:[NSString stringWithFormat:@"%@/Logs/WinetricksTemp.log",winePrefix]]; + //[fm removeItemAtPath:[NSString stringWithFormat:@"%@/Winetricks.log",winePrefix]]; + //[fm removeItemAtPath:[NSString stringWithFormat:@"%@/Logs/Winetricks.log",winePrefix]]; + //[fm removeItemAtPath:[NSString stringWithFormat:@"%@/Logs/WinetricksTemp.log",winePrefix]]; } else if (fullScreenOption) { @@ -2799,23 +1789,11 @@ - (void)cleanUpAndShutDown } //kill wine processes NSArray* command = @[ - [NSString stringWithFormat:@"export PATH=\"%@/wswine.bundle/bin:$PATH:/opt/local/bin:/opt/local/sbin\";",frameworksFold], + [NSString stringWithFormat:@"export PATH=\"%@:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\";",pathToWineBinFolder], [NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix],@"wineserver -k"]; [self systemCommand:[command componentsJoinedByString:@" "]]; usleep(3000000); - //TODO: check winesever is still running then force kill -k9 if it is - - //check if winesever is still running if it is force kill it using-k9 - if ([self isWineserverRunning]) - { - NSArray* command = @[ - [NSString stringWithFormat:@"export PATH=\"%@/wswine.bundle/bin:$PATH:/opt/local/bin:/opt/local/sbin\";",frameworksFold], - [NSString stringWithFormat:@"export WINEPREFIX=\"%@\";",winePrefix],@"wineserver -k9"]; - [self systemCommand:[command componentsJoinedByString:@" "]]; - usleep(3000000); - } - - + //Only kill XQuartz if it's still running if (useXQuartz) { @@ -2825,8 +1803,6 @@ - (void)cleanUpAndShutDown [self systemCommand:[NSString stringWithFormat:@"killall -9 \"xinit\" > /dev/null 2>&1"]]; } - - //fixes for multi-user use NSArray *tmpy3 = [fm contentsOfDirectoryAtPath:[NSString stringWithFormat:@"%@/dosdevices",winePrefix]]; for (NSString *item in tmpy3) @@ -2840,6 +1816,9 @@ - (void)cleanUpAndShutDown } [self systemCommand:[NSString stringWithFormat:@"chmod 666 \"%@/Info.plist\"",contentsFold]]; + [self systemCommand:[NSString stringWithFormat:@"chmod -h 666 \"%@/dosdevices\"",winePrefix]]; + [self systemCommand:[NSString stringWithFormat:@"chmod -h 777 \"%@/dosdevices\"",winePrefix]]; + [self systemCommand:[NSString stringWithFormat:@"chmod -R 666 \"%@/drive_c\"",winePrefix]]; [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@/drive_c\"",winePrefix]]; [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@/Logs\"",winePrefix]]; [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@/Scripts\"",winePrefix]]; @@ -2849,16 +1828,10 @@ - (void)cleanUpAndShutDown { [self systemCommand:[NSString stringWithFormat:@"chmod -R 777 \"%@/windata\"",winePrefix]]; } - - - - + //get rid of the preference file [fm removeItemAtPath:lockfile]; [fm removeItemAtPath:tmpFolder]; - - - //get rid of OS X saved state file [fm removeItemAtPath:[NSString stringWithFormat:@"%@/Library/Saved Application State/com.%@%@.wineskin.savedState",NSHomeDirectory(),[[NSNumber numberWithLong:bundleRandomInt1] stringValue],[[NSNumber numberWithLong:bundleRandomInt2] stringValue]]]; @@ -2881,9 +1854,7 @@ - (void)cleanUpAndShutDown [self systemCommand:[NSString stringWithFormat:@"launchctl remove \"%@\"",entryToRemove]]; } } - //fix permissions before closing - //[self fixWinePrefixForCurrentUser]; - [fm removeItemAtPath:tmpwineFolder]; + //[fm removeItemAtPath:tmpwineFolder]; [NSApp terminate:nil]; } @end diff --git a/WineskinLauncher/WineskinLauncher_Prefix.pch b/WineskinLauncher/WineskinLauncher_Prefix.pch index b031bd0..d2a4cb4 100644 --- a/WineskinLauncher/WineskinLauncher_Prefix.pch +++ b/WineskinLauncher/WineskinLauncher_Prefix.pch @@ -62,7 +62,7 @@ #define WINESKIN_WRAPPER_PLIST_KEY_WINETRICKS_SILENT @"Winetricks silent" #define WINESKIN_WRAPPER_PLIST_KEY_WINETRICKS_NOLOGS @"Winetricks disable logging" #define WINESKIN_WRAPPER_PLIST_KEY_ENABLE_FNTOGGLE @"IsFnToggleEnabled" -#define WINESKIN_WRAPPER_PLIST_KEY_DISABLE_MONO_GECKO @"Skip Mono & Gecko" +#define WINESKIN_WRAPPER_PLIST_KEY_DISABLE_MONO @"Skip Mono" #define WINESKIN_WRAPPER_PLIST_KEY_ENABLE_FNTOGGLE @"IsFnToggleEnabled" // Wineskin Plist values @@ -73,5 +73,9 @@ #define PLIST_PATH_WINESKIN_CUSTOM_EXE @"/Contents/Info.plist.cexe" #define PLIST_PATH_WINESKIN_WRAPPER @"/Contents/Info.plist" +// These are local paths used multiple times during the wrapper creation process that are related with Wineskin only #define WINESKIN_LIBRARY_FOLDER [NSString stringWithFormat:@"%@/Library/Application Support/Wineskin",NSHomeDirectory()] - +#define WINESKIN_LIBRARY_WRAPPER_FOLDER [NSString stringWithFormat:@"%@/Wrapper",WINESKIN_LIBRARY_FOLDER] +#define WINESKIN_LIBRARY_ENGINES_FOLDER [NSString stringWithFormat:@"%@/Engines",WINESKIN_LIBRARY_FOLDER] +#define WINESKIN_LIBRARY_ENGINE_BASE_FOLDER [NSString stringWithFormat:@"%@/EngineBase",WINESKIN_LIBRARY_FOLDER] +#define WINESKIN_LIBRARY_ENGINE_RUNTIME [NSString stringWithFormat:@"%@/Runtime",WINESKIN_LIBRARY_FOLDER] diff --git a/WineskinLauncher/en.lproj/InfoPlist.strings b/WineskinLauncher/en.lproj/InfoPlist.strings index 00476e7..b92732c 100644 --- a/WineskinLauncher/en.lproj/InfoPlist.strings +++ b/WineskinLauncher/en.lproj/InfoPlist.strings @@ -1,3 +1 @@ /* Localized versions of Info.plist keys */ - -NSHumanReadableCopyright = "This program is copyright by the Wineskin project (http://wineskin.doh123.com/), and is licensed under the terms of the LGPL (http://www.gnu.org/licenses/lgpl.html)";