Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 4888bf7

Browse files
committed
[[ ExternalsApiV5 ]] Tweaks to make iOS externals compile.
1 parent 02295eb commit 4888bf7

File tree

6 files changed

+53
-83
lines changed

6 files changed

+53
-83
lines changed

lcidlc/src/InterfaceGenerate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ static bool InterfaceGenerateVariant(InterfaceRef self, CoderRef p_coder, Handle
11431143
CoderWrite(p_coder, ", ");
11441144
CoderWrite(p_coder, "%s%s",
11451145
t_mapped_params[k] . mapper -> GetTypedef(t_mapped_params[k] . mode),
1146-
InterfaceGetReferenceSuffix(self));
1146+
t_mapped_params[k] . mode != kParameterTypeIn ? InterfaceGetReferenceSuffix(self) : "");
11471147
t_has_param = true;
11481148
}
11491149

lcidlc/src/Support.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,7 @@ static bool fetch__objc_data(const char *arg, MCVariableRef var, NSData*& r_data
26642664
return fetch__report_error(err, arg);
26652665
}
26662666

2667-
static bool fetch__objc_array(const char *arg, MCVariableRef var, NSArray**& r_array)
2667+
static bool fetch__objc_array(const char *arg, MCVariableRef var, NSArray*& r_array)
26682668
{
26692669
LCError err;
26702670
err = LCValueFetch(var, kLCValueOptionAsObjcArray, &r_array);

revtestexternal/revtestexternal-mobile.xcodeproj/project.pbxproj

Lines changed: 46 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -7,71 +7,66 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
4D1688A617AFE5570068A5C5 /* revtestexternal.lcidl in Sources */ = {isa = PBXBuildFile; fileRef = 4D1688A517AFE5570068A5C5 /* revtestexternal.lcidl */; };
11+
4D1688C217AFE6510068A5C5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1688C117AFE6510068A5C5 /* Foundation.framework */; };
12+
4D1688DD17AFE78C0068A5C5 /* revtestexternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4D1688DC17AFE78C0068A5C5 /* revtestexternal.mm */; };
1013
4D7EFE4C12E72E6F00D67888 /* revtestexternal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D7EFE4B12E72E6F00D67888 /* revtestexternal.cpp */; };
11-
4D7EFEA612E7316B00D67888 /* libexternal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D7EFE9E12E7314200D67888 /* libexternal.a */; };
12-
4D82FC7917147FF300C48403 /* libzip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D379CDB1714214A00B9037C /* libzip.a */; };
1314
/* End PBXBuildFile section */
1415

15-
/* Begin PBXContainerItemProxy section */
16-
4D379CDA1714214A00B9037C /* PBXContainerItemProxy */ = {
17-
isa = PBXContainerItemProxy;
18-
containerPortal = 4D7EFE9F12E7314B00D67888 /* libzip-mobile.xcodeproj */;
19-
proxyType = 2;
20-
remoteGlobalIDString = 4D7EFD7A12E72ABA00D67888;
21-
remoteInfo = zip;
22-
};
23-
4D379CDE1714215900B9037C /* PBXContainerItemProxy */ = {
24-
isa = PBXContainerItemProxy;
25-
containerPortal = 4D7EFE9F12E7314B00D67888 /* libzip-mobile.xcodeproj */;
26-
proxyType = 1;
27-
remoteGlobalIDString = 4D7EFD7912E72ABA00D67888;
28-
remoteInfo = zip;
16+
/* Begin PBXBuildRule section */
17+
4D1688A717AFE5570068A5C5 /* PBXBuildRule */ = {
18+
isa = PBXBuildRule;
19+
compilerSpec = com.apple.compilers.proxy.script;
20+
filePatterns = "*.lcidl";
21+
fileType = pattern.proxy;
22+
isEditable = 1;
23+
outputFiles = (
24+
"${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.lcidl.mm",
25+
);
26+
script = "${SRCROOT}/../_build/mac/${CONFIGURATION}/lcidlc ${INPUT_FILE_PATH} ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.lcidl.mm";
2927
};
30-
4D7EFE9D12E7314200D67888 /* PBXContainerItemProxy */ = {
28+
/* End PBXBuildRule section */
29+
30+
/* Begin PBXContainerItemProxy section */
31+
4D16889517AFE4160068A5C5 /* PBXContainerItemProxy */ = {
3132
isa = PBXContainerItemProxy;
32-
containerPortal = 4D7EFE9912E7314200D67888 /* libexternal-mobile.xcodeproj */;
33+
containerPortal = 4D16889117AFE4160068A5C5 /* lcidlc.xcodeproj */;
3334
proxyType = 2;
34-
remoteGlobalIDString = 4D7EFD7A12E72ABA00D67888;
35-
remoteInfo = external;
36-
};
37-
4D7EFF9912E73A9C00D67888 /* PBXContainerItemProxy */ = {
38-
isa = PBXContainerItemProxy;
39-
containerPortal = 4D7EFE9912E7314200D67888 /* libexternal-mobile.xcodeproj */;
40-
proxyType = 1;
41-
remoteGlobalIDString = 4D7EFD7912E72ABA00D67888;
42-
remoteInfo = external;
35+
remoteGlobalIDString = 4D57DF461338F14B0044FFEC /* lcidlc */;
36+
remoteInfo = lcidlc;
4337
};
4438
/* End PBXContainerItemProxy section */
4539

4640
/* Begin PBXFileReference section */
4741
4D08A2FA138FE2520081F990 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
4842
4D08A30B138FE9880081F990 /* revtestexternal.ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = revtestexternal.ios; sourceTree = "<group>"; };
43+
4D16889117AFE4160068A5C5 /* lcidlc.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = lcidlc.xcodeproj; path = ../lcidlc/lcidlc.xcodeproj; sourceTree = SOURCE_ROOT; };
44+
4D1688A517AFE5570068A5C5 /* revtestexternal.lcidl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.livecode.idl; path = revtestexternal.lcidl; sourceTree = "<group>"; };
45+
4D1688C117AFE6510068A5C5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
46+
4D1688DC17AFE78C0068A5C5 /* revtestexternal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = revtestexternal.mm; path = src/revtestexternal.mm; sourceTree = "<group>"; };
4947
4D7EFD6312E72A5A00D67888 /* Debug Mobile.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Debug Mobile.xcconfig"; path = "../rules/Debug Mobile.xcconfig"; sourceTree = SOURCE_ROOT; };
5048
4D7EFD6412E72A5A00D67888 /* Release Mobile.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Release Mobile.xcconfig"; path = "../rules/Release Mobile.xcconfig"; sourceTree = SOURCE_ROOT; };
5149
4D7EFD6512E72A5A00D67888 /* Global Mobile.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Global Mobile.xcconfig"; path = "../rules/Global Mobile.xcconfig"; sourceTree = SOURCE_ROOT; };
5250
4D7EFD7A12E72ABA00D67888 /* librevtestexternal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = librevtestexternal.a; sourceTree = BUILT_PRODUCTS_DIR; };
5351
4D7EFE4B12E72E6F00D67888 /* revtestexternal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = revtestexternal.cpp; path = src/revtestexternal.cpp; sourceTree = "<group>"; };
54-
4D7EFE9912E7314200D67888 /* libexternal-mobile.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "libexternal-mobile.xcodeproj"; path = "../libexternal/libexternal-mobile.xcodeproj"; sourceTree = SOURCE_ROOT; };
55-
4D7EFE9F12E7314B00D67888 /* libzip-mobile.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "libzip-mobile.xcodeproj"; path = "../thirdparty/libzip/libzip-mobile.xcodeproj"; sourceTree = SOURCE_ROOT; };
5652
/* End PBXFileReference section */
5753

5854
/* Begin PBXFrameworksBuildPhase section */
5955
4D7EFD7812E72ABA00D67888 /* Frameworks */ = {
6056
isa = PBXFrameworksBuildPhase;
6157
buildActionMask = 2147483647;
6258
files = (
63-
4D82FC7917147FF300C48403 /* libzip.a in Frameworks */,
64-
4D7EFEA612E7316B00D67888 /* libexternal.a in Frameworks */,
59+
4D1688C217AFE6510068A5C5 /* Foundation.framework in Frameworks */,
6560
);
6661
runOnlyForDeploymentPostprocessing = 0;
6762
};
6863
/* End PBXFrameworksBuildPhase section */
6964

7065
/* Begin PBXGroup section */
71-
4D379CD71714214A00B9037C /* Products */ = {
66+
4D16889217AFE4160068A5C5 /* Products */ = {
7267
isa = PBXGroup;
7368
children = (
74-
4D379CDB1714214A00B9037C /* libzip.a */,
69+
4D16889617AFE4160068A5C5 /* lcidlc */,
7570
);
7671
name = Products;
7772
sourceTree = "<group>";
@@ -85,6 +80,7 @@
8580
4D7EFD7B12E72ABA00D67888 /* Products */,
8681
4D08A30B138FE9880081F990 /* revtestexternal.ios */,
8782
4D08A2FA138FE2520081F990 /* libz.dylib */,
83+
4D1688C117AFE6510068A5C5 /* Foundation.framework */,
8884
);
8985
sourceTree = "<group>";
9086
};
@@ -110,27 +106,20 @@
110106
isa = PBXGroup;
111107
children = (
112108
4D7EFE4B12E72E6F00D67888 /* revtestexternal.cpp */,
109+
4D1688DC17AFE78C0068A5C5 /* revtestexternal.mm */,
110+
4D1688A517AFE5570068A5C5 /* revtestexternal.lcidl */,
113111
);
114112
name = Sources;
115113
sourceTree = "<group>";
116114
};
117115
4D7EFE9512E7312D00D67888 /* References */ = {
118116
isa = PBXGroup;
119117
children = (
120-
4D7EFE9F12E7314B00D67888 /* libzip-mobile.xcodeproj */,
121-
4D7EFE9912E7314200D67888 /* libexternal-mobile.xcodeproj */,
118+
4D16889117AFE4160068A5C5 /* lcidlc.xcodeproj */,
122119
);
123120
name = References;
124121
sourceTree = "<group>";
125122
};
126-
4D7EFE9A12E7314200D67888 /* Products */ = {
127-
isa = PBXGroup;
128-
children = (
129-
4D7EFE9E12E7314200D67888 /* libexternal.a */,
130-
);
131-
name = Products;
132-
sourceTree = "<group>";
133-
};
134123
/* End PBXGroup section */
135124

136125
/* Begin PBXHeadersBuildPhase section */
@@ -154,10 +143,9 @@
154143
4D7EFF8A12E7391000D67888 /* Build External */,
155144
);
156145
buildRules = (
146+
4D1688A717AFE5570068A5C5 /* PBXBuildRule */,
157147
);
158148
dependencies = (
159-
4D7EFF9A12E73A9C00D67888 /* PBXTargetDependency */,
160-
4D379CDF1714215900B9037C /* PBXTargetDependency */,
161149
);
162150
name = revtestexternal;
163151
productName = template;
@@ -184,12 +172,8 @@
184172
projectDirPath = "";
185173
projectReferences = (
186174
{
187-
ProductGroup = 4D7EFE9A12E7314200D67888 /* Products */;
188-
ProjectRef = 4D7EFE9912E7314200D67888 /* libexternal-mobile.xcodeproj */;
189-
},
190-
{
191-
ProductGroup = 4D379CD71714214A00B9037C /* Products */;
192-
ProjectRef = 4D7EFE9F12E7314B00D67888 /* libzip-mobile.xcodeproj */;
175+
ProductGroup = 4D16889217AFE4160068A5C5 /* Products */;
176+
ProjectRef = 4D16889117AFE4160068A5C5 /* lcidlc.xcodeproj */;
193177
},
194178
);
195179
projectRoot = "";
@@ -200,18 +184,11 @@
200184
/* End PBXProject section */
201185

202186
/* Begin PBXReferenceProxy section */
203-
4D379CDB1714214A00B9037C /* libzip.a */ = {
187+
4D16889617AFE4160068A5C5 /* lcidlc */ = {
204188
isa = PBXReferenceProxy;
205-
fileType = archive.ar;
206-
path = libzip.a;
207-
remoteRef = 4D379CDA1714214A00B9037C /* PBXContainerItemProxy */;
208-
sourceTree = BUILT_PRODUCTS_DIR;
209-
};
210-
4D7EFE9E12E7314200D67888 /* libexternal.a */ = {
211-
isa = PBXReferenceProxy;
212-
fileType = archive.ar;
213-
path = libexternal.a;
214-
remoteRef = 4D7EFE9D12E7314200D67888 /* PBXContainerItemProxy */;
189+
fileType = "compiled.mach-o.executable";
190+
path = lcidlc;
191+
remoteRef = 4D16889517AFE4160068A5C5 /* PBXContainerItemProxy */;
215192
sourceTree = BUILT_PRODUCTS_DIR;
216193
};
217194
/* End PBXReferenceProxy section */
@@ -232,7 +209,7 @@
232209
);
233210
runOnlyForDeploymentPostprocessing = 0;
234211
shellPath = /bin/sh;
235-
shellScript = "export SYMBOLS=_getXtable\nsh \"$SRCROOT/../tools/build-extension-ios.sh\"";
212+
shellScript = "sh \"$SRCROOT/../lcidlc/lclink.sh\"";
236213
showEnvVarsInLog = 0;
237214
};
238215
/* End PBXShellScriptBuildPhase section */
@@ -243,36 +220,29 @@
243220
buildActionMask = 2147483647;
244221
files = (
245222
4D7EFE4C12E72E6F00D67888 /* revtestexternal.cpp in Sources */,
223+
4D1688DD17AFE78C0068A5C5 /* revtestexternal.mm in Sources */,
224+
4D1688A617AFE5570068A5C5 /* revtestexternal.lcidl in Sources */,
246225
);
247226
runOnlyForDeploymentPostprocessing = 0;
248227
};
249228
/* End PBXSourcesBuildPhase section */
250229

251-
/* Begin PBXTargetDependency section */
252-
4D379CDF1714215900B9037C /* PBXTargetDependency */ = {
253-
isa = PBXTargetDependency;
254-
name = zip;
255-
targetProxy = 4D379CDE1714215900B9037C /* PBXContainerItemProxy */;
256-
};
257-
4D7EFF9A12E73A9C00D67888 /* PBXTargetDependency */ = {
258-
isa = PBXTargetDependency;
259-
name = external;
260-
targetProxy = 4D7EFF9912E73A9C00D67888 /* PBXContainerItemProxy */;
261-
};
262-
/* End PBXTargetDependency section */
263-
264230
/* Begin XCBuildConfiguration section */
265231
4D7EFD3B12E72A1C00D67888 /* Debug */ = {
266232
isa = XCBuildConfiguration;
267233
baseConfigurationReference = 4D7EFD6312E72A5A00D67888 /* Debug Mobile.xcconfig */;
268234
buildSettings = {
235+
OBJROOT = "$(SRCROOT)/_cache/ios/$(SDK_NAME)";
236+
SYMROOT = "$(SRCROOT)/_build/ios/$(SDK_NAME)";
269237
};
270238
name = Debug;
271239
};
272240
4D7EFD3C12E72A1C00D67888 /* Release */ = {
273241
isa = XCBuildConfiguration;
274242
baseConfigurationReference = 4D7EFD6412E72A5A00D67888 /* Release Mobile.xcconfig */;
275243
buildSettings = {
244+
OBJROOT = "$(SRCROOT)/_cache/ios/$(SDK_NAME)";
245+
SYMROOT = "$(SRCROOT)/_build/ios/$(SDK_NAME)";
276246
};
277247
name = Release;
278248
};

revtestexternal/revtestexternal.lcidl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ command revTestExternalTestPost
3535

3636
command revTestExternalTestArrays
3737

38-
use none on mac, linux, windows, android
39-
use objc on ios
38+
use none on linux, windows, android
39+
use objc on mac, ios
4040

4141
command revTestExternalTestObjcArrays
4242
in array as objc-array
4343
return objc-array
4444

4545
command revTestExternalTestObjcDictionaries
46-
in dict as objc-array
47-
return objc-array
46+
in dict as objc-dictionary
47+
return objc-dictionary
4848

4949
use none on mac, linux, windows, android, ios
5050
use java on android
31 Bytes
Binary file not shown.

rules/Global Mobile.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SYMROOT = $(SOLUTION_DIR)/_build/ios/$(SDK_NAME)
55
OBJROOT = $(SOLUTION_DIR)/_cache/ios/$(SDK_NAME)
66
CONFIGURATION_BUILD_DIR = $(SYMROOT)/$(CONFIGURATION)
77
CONFIGURATION_TEMP_DIR = $(OBJROOT)/$(CONFIGURATION)
8-
HEADER_SEARCH_PATHS = "$(SOLUTION_DIR)/libcore/include" "$(SOLUTION_DIR)/libexternal/include" "$(SOLUTION_DIR)/libexternalv1/include" "$(SOLUTION_DIR)/thirdparty/libz/include" "$(SOLUTION_DIR)/thirdparty/libpng/include" "$(SOLUTION_DIR)/thirdparty/libjpeg/include" "$(SOLUTION_DIR)/thirdparty/libpcre/include" "$(SOLUTION_DIR)/thirdparty/libxml/include" "$(SOLUTION_DIR)/engine/include" "$(SOLUTION_DIR)/thirdparty/libcairo/src" "$(SOLUTION_DIR)/thirdparty/libsqlite/include" "$(SOLUTION_DIR)/thirdparty/libmysql/include" "$(SOLUTION_DIR)/thirdparty/libgif/include" "$(SOLUTION_DIR)/thirdparty/libzip/include"
8+
HEADER_SEARCH_PATHS = "$(SOLUTION_DIR)/engine/include" "$(SOLUTION_DIR)/lcidlc/include" "$(SOLUTION_DIR)/libcore/include" "$(SOLUTION_DIR)/libexternal/include" "$(SOLUTION_DIR)/libexternalv1/include" "$(SOLUTION_DIR)/thirdparty/libz/include" "$(SOLUTION_DIR)/thirdparty/libpng/include" "$(SOLUTION_DIR)/thirdparty/libjpeg/include" "$(SOLUTION_DIR)/thirdparty/libpcre/include" "$(SOLUTION_DIR)/thirdparty/libxml/include" "$(SOLUTION_DIR)/engine/include" "$(SOLUTION_DIR)/thirdparty/libcairo/src" "$(SOLUTION_DIR)/thirdparty/libsqlite/include" "$(SOLUTION_DIR)/thirdparty/libmysql/include" "$(SOLUTION_DIR)/thirdparty/libgif/include" "$(SOLUTION_DIR)/thirdparty/libzip/include"
99
GCC_ENABLE_CPP_EXCEPTIONS = NO
1010
GCC_ENABLE_CPP_RTTI = NO
1111
GCC_THREADSAFE_STATICS = NO

0 commit comments

Comments
 (0)