forked from XLsn0w/Cydiapps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iOSOpenDev-Install.sh
628 lines (477 loc) · 18.2 KB
/
iOSOpenDev-Install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
#!/bin/bash
# --------------------------------------------------------------
# iOSOpenDev -- iOS Open Development (http://www.iOSOpenDev.com)
# Copyright (C) 2012 Spencer W.S. James <[email protected]>
# --------------------------------------------------------------
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# --------------------------------------------------------------
# iOSOpenDev is an independent project and has not been authorized, sponsored, or otherwise approved by Apple Inc.
# IOS is a registered trademark of Cisco and is used under license by Apple Inc.
# Xcode is a registered trademark of Apple Inc.
# --------------------------------------------------------------
export setCmd="set -eo pipefail"
$setCmd
# path #
export PATH=/opt/iOSOpenDev/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH
# script #
export scriptName="${0##*/}"
export scriptVer="1.2.2"
export iOSOpenDevPath="/opt/iOSOpenDev"
export backupFileExt=".iOSOpenDev"
export userName="${SUDO_USER-$USER}"
export userGroup=`id -g $userName`
export userHome=`eval echo ~$userName`
export bashProfileFiles=("$userHome/.bash_profile" "$userHome/.bash_login" "$userHome/.profile")
export tempDirsFile="`mktemp -d -t $scriptName`/tempdirs"
touch "$tempDirsFile"
unset LANG
# panic and cleanup #
function cleanup()
{
local exitCode=$?
set +e
trap - $signals
removeTempData
exit $exitCode
}
function panic()
{
local exitCode=$1
set +e
shift
[[ "$@" == "" ]] || echo "$@" >&2
exit $exitCode
}
export signals="0 1 2 3 15"
trap cleanup $signals
function removeTempData()
{
local tempDirs
if [[ -f "$tempDirsFile" ]]; then
tempDirs=(`cat "$tempDirsFile"`)
for td in "${tempDirs[@]}"; do
rm -rf "$td" || true
done
rm -rf "`dirname $tempDirsFile`" || true
fi
}
function getTempDir()
{
$setCmd
local tempDir
tempDir=`mktemp -d -t $scriptName` || \
panic $? "Failed to create temporary directory"
echo "$tempDir" >> "$tempDirsFile" || \
panic $? "Failed to echo into $tempDirsFile"
echo "$tempDir"
}
# common functions #
function downloadFile() # args: sourceUrl, targetPath
{
local sourceUrl="$1"
local targetPath="$2"
local curlPath
mkdir -p "${targetPath%/*}" || \
panic $? "Failed to make directory: ${targetPath%/*}"
curlPath=`which curl` || \
panic $? "Failed to get curl path"
"$curlPath" --silent --insecure --output "$targetPath" "$sourceUrl" || \
panic $? "Failed to download $sourceUrl to $targetPath"
}
function extractTar() # args: tarPath, outputPath
{
local tarPath="$1"
local outputPath="$2"
tar -C "$outputPath" -zxf "$tarPath" || \
panic $? "Failed to extract $tarPath to $outputPath"
}
function downloadGithubTarball() # args: url, outputDir, title
{
$setcmd
local url="$1"
local outputDir="$2"
local title="$3"
local tempDirForTar
local tempDirForFiles
local untardDir
local tarFile="file.tar.gz"
echo "Downloading $title from Github..."
tempDirForTar=`getTempDir`
tempDirForFiles=`getTempDir`
downloadFile "$url" "$tempDirForTar/$tarFile"
extractTar "$tempDirForTar/$tarFile" "$tempDirForFiles"
untardDir=`find "$tempDirForFiles/"* -type d -depth 0` || \
panic $? "Failed to get untar'ed directory name of $tempDirForTar/$tarFile"
mkdir -p "$outputDir" || \
panic $? "Failed to make directory: $outputDir"
cp -fR "$untardDir/"* "$outputDir/"
}
function changeMode()
{
local mode="$1"
local target="$2"
local recursive="$3"
local options
[[ $recursive != "true" ]] || \
options="-R"
if [[ -e "$target" ]]; then
chmod $options "$mode" "$target" || \
panic $? "Failed to change mode to $mode on $target"
fi
}
# base argument functions #
function determineUserBashProfileFile()
{
$setCmd
local f
local filePath
for f in "${bashProfileFiles[@]}"; do
if [[ -f "$f" ]]; then
filePath="$f"
echo "" >> "$f" || \
panic $? "Failed to echo into $f"
break
fi
done
if [[ $filePath == "" ]]; then
filePath="$bashProfileFiles"
touch "$filePath" || \
panic $? "Failed to touch $filePath"
chown "$userName:$userGroup" "$filePath" || \
panic $? "Failed to change owner-group of $filePath"
changeMode 0600 "$filePath"
fi
# return #
echo "$filePath"
}
function addToFileIfMissing() # args: filePath, pattern, value
{
local filePath="$1"
local pattern="$2"
local value="$3"
local doesContain
doesContain=`doesFileContain "$filePath" "$pattern"`
[[ $doesContain == "true" ]] || \
echo "$value" >> "$filePath" || \
panic $? "Failed to echo into $filePath"
}
function doesFileContain() # args: filePath, pattern
{
$setCmd
local filePath="$1"
local pattern="$2"
local perlValue
local funcReturn
perlValue=`perl -ne 'if (/'"$pattern"'/) { print "true"; exit; }' "$filePath"` || \
panic $? "Failed to perl"
if [[ $perlValue == "true" ]]; then
funcReturn="true"
else
funcReturn="false"
fi
# return #
echo $funcReturn
}
# sdk argument functions #
function getSdkProperty()
{
$setCmd
local sdk="$1"
local propertyName="$2"
propertyValue=`xcodebuild -version -sdk $sdk $propertyName` || \
panic $? "Failed to get $sdk SDK property $propertyName"
[[ $propertyValue != "" ]] || \
panic 1 "Value of $sdk SDK property $propertyName cannot be empty"
# return #
echo "$propertyValue"
}
function getPlatformName()
{
$setCmd
local sdk="$1"
local iosSdkPlatformPath
local platformDir
local platformName
iosSdkPlatformPath=`getSdkProperty $sdk PlatformPath`
platformDir="${iosSdkPlatformPath##*/}"
platformName="${platformDir%.*}"
# return #
echo "$platformName"
}
function writeDefaults()
{
local plistPath="$1"
shift 1
defaults write "${plistPath%.*}" "$@" || \
panic $? "Failed to write defaults to $plistPath"
}
function copyFile()
{
cp -f "$1" "$2" || \
panic $? "Failed to copy file $1 to $2"
}
function requireBackup()
{
[[ ! -f "$1" || -f "${1}${backupFileExt}" ]] || \
copyFile "$1" "${1}${backupFileExt}"
}
function requireFile()
{
local filePath="$1"
local touchFileIfNotFound="$2"
if [[ ! -f "$filePath" ]]; then
if [[ $touchFileIfNotFound == "true" ]]; then
touch "$filePath" || \
panic $? "Failed to touch $filePath"
else
panic 1 "File not found: $filePath"
fi
fi
}
function modifySdkSettings()
{
local sdk="$1"
local iosSdkPath
local sdkSettingsPList
iosSdkPath=`getSdkProperty $sdk Path`
# backup SDKSettings.plist
sdkSettingsPList="$iosSdkPath/SDKSettings.plist"
requireFile "$sdkSettingsPList" false
requireBackup "$sdkSettingsPList"
# change SDKSettings.plist
writeDefaults "$sdkSettingsPList" DefaultProperties "-dict-add" CODE_SIGNING_REQUIRED "-bool" NO
writeDefaults "$sdkSettingsPList" DefaultProperties "-dict-add" ENTITLEMENTS_REQUIRED "-bool" NO
writeDefaults "$sdkSettingsPList" DefaultProperties "-dict-add" AD_HOC_CODE_SIGNING_ALLOWED "-bool" YES
# fix mode
changeMode 0644 "$sdkSettingsPList"
}
function addXcodeSpecs()
{
local sdk="$1"
local platformName="$2"
local iosSdkPlatformPath
local xcspecFileNamePrefix
iosSdkPlatformPath=`getSdkProperty $sdk PlatformPath`
# get *.xcspec filename prefix
xcspecFileNamePrefix="$platformName"
[[ ! $xcspecFileNamePrefix =~ "Simulator" ]] || xcspecFileNamePrefix="iPhone Simulator "
# backup *PackageTypes.xcspec
iosPackagesTypesXCSpec="$iosSdkPlatformPath/Developer/Library/Xcode/Specifications/${xcspecFileNamePrefix}PackageTypes.xcspec"
requireFile "$iosPackagesTypesXCSpec" false
requireBackup "$iosPackagesTypesXCSpec"
# modify *PackageTypes.xcspec
addXcodeSpec "$iosPackagesTypesXCSpec" "com.apple.package-type.mach-o-executable" '{"ProductReference":{"IsLaunchable":"YES","FileType":"compiled.mach-o.executable","Name":"\$(EXECUTABLE_NAME)"},"DefaultBuildSettings":{"EXECUTABLE_NAME":"\$(EXECUTABLE_PREFIX)\$(PRODUCT_NAME)\$(EXECUTABLE_VARIANT_SUFFIX)\$(EXECUTABLE_SUFFIX)","EXECUTABLE_PATH":"\$(EXECUTABLE_NAME)","EXECUTABLE_SUFFIX":"","EXECUTABLE_PREFIX":""},"Type":"PackageType","Name":"Mach-O Executable","Identifier":"com.apple.package-type.mach-o-executable","Description":"Mach-O executable"}'
addXcodeSpec "$iosPackagesTypesXCSpec" "com.apple.package-type.mach-o-dylib" '{"ProductReference":{"IsLaunchable":"NO","FileType":"compiled.mach-o.dylib","Name":"\$(EXECUTABLE_NAME)"},"DefaultBuildSettings":{"EXECUTABLE_NAME":"\$(EXECUTABLE_PREFIX)\$(PRODUCT_NAME)\$(EXECUTABLE_VARIANT_SUFFIX)\$(EXECUTABLE_SUFFIX)","EXECUTABLE_PATH":"\$(EXECUTABLE_NAME)","EXECUTABLE_SUFFIX":"","EXECUTABLE_PREFIX":""},"Type":"PackageType","Name":"Mach-O Dynamic Library","Identifier":"com.apple.package-type.mach-o-dylib","Description":"Mach-O dynamic library"}'
# backup *ProductTypes.xcspec
iosProductTypesXCSpec="$iosSdkPlatformPath/Developer/Library/Xcode/Specifications/${xcspecFileNamePrefix}ProductTypes.xcspec"
requireFile "$iosProductTypesXCSpec" false
requireBackup "$iosProductTypesXCSpec"
# modify *ProductTypes.xcspec
addXcodeSpec "$iosProductTypesXCSpec" "com.apple.product-type.tool" '{"IconNamePrefix":"TargetExecutable","PackageTypes":["com.apple.package-type.mach-o-executable"],"Name":"Command-line Tool","Type":"ProductType","DefaultTargetName":"Command-line Tool","DefaultBuildProperties":{"REZ_EXECUTABLE":"YES","LIBRARY_FLAG_NOSPACE":"YES","FULL_PRODUCT_NAME":"\$(EXECUTABLE_NAME)","INSTALL_PATH":"\/usr\/bin","CODE_SIGNING_ALLOWED":"YES","GCC_INLINES_ARE_PRIVATE_EXTERN":"YES","GCC_SYMBOLS_PRIVATE_EXTERN":"YES","GCC_DYNAMIC_NO_PIC":"NO","FRAMEWORK_FLAG_PREFIX":"-framework","ENTITLEMENTS_ALLOWED":"YES","STRIP_STYLE":"all","EXECUTABLE_PREFIX":"","MACH_O_TYPE":"mh_execute","EXECUTABLE_SUFFIX":"","LIBRARY_FLAG_PREFIX":"-l"},"Identifier":"com.apple.product-type.tool","Class":"PBXToolProductType","Description":"Standalone command-line tool"}'
addXcodeSpec "$iosProductTypesXCSpec" "com.apple.product-type.library.dynamic" '{"IconNamePrefix":"TargetLibrary","PackageTypes":["com.apple.package-type.mach-o-dylib"],"Description":"Dynamic library","Type":"ProductType","DefaultBuildProperties":{"EXECUTABLE_SUFFIX":".\$(EXECUTABLE_EXTENSION)","PRIVATE_HEADERS_FOLDER_PATH":"\/usr\/include","REZ_EXECUTABLE":"YES","FULL_PRODUCT_NAME":"\$(EXECUTABLE_NAME)","LD_DYLIB_INSTALL_NAME":"\$(DYLIB_INSTALL_NAME_BASE:standardizepath)\/\$(EXECUTABLE_PATH)","DYLIB_COMPATIBILITY_VERSION":"1","INSTALL_PATH":"\/usr\/lib","FRAMEWORK_FLAG_PREFIX":"-framework","LIBRARY_FLAG_NOSPACE":"YES","GCC_INLINES_ARE_PRIVATE_EXTERN":"YES","CODE_SIGNING_ALLOWED":"YES","STRIP_STYLE":"debugging","EXECUTABLE_EXTENSION":"dylib","MACH_O_TYPE":"mh_dylib","DYLIB_CURRENT_VERSION":"1","PUBLIC_HEADERS_FOLDER_PATH":"\/usr\/include","DYLIB_INSTALL_NAME_BASE":"\$(INSTALL_PATH)","LIBRARY_FLAG_PREFIX":"-l"},"DefaultTargetName":"Dynamic Library","Class":"PBXDynamicLibraryProductType","Name":"Dynamic Library","Identifier":"com.apple.product-type.library.dynamic"}'
}
function addXcodeSpec()
{
local specFile="$1"
local specId="$2"
local specData="$3"
local fileContainsSpecId
local tempDir
local tempFile
local defaultsRead
fileContainsSpecId=`doesFileContain "$specFile" "$specId"`
if [[ $fileContainsSpecId == "false" ]]; then
tempDir=`getTempDir`
tempFile="$tempDir/`basename $specFile`.plist"
plutil -convert json -o "$tempFile" "$specFile" || \
panic $? "Failed to convert XCSpec file $specFile to JSON to temporary file $tempFile"
perl -i -pe 's/\]$/,'"$specData"'\]/' "$tempFile" || \
panic $? "Failed to add XCSpec to temporary file $tempFile"
plutil -convert binary1 "$tempFile" || \
panic $? "Failed to convert temporary file $tempFile to binary"
copyFile "$tempFile" "$specFile"
fi
}
function readDefaultsValue()
{
$setCmd
local plistPath="$1"
local propertyName="$2"
local value
value=`defaults read "${plistPath%.*}" "$propertyName"` || \
panic $? "Failed to read defaults property $propertyName from $plistPath"
# return #
echo "$value"
}
function addSymlinksToPathAvailableDuringBuilds()
{
local sdk="$1"
local iosSdkPlatformPath
iosSdkPlatformPath=`getSdkProperty $sdk PlatformPath`
# add symlinks to path that's available during an Xcode Build Phase Run Script
createSymlink "$iOSOpenDevPath/bin/iosod" "$iosSdkPlatformPath/Developer/usr/bin/iosod"
createSymlink "$iOSOpenDevPath/bin/ldid" "$iosSdkPlatformPath/Developer/usr/bin/ldid"
}
function createSymlink()
{
local sourcePath="$1"
local linkPath="$2"
rm -f "$linkPath" || \
panic $? "Failed to remove file: $linkPath"
ln -fhs "$sourcePath" "$linkPath" || \
panic $? "Failed to create symbolic link $linkPath -> $sourcePath"
}
function createSdkPrivateHeaderSymlinks()
{
local sdk="$1"
local iosSdkPath
local privateFWsDir
local privateFwBinaries
local fullPath
local shortPath
local sourcePath
local targetPath
iosSdkPath=`getSdkProperty $sdk Path`
[[ -d "$iosSdkPath" ]] || \
panic 1 "SDK directory not found: $iosSdkPath"
privateFWsDir="$iosSdkPath/System/Library/PrivateFrameworks"
[[ -d "$privateFWsDir" ]] || \
panic 1 "PrivateFramework directory not found: $privateFWsDir"
privateFwBinaries=($(find "$privateFWsDir" -type f -perm +111 -ipath "*.framework/*"))
for f in "${privateFwBinaries[@]}"; do
fullPath=`dirname "$f"`
shortPath="${fullPath/#$privateFWsDir}"
sourcePath="${iOSOpenDevPath}/frameworks${shortPath}/Headers"
targetPath="${fullPath}/Headers"
if [[ -d "$sourcePath" ]] && [[ ! "$sourcePath" -ef "$targetPath" ]]; then
if [[ -L "$targetPath" ]]; then
echo "Symlink already exists: $targetPath"
elif [[ -e "$targetPath" ]]; then
echo "File or directory already exists: $targetPath"
else
createSymlink "$sourcePath" "$targetPath"
fi
fi
done
}
# script functions #
function requireOptionValue()
{
[[ "$2" != "" ]] || \
panic 1 "Missing value for $1 option"
}
function showUsage()
{
panic 1 \
"$scriptName (v${scriptVer}) -- iOSOpenDev Setup
Usages:
$scriptName base
$scriptName sdk [-sdk <sdk>] [-d <directory>] [-which]
Arguments:
base Set up iOSOpenDev base, Xcode templates and private
framework header files.
sdk Set up latest iOS SDK for \"open\" development.
Options:
-sdk <sdk> SDK name and, optionally, version as one word to set
up. If version is omitted, latest version of named SDK
is used. If <sdk> is entirely omitted, latest iOS SDK is
used.
-d <directory> Set environment variable DEVELOPER_DIR to <directory> to
target specific Developer Tools. Use this option when
multiple versions of Xcode are installed.
-which Print which SDK and Developer Tools directory will be
used by default if -sdk <sdk> and -d <directory> are
not used.
"
}
# begin script ... #
devToolsDir="`xcode-select --print-path`" || \
panic $? "Failed to get Xcode developer directory"
if [[ ! -d "$DEVELOPER_DIR" ]] && [[ -d "$devToolsDir" ]]; then
export DEVELOPER_DIR="$devToolsDir"
fi
case "$1" in
base)
# get iOSOpenDev base, frameworks and templates #
mkdir -p "$iOSOpenDevPath" || \
panic $? "Failed to make directory: $iOSOpenDevPath"
downloadGithubTarball "https://nodeload.github.com/kokoabim/iOSOpenDev/tar.gz/master" "$iOSOpenDevPath" "iOSOpenDev base"
downloadGithubTarball "https://nodeload.github.com/kokoabim/iOSOpenDev-Xcode-Templates/tar.gz/master" "$iOSOpenDevPath/templates" "Xcode templates"
downloadGithubTarball "https://nodeload.github.com/kokoabim/iOSOpenDev-Framework-Header-Files/tar.gz/master" "$iOSOpenDevPath/frameworks" "framework header files"
# symlink to templates #
echo "Creating symlink to Xcode templates..."
userDevDir="$userHome/Library/Developer"
userTemplatesDir="$userDevDir/Xcode/Templates"
if [[ ! -d "$userTemplatesDir" ]]; then
mkdir -p "$userTemplatesDir" || \
panic $? "Failed to make directory: $userTemplatesDir"
chown -R "$userName:$userGroup" "$userDevDir" || \
panic $? "Failed to change ownership-group of $userDevDir"
fi
ln -fhs "$iOSOpenDevPath/templates" "$userTemplatesDir/iOSOpenDev"
# bash profile #
echo "Modifying Bash personal initialization file..."
userBashProfileFile=`determineUserBashProfileFile`
addToFileIfMissing "$userBashProfileFile" "^(export)? *iOSOpenDevPath=.*" "export iOSOpenDevPath=$iOSOpenDevPath"
addToFileIfMissing "$userBashProfileFile" "^(export)? *iOSOpenDevDevice=.*" "export iOSOpenDevDevice="
addToFileIfMissing "$userBashProfileFile" "^(export)? *PATH=.*(\\\$iOSOpenDevPath\\/bin|${iOSOpenDevPath//\//\\/}\\/bin).*" "export PATH=$iOSOpenDevPath/bin:\$PATH"
;;
sdk)
shift 1
sdk="iphoneos" # default to latest iphoneos sdk
printWhich="false"
while [[ $1 != "" ]]; do
case "$1" in
-sdk)
requireOptionValue "$1" "$2"
sdk="$2"
shift 2
;;
-d)
requireOptionValue "$1" "$2"
export DEVELOPER_DIR="$2"
[[ -d "$DEVELOPER_DIR" ]] || \
panic 1 "Directory not found: $DEVELOPER_DIR"
shift 2
;;
-which)
printWhich="true"
shift 1
;;
*) panic 1 "Invalid option: $1" ;;
esac
done
# get sdk platform-name and version
platformName=`getPlatformName "$sdk"`
sdkVersion=`getSdkProperty "$sdk" "SDKVersion"`
[[ "$printWhich" == "false" ]] || \
panic 1 "SDK: ${platformName}${sdkVersion}
Developer Tools: $DEVELOPER_DIR"
echo "Setting up $platformName $sdkVersion SDK..."
# modify SDK settings
echo "Modifying SDK settings..."
modifySdkSettings "$sdk"
# symlink to dumped private frameworks header files
echo "Symlinking to private frameworks header files..."
createSdkPrivateHeaderSymlinks "$sdk"
# add Xcode specifications
echo "Adding specifications to platform..."
addXcodeSpecs "$sdk" "$platformName"
# create symlinks so be available in PATH during Xcode builds
echo "Creating symlinks in platform bin..."
addSymlinksToPathAvailableDuringBuilds "$sdk"
;;
*) showUsage ;;
esac
# done #
exit 0