41 lines
2.2 KiB
Diff
41 lines
2.2 KiB
Diff
Avoids needing xcrun or xcodebuild in PATH for native package builds
|
|
|
|
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
|
|
index a75d8ee..476440d 100644
|
|
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
|
|
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
|
|
@@ -522,7 +522,13 @@ class XcodeSettings:
|
|
# Since the CLT has no SDK paths anyway, returning None is the
|
|
# most sensible route and should still do the right thing.
|
|
try:
|
|
- return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem])
|
|
+ #return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem])
|
|
+ return {
|
|
+ "--show-sdk-platform-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform",
|
|
+ "--show-sdk-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
|
|
+ "--show-sdk-build-version": "19A547",
|
|
+ "--show-sdk-version": "10.15"
|
|
+ }[infoitem]
|
|
except GypError:
|
|
pass
|
|
|
|
@@ -1499,7 +1505,8 @@ def XcodeVersion():
|
|
version = ""
|
|
build = ""
|
|
try:
|
|
- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
|
|
+ #version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
|
|
+ version_list = []
|
|
# In some circumstances xcodebuild exits 0 but doesn't return
|
|
# the right results; for example, a user on 10.7 or 10.8 with
|
|
# a bogus path set via xcode-select
|
|
@@ -1510,7 +1517,8 @@ def XcodeVersion():
|
|
version = version_list[0].split()[-1] # Last word on first line
|
|
build = version_list[-1].split()[-1] # Last word on last line
|
|
except GypError: # Xcode not installed so look for XCode Command Line Tools
|
|
- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
|
|
+ #version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
|
|
+ version = "11.0.0.0.1.1567737322"
|
|
if not version:
|
|
raise GypError("No Xcode or CLT version detected!")
|
|
# Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
|