Mercurial > xcodescriptingbridge
comparison ScriptingBridge_Xcode.lua @ 8:78830332a3be tip
Merged
author | Eric Wing <ewing@anscamobile.com> |
---|---|
date | Thu, 11 Aug 2011 15:46:13 -0700 |
parents | 7a0e6eeedd92 |
children |
comparison
equal
deleted
inserted
replaced
7:8956367af822 | 8:78830332a3be |
---|---|
36 -- negative index values represent arguments that come before the script | 36 -- negative index values represent arguments that come before the script |
37 -- we only want the arguments after the script name | 37 -- we only want the arguments after the script name |
38 -- so use a numeric for | 38 -- so use a numeric for |
39 local file_to_open = arg[1] or "MySampleProject.xcodeproj" | 39 local file_to_open = arg[1] or "MySampleProject.xcodeproj" |
40 local url_to_open = GetURLFromFileAndPath(file_to_open) | 40 local url_to_open = GetURLFromFileAndPath(file_to_open) |
41 local xcode_document = xcode_application:open(url_to_open) | 41 local xcode_document = xcode_application:open_(url_to_open) |
42 | 42 |
43 local simulator_or_device = arg[2] or "os" | 43 local simulator_or_device = arg[2] or "os" |
44 | 44 |
45 -- The sample project has "Debug" and "Release" configurations to choose from. | 45 -- The sample project has "Debug" and "Release" configurations to choose from. |
46 local build_configuration_type = "Release" | 46 local build_configuration_type = "Release" |
74 | 74 |
75 if not string.match(active_sdk, simulator_or_device) then | 75 if not string.match(active_sdk, simulator_or_device) then |
76 if "simulator" == simulator_or_device then | 76 if "simulator" == simulator_or_device then |
77 local sdk = string.gsub(active_sdk, "os", "simulator") | 77 local sdk = string.gsub(active_sdk, "os", "simulator") |
78 print("sdk", sdk) | 78 print("sdk", sdk) |
79 xcode_project:setActiveSDK(sdk) | 79 xcode_project:setActiveSDK_(sdk) |
80 else | 80 else |
81 local sdk = string.gsub(active_sdk, "simulator", "os") | 81 local sdk = string.gsub(active_sdk, "simulator", "os") |
82 print("sdk", sdk) | 82 print("sdk", sdk) |
83 xcode_project:setActiveSDK(sdk) | 83 xcode_project:setActiveSDK_(sdk) |
84 end | 84 end |
85 print("changed activeSDK", xcode_project:activeSDK()) | 85 print("changed activeSDK", xcode_project:activeSDK()) |
86 end | 86 end |
87 | 87 |
88 | 88 |