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

Commit d381857

Browse files
committed
[[ ExternalsApiV5 ]] Added standardized 'platform' macro definition to start of LiveCode.h
[[ ExternalsApiV5 ]] Added revtestexternal, sample external with project files for Mac.
1 parent b01aec5 commit d381857

File tree

7 files changed

+796
-0
lines changed

7 files changed

+796
-0
lines changed

lcidlc/include/LiveCode.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,27 @@ extern "C" {
2323

2424
////////////////////////////////////////////////////////////////////////////////
2525

26+
#if defined(_WIN64) || defined(_WIN32)
27+
#define __WINDOWS__
28+
#elif defined(__APPLE__)
29+
# include <TargetConditionals.h>
30+
# if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
31+
# define __IOS__
32+
# elif TARGET_OS_MAC
33+
# define __MAC__
34+
# else
35+
# error unsupported platform
36+
# endif
37+
#elif defined(__linux__)
38+
#define __LINUX__
39+
#elif defined(__ANDROID__)
40+
// #define __ANDROID__
41+
#else
42+
#error unsupported platform
43+
#endif
44+
45+
////////////////////////////////////////////////////////////////////////////////
46+
2647
typedef enum LCError
2748
{
2849
// No errors occured, the operation succeeded.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* Copyright (C) 2003-2013 Runtime Revolution Ltd.
2+
3+
This file is part of LiveCode.
4+
5+
LiveCode is free software; you can redistribute it and/or modify it under
6+
the terms of the GNU General Public License v3 as published by the Free
7+
Software Foundation.
8+
9+
LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY
10+
WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
16+
17+
// The name of the external (note external name must be all lowercase!)
18+
external revtestexternal
19+
20+
// This external uses C++ name mangling (by virtue of the fact the source file is obj-c++)
21+
use c++-naming
22+
// This external uses obj-c objects and autorelease pools.
23+
use objc-objects
24+
25+
// Declare the startup/shutdown routines (these are optional)
26+
on startup call revTestExternalStartup
27+
on shutdown call revTestExternalShutdown
28+
29+
command revTestExternalTestWait
30+
31+
command revTestExternalTestPost
32+
33+
command revTestExternalTestArrays
1.86 KB
Binary file not shown.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// !$*UTF8*$!
2+
{
3+
4DCD7354176B5B780033F2AB /* LiveCode */ = {
4+
isa = PBXExecutable;
5+
activeArgIndices = (
6+
YES,
7+
);
8+
argumentStrings = (
9+
"$(SRCROOT)/revtestexternal.rev",
10+
);
11+
12+
autoAttachOnCrash = 1;
13+
breakpointsEnabled = 0;
14+
configStateDict = {
15+
"PBXLSLaunchAction-0" = {
16+
PBXLSLaunchAction = 0;
17+
PBXLSLaunchStartAction = 1;
18+
PBXLSLaunchStdioStyle = 2;
19+
PBXLSLaunchStyle = 0;
20+
class = PBXLSRunLaunchConfig;
21+
commandLineArgs = (
22+
);
23+
displayName = "Executable Runner";
24+
environment = {
25+
};
26+
identifier = com.apple.Xcode.launch.runConfig;
27+
remoteHostInfo = "";
28+
startActionInfo = "";
29+
};
30+
};
31+
customDataFormattersEnabled = 1;
32+
dataTipCustomDataFormattersEnabled = 1;
33+
dataTipShowTypeColumn = 1;
34+
dataTipSortType = 0;
35+
debuggerPlugin = GDBDebugging;
36+
disassemblyDisplayState = 0;
37+
dylibVariantSuffix = "";
38+
enableDebugStr = 1;
39+
environmentEntries = (
40+
{
41+
active = YES;
42+
name = REV_TOOLS_PATH;
43+
value = "$(SOLUTION_DIR)/ide";
44+
},
45+
);
46+
executableSystemSymbolLevel = 0;
47+
executableUserSymbolLevel = 0;
48+
launchableReference = 4DCD73D1176B5FD80033F2AB /* LiveCode.app */;
49+
libgmallocEnabled = 0;
50+
name = LiveCode;
51+
savedGlobals = {
52+
};
53+
showTypeColumn = 0;
54+
sourceDirectories = (
55+
);
56+
};
57+
4DCD73D1176B5FD80033F2AB /* LiveCode-Community.app */ = {
58+
isa = PBXFileReference;
59+
path = "LiveCode-Community.app";
60+
sourceTree = BUILT_PRODUCTS_DIR;
61+
62+
};
63+
64+
E82D44CF17131C3400A10289 /* Project object */ = {
65+
activeBuildConfigurationName = Debug;
66+
activeExecutable = 4DCD7354176B5B780033F2AB /* LiveCode */;
67+
activeTarget = E82D44D617131C3400A10289 /* revtestexternal */;
68+
addToTargets = (
69+
);
70+
codeSenseManager = 4D405283176B3E7B0097F2D6 /* Code sense */;
71+
executables = (
72+
4DCD7354176B5B780033F2AB /* LiveCode */,
73+
);
74+
};
75+
E82D44D617131C3400A10289 /* revtestexternal */ = {
76+
activeExec = 0;
77+
};
78+
E82D458A1713231200A10289 /* server-revtestexternal */ = {
79+
activeExec = 0;
80+
};
81+
82+
}

0 commit comments

Comments
 (0)