Skip to content

Commit cfea76b

Browse files
author
Mykola Tryshnivskyy
committed
Update WD iOS build config
1 parent e1f7e52 commit cfea76b

File tree

4 files changed

+87
-17
lines changed

4 files changed

+87
-17
lines changed

base.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
],
227227

228228
'sources': [
229-
'src/base/sys_info_ios.cc',
229+
'src/base/sys_info_ios.mm',
230230
],
231231
} ],
232232

build_ios.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11

22
python generate_wdversion.py
33

4-
export GYP_DEFINES="OS=ios"
4+
#export GYP_DEFINES="OS=ios"
55
#export GYP_GENERATOR_FLAGS="xcode_project_version=3.2"
66

7-
gyp --depth . -G output_dir=. -D platform=desktop -D mode=release --generator-output=out/ wd.gyp
7+
export GYP_DEFINES="SDK_ROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk"
8+
9+
gyp --depth . -G output_dir=. -D platform=desktop -D mode=release -f xcode -D OS=ios --generator-output=out/ wd.gyp
10+
11+
#xcodebuild -project out/wd.xcodeproj -arch i386 -sdk iphonesimulator

wd_build_options.gypi

+7
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,12 @@
107107
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
108108
},
109109
} ],
110+
111+
[ 'OS=="ios"', {
112+
'xcode_settings': {
113+
'SDKROOT': 'iphonesimulator',
114+
'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
115+
},
116+
}],
110117
],
111118
}

wd_test.gyp

+73-14
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
'-luserenv.lib',
6262
],
6363
} ],
64-
[ 'OS=="mac" or OS=="ios"', {
64+
[ 'OS=="mac"', {
6565
'link_settings': {
6666
'libraries': [
6767
'<(QT_LIB_PATH)/libQt5Network.a',
@@ -71,15 +71,15 @@
7171
'<(QT_LIB_PATH)/libQt5Qml.a',
7272
'<(QT_LIB_PATH)/libQt5Quick.a',
7373
'<(QT_LIB_PATH)/libQt5Xml.a',
74-
'Foundation.framework',
75-
'CoreFoundation.framework',
76-
'ApplicationServices.framework',
77-
'Security.framework',
74+
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
75+
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
76+
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
77+
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
7878
],
7979
},
80-
} ],
80+
} ],
8181
['OS=="android"', {
82-
'libraries': [
82+
'libraries': [
8383
'-L<(QT_LIB_PATH)',
8484
'-lQt5Widgets',
8585
'-lQt5Network',
@@ -92,7 +92,40 @@
9292
'-lgnustl_shared',
9393
'-llog',
9494
],
95-
} ],
95+
} ],
96+
[ 'OS=="ios"', {
97+
'link_settings': {
98+
'libraries': [
99+
'<(QT_LIB_PATH)/libQt5Network.a',
100+
'<(QT_LIB_PATH)/libQt5Gui.a',
101+
'<(QT_LIB_PATH)/libQt5Core.a',
102+
'<(QT_LIB_PATH)/libQt5Widgets.a',
103+
'<(QT_LIB_PATH)/libQt5Qml.a',
104+
'<(QT_LIB_PATH)/libQt5Quick.a',
105+
'<(QT_LIB_PATH)/libQt5V8.a',
106+
#'<(QT_LIB_PATH)/libQt5OpenGL.a',
107+
#'<(QT_LIB_PATH)/libQt5OpenGLExtensions.a',
108+
#'<(QT_LIB_PATH)/libQt5PlatformSupport.a',
109+
#'<(QT_LIB_PATH)/libQt5Script.a',
110+
#'<(QT_LIB_PATH)/../plugins/platforms/libqios.a',
111+
#'<(QT_LIB_PATH)/../plugins/platforms/libquikit.a',
112+
#'/Developer/Qt4iOS/ios-qml/IOSPluginLibs/ios-clang-release/lib/libqmlcomponectsios.a',
113+
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
114+
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
115+
'$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
116+
'$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
117+
'$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
118+
],
119+
},
120+
121+
'xcode_settings': {
122+
'TARGETED_DEVICE_FAMILY': '1,2',
123+
'CODE_SIGN_IDENTITY': 'iPhone Developer',
124+
'IPHONEOS_DEPLOYMENT_TARGET': '5.0',
125+
'ARCHS': '$(ARCHS_STANDARD_32_BIT)',
126+
'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
127+
},
128+
} ],
96129
],
97130
}, {
98131
'conditions': [
@@ -125,17 +158,35 @@
125158
'-luserenv.lib',
126159
],
127160
} ],
128-
[ 'OS=="mac" or OS=="ios"', {
161+
[ 'OS=="mac"', {
129162
'link_settings': {
130163
'libraries': [
131164
'<(QT_LIB_PATH)/QtGui.framework',
132165
'<(QT_LIB_PATH)/QtCore.framework',
133166
'<(QT_LIB_PATH)/QtNetwork.framework',
134167
'<(QT_LIB_PATH)/QtDeclarative.framework',
135-
'Foundation.framework',
136-
'CoreFoundation.framework',
137-
'ApplicationServices.framework',
138-
'Security.framework',
168+
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
169+
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
170+
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
171+
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
172+
],
173+
},
174+
} ],
175+
[ 'OS=="ios"', {
176+
'link_settings': {
177+
'libraries': [
178+
'<(QT_LIB_PATH)/QtGui.framework',
179+
'<(QT_LIB_PATH)/QtCore.framework',
180+
'<(QT_LIB_PATH)/QtNetwork.framework',
181+
'<(QT_LIB_PATH)/QtDeclarative.framework',
182+
#'<(QT_LIB_PATH)/../plugins/platforms/libqios.a',
183+
'<(QT_LIB_PATH)/../plugins/platforms/libcruikit.a',
184+
'/Developer/Qt4iOS/ios-qml/IOSPluginLibs/ios-clang-release/lib/libqmlcomponectsios.a',
185+
'<(SDK_ROOT)/System/Library/Frameworks/Foundation.framework',
186+
'<(SDK_ROOT)/System/Library/Frameworks/CoreFoundation.framework',
187+
'<(SDK_ROOT)/System/Library/Frameworks/CoreGraphics.framework',
188+
'<(SDK_ROOT)/System/Library/Frameworks/CoreText.framework',
189+
'<(SDK_ROOT)/System/Library/Frameworks/UIKit.framework',
139190
],
140191
},
141192
} ],
@@ -197,7 +248,7 @@
197248
}, {
198249
'target_name': 'test_WD_hybrid',
199250
'type': 'executable',
200-
251+
201252
'product_name': 'WebDriver',
202253

203254
'dependencies': [
@@ -228,6 +279,10 @@
228279
'src/third_party/mongoose/mongoose.c',
229280
],
230281
} ],
282+
283+
[ 'OS=="ios"', {
284+
'mac_bundle': 1,
285+
} ],
231286

232287
[ '<(QT5) == 1', {
233288
'conditions': [
@@ -285,6 +340,10 @@
285340
'src/third_party/mongoose/mongoose.c',
286341
],
287342
} ],
343+
344+
[ 'OS=="ios"', {
345+
'mac_bundle': 1,
346+
} ],
288347
],
289348

290349
} , {

0 commit comments

Comments
 (0)