Skip to content

Commit

Permalink
allow building for Intel architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
kambala-decapitator committed Aug 11, 2024
1 parent 4e4911f commit 207f9dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Whisky.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = arm64;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -718,7 +717,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = arm64;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -774,7 +772,6 @@
6E40497829CCA19D006E3F1B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Whisky/Whisky.entitlements;
Expand Down Expand Up @@ -813,7 +810,6 @@
6E40497929CCA19D006E3F1B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Whisky/Whisky.entitlements;
Expand Down Expand Up @@ -853,7 +849,6 @@
6E70A49C2A9A2197007799E9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
Expand All @@ -880,7 +875,6 @@
6E70A49D2A9A2197007799E9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
Expand Down
4 changes: 4 additions & 0 deletions WhiskyKit/Sources/WhiskyKit/Utils/Rosetta2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ public class Rosetta2 {
private static let rosetta2RuntimeBin = "/Library/Apple/usr/libexec/oah/libRosettaRuntime"

public static let isRosettaInstalled: Bool = {
#if arch(arm64)
return FileManager.default.fileExists(atPath: rosetta2RuntimeBin)
#else // Intel
return true
#endif
}()

public static func installRosetta() async throws -> Bool {
Expand Down

0 comments on commit 207f9dd

Please sign in to comment.