Skip to content

Commit 534cd47

Browse files
committed
Added support for macOS 10.15 SDK
1 parent 616af9f commit 534cd47

File tree

2 files changed

+51
-9
lines changed

2 files changed

+51
-9
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Description
1010

1111
Many components were removed in recent versions of Xcode, the most notable being the Mac OS X 10.6 SDK, which is required to build software using the Carbon API (such as wxWidgets 2.8).
1212

13-
I made the script XcodeLegacy.sh to extract these components (the links work if you [sign in to Apple Developer](https://developer.apple.com/downloads/) first) from [Xcode 3.2.6](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg) (10.4, 10.5 and 10.6 SDKs, PPC assembler, GCC 4.0 and 4.2, LLVM-GCC 4.2), [Xcode 4.6.3](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg) (10.7 SDK), [Xcode 5.1.1](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_5.1.1/xcode_5.1.1.dmg) (10.8 SDK), [Xcode 6.4](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_6.4/Xcode_6.4.dmg) (10.9 and 10.10 SDKs), [Xcode 7.3.1](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg) (10.11 SDK), [Xcode 8.3.3](https://download.developer.apple.com/Developer_Tools/Xcode_8.3.3/Xcode8.3.3.xip) (10.12 SDK), [Xcode 9.4.1](https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip) (10.13 SDK), [Xcode 10.3](https://download.developer.apple.com/Developer_Tools/Xcode_10.3/Xcode_10.3.xip) (10.14 SDK) and install them in Xcode 4-10:
13+
I made the script XcodeLegacy.sh to extract these components (the links work if you [sign in to Apple Developer](https://developer.apple.com/downloads/) first) from [Xcode 3.2.6](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg) (10.4, 10.5 and 10.6 SDKs, PPC assembler, GCC 4.0 and 4.2, LLVM-GCC 4.2), [Xcode 4.6.3](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg) (10.7 SDK), [Xcode 5.1.1](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_5.1.1/xcode_5.1.1.dmg) (10.8 SDK), [Xcode 6.4](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_6.4/Xcode_6.4.dmg) (10.9 and 10.10 SDKs), [Xcode 7.3.1](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg) (10.11 SDK), [Xcode 8.3.3](https://download.developer.apple.com/Developer_Tools/Xcode_8.3.3/Xcode8.3.3.xip) (10.12 SDK), [Xcode 9.4.1](https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip) (10.13 SDK), [Xcode 10.3](https://download.developer.apple.com/Developer_Tools/Xcode_10.3/Xcode_10.3.xip) (10.14 SDK), [Xcode 12.1](https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip) (10.15 SDK), and install them in Xcode 4-10:
1414

1515
- GCC 4.0, GCC 4.2 and LLVM GCC 4.2 compilers
1616
- GCC 4.0, GCC 4.2 and LLVM GCC 4.2 Xcode plugins
1717
- PPC assembler
18-
- Mac OS X SDK 10.4u, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 10.12, 10.13, 10.14
18+
- Mac OS X SDK 10.4u, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 10.12, 10.13, 10.14, 10.15
1919

2020
The script also fixes a few known bugs in the 10.4, 10.5 and 10.6 SDK.
2121

@@ -53,6 +53,7 @@ Optionally, one of the following options can be passed as the *first* argument t
5353
* `-osx1012` : only install OSX 10.12 SDK
5454
* `-osx1013` : only install OSX 10.13 SDK
5555
* `-osx1014` : only install OSX 10.14 SDK
56+
* `-osx1014` : only install OSX 10.15 SDK
5657

5758

5859
Using the older SDKs
@@ -115,6 +116,7 @@ Here are the latest versions of Xcode that are known to /run/ on each OS X versi
115116
- [Xcode 8.3.3](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_8.3.3/Xcode8.3.3.xip) on macOS 10.12 (Sierra), please see note on linking below.
116117
- [Xcode 9.4.1](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip) on macOS 10.13 (High Sierra), please see note on linking below.
117118
- [Xcode 10.3](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_10.3/Xcode_10.3.xip) on macOS 10.14 (Mojave), please see note on linking below.
119+
- [Xcode 12.1](https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip) on macOS 10.15 (Catalina), please see note on linking below.
118120

119121
(*) These Xcode versions were released before 26.03.2012 and may cause an "An unknown installation error" during installation, which is due to an expired certificate. Installing these may require disabling network time sync and setting the date to 01.01.2012 before installing. Network time sync may be re-enabled after install. See [this stackexchange question](https://apple.stackexchange.com/questions/45841/xcode-4-2-snow-leopard-doesnt-install) for more details.
120122

XcodeLegacy.sh

+47-7
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ osx1011=0
4444
osx1012=0
4545
osx1013=0
4646
osx1014=0
47+
osx1015=0
4748
gotoption=0
4849
error=0
4950

@@ -105,11 +106,16 @@ while [[ $error = 0 ]] && [[ $# -gt 1 ]]; do
105106
gotoption=1
106107
shift
107108
;;
108-
-osx1014)
109+
-osx1014)
109110
osx1014=1
110111
gotoption=1
111112
shift
112113
;;
114+
-osx1015)
115+
osx1015=1
116+
gotoption=1
117+
shift
118+
;;
113119
-path=*)
114120
CUSTOM_APP="${1#*=}"
115121
shift
@@ -134,7 +140,8 @@ if [ $gotoption = 0 ]; then
134140
osx1011=1
135141
osx1012=1
136142
osx1013=1
137-
osx1014=1
143+
osx1014=1
144+
osx1015=1
138145
fi
139146

140147
if [ $# != 1 ]; then
@@ -163,7 +170,8 @@ if [ $# != 1 ]; then
163170
echo " -osx1011 : only install OSX 10.11 SDK"
164171
echo " -osx1012 : only install OSX 10.12 SDK"
165172
echo " -osx1013 : only install OSX 10.13 SDK"
166-
echo " -osx1014 : only install OSX 10.14 SDK"
173+
echo " -osx1014 : only install OSX 10.14 SDK"
174+
echo " -osx1015 : only install OSX 10.15 SDK"
167175
echo " -path=path : A alternative Xcode folder to use. Default is /Application/Xcode.app"
168176
echo " e.g. -path=/Application/Xcode_8.3.1.app"
169177
echo "Note that these can be combined. For example, to build and install the 10.9"
@@ -237,6 +245,7 @@ xc7="$(( osx1011 != 0 ))"
237245
xc8="$(( osx1012 != 0 ))"
238246
xc9="$(( osx1013 != 0 ))"
239247
xc10="$(( osx1014 != 0 ))"
248+
xc12="$(( osx1015 != 0 ))"
240249

241250
# The sole argument is the macOS version (e.g. 10.12)
242251
installSDK() {
@@ -332,14 +341,22 @@ case $1 in
332341
echo "and then run this script from within the same directory as the downloaded file"
333342
missingdmg=1
334343
fi
335-
if [ "$xc10" = 1 ] && [ ! -f Xcode_10.3.xip ]; then
344+
if [ "$xc10" = 1 ] && [ ! -f Xcode_10.3.xip ]; then
336345
echo "*** You should download Xcode 10.3. Login to:"
337346
echo " https://developer.apple.com/downloads/"
338347
echo "then download from:"
339348
echo " https://download.developer.apple.com/Developer_Tools/Xcode_10.3/Xcode_10.3.xip"
340349
echo "and then run this script from within the same directory as the downloaded file"
341350
missingdmg=1
342351
fi
352+
if [ "$xc12" = 1 ] && [ ! -f Xcode_12.1.xip ]; then
353+
echo "*** You should download Xcode 12.1. Login to:"
354+
echo " https://developer.apple.com/downloads/"
355+
echo "then download from:"
356+
echo " https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip"
357+
echo "and then run this script from within the same directory as the downloaded file"
358+
missingdmg=1
359+
fi
343360
if [ "$missingdmg" = 1 ]; then
344361
echo "*** at least one Xcode distribution is missing, cannot build packages - exiting now"
345362
exit
@@ -640,7 +657,7 @@ EOF
640657
rm -rf Xcode.app
641658
fi
642659
fi
643-
if [ "$xc10" = 1 ]; then
660+
if [ "$xc10" = 1 ]; then
644661
if [ "$osx1014" = 1 ]; then
645662
echo "Extracting Mac OS X 10.14 SDK from Xcode 10.3. Be patient - this will take some time"
646663
open Xcode_10.3.xip
@@ -652,6 +669,18 @@ EOF
652669
rm -rf Xcode.app
653670
fi
654671
fi
672+
if [ "$xc12" = 1 ]; then
673+
if [ "$osx1015" = 1 ]; then
674+
echo "Extracting Mac OS X 10.15 SDK from Xcode 12.1. Be patient - this will take some time"
675+
open Xcode_12.1.xip
676+
while [ ! -d Xcode.app ]; do
677+
sleep 5
678+
done
679+
sleep 5
680+
( (cd "Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer" || exit; rm SDKs/MacOSX10.15.sdk; mv SDKs/MacOSX.sdk SDKs/MacOSX10.15.sdk; tar cf - SDKs/MacOSX10.15.sdk) | gzip -c > Xcode1015SDK.tar.gz) && echo "*** Created Xcode1015SDK.tar.gz in directory $(pwd)"
681+
rm -rf Xcode.app
682+
fi
683+
fi
655684
rmdir "$MNTDIR"
656685
;;
657686

@@ -1101,6 +1130,10 @@ SPEC_EOF
11011130
installSDK 10.14
11021131
fi
11031132

1133+
if [ "$osx1015" = 1 ]; then
1134+
installSDK 10.15
1135+
fi
1136+
11041137
if [ "$compilers" = 1 ]; then
11051138
if [ "$gcc40" = 1 ]; then
11061139
if [ -f /usr/bin/gcc-4.0 ]; then
@@ -1243,9 +1276,12 @@ SPEC_EOF
12431276
if [ "$osx1013" = 1 ]; then
12441277
rm Xcode1013SDK.tar.gz 2>/dev/null
12451278
fi
1246-
if [ "$osx1014" = 1 ]; then
1279+
if [ "$osx1014" = 1 ]; then
12471280
rm Xcode1014SDK.tar.gz 2>/dev/null
12481281
fi
1282+
if [ "$osx1015" = 1 ]; then
1283+
rm Xcode1015SDK.tar.gz 2>/dev/null
1284+
fi
12491285

12501286
;;
12511287

@@ -1358,10 +1394,14 @@ SPEC_EOF
13581394
i=10.13
13591395
[ -f "$SDKDIR/SDKs/MacOSX${i}.sdk/legacy" ] && rm -rf "$SDKDIR/SDKs/MacOSX${i}.sdk"
13601396
fi
1361-
if [ "$osx1014" = 1 ]; then
1397+
if [ "$osx1014" = 1 ]; then
13621398
i=10.14
13631399
[ -f "$SDKDIR/SDKs/MacOSX${i}.sdk/legacy" ] && rm -rf "$SDKDIR/SDKs/MacOSX${i}.sdk"
13641400
fi
1401+
if [ "$osx1015" = 1 ]; then
1402+
i=10.15
1403+
[ -f "$SDKDIR/SDKs/MacOSX${i}.sdk/legacy" ] && rm -rf "$SDKDIR/SDKs/MacOSX${i}.sdk"
1404+
fi
13651405

13661406
if [ "$compilers" = 1 ]; then
13671407
if [ "$GCCINSTALLDIR/usr/bin/gcc" -ef "$GCCINSTALLDIR/usr/bin/clang" ]; then

0 commit comments

Comments
 (0)