Skip to content

Commit 38bfac8

Browse files
committed
Update to not use CocoaPods
This makes it easier for developers, and supports building for Homebrew. Former-commit-id: d5dc3a9
1 parent 5b4da34 commit 38bfac8

13 files changed

Lines changed: 328 additions & 175 deletions

File tree

Podfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,12 @@ Head over to [planck.fikesfarm.com](http://planck.fikesfarm.com).
1616
## Development
1717

1818
1. In the `plank-cljs` directory, do `script/build`
19-
2. Do a `pod install` in the top level.
20-
3. `open planck.xcworkspace`
19+
2. `open planck.xcodeproj`
2120

2221
### Bundling
2322

2423
For development, things are setup so that the on-disk ClojureScript compiler output is used (the `-o` or `--out` parameter). To instead have the output bundled into the binary, run `script/bundle` and then run Planck without the `--out` option.
2524

26-
### Ambly
27-
28-
In order to have Planck launch an Ambly server (so that you can connect to it with an Ambly REPL for development), pass the `--ambly-server` option to Planck.
29-
3025
# License
3126

3227
Distributed under the Eclipse Public License, which is also used by ClojureScript.

build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
#!/bin/bash
22

3-
# Set up Xcode project (currently requires CocoaPods)
4-
pod install
5-
63
# Build ClojureScript (currently requires lein)
74
cd planck-cljs
85
script/build
96
script/bundle
107
cd ..
118

129
# Xcode
13-
xcodebuild -workspace planck.xcworkspace -scheme planck -configuration Release SYMROOT=$(PWD)/build
10+
xcodebuild -project planck.xcodeproj -scheme planck -configuration Release SYMROOT=$(PWD)/build

planck.xcodeproj/project.pbxproj

Lines changed: 12 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
ED72D3D11B57D8FF00BF6EA2 /* Planck.m in Sources */ = {isa = PBXBuildFile; fileRef = ED72D3D01B57D8FF00BF6EA2 /* Planck.m */; };
1313
ED9C14901B57C21E0092866D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ED9C148F1B57C21E0092866D /* main.m */; };
1414
EDE838561B57C5E2002F56D7 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDE838551B57C5E2002F56D7 /* JavaScriptCore.framework */; };
15-
F55D335E4F75649627A52AC2 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C67726A927E96E71200D17FC /* libPods.a */; };
15+
EDEEDDA41B6FE2D000DF10C1 /* ABYContextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EDEEDDA11B6FE2D000DF10C1 /* ABYContextManager.m */; };
16+
EDEEDDA51B6FE2D000DF10C1 /* ABYUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = EDEEDDA31B6FE2D000DF10C1 /* ABYUtils.m */; };
1617
/* End PBXBuildFile section */
1718

1819
/* Begin PBXCopyFilesBuildPhase section */
@@ -28,9 +29,7 @@
2829
/* End PBXCopyFilesBuildPhase section */
2930

3031
/* Begin PBXFileReference section */
31-
37B72F5B56BF19E35DA7188F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
3232
C67726A927E96E71200D17FC /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
33-
CDF90590CB4E236DA7B7C153 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
3433
ED4919571B6EB9520084F9C5 /* linenoise.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = linenoise.c; path = planck/linenoise/linenoise.c; sourceTree = "<group>"; };
3534
ED4919581B6EB9520084F9C5 /* linenoise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = linenoise.h; path = planck/linenoise/linenoise.h; sourceTree = "<group>"; };
3635
ED51CF741B66CC6200200417 /* CljsRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CljsRuntime.h; sourceTree = "<group>"; };
@@ -40,6 +39,10 @@
4039
ED9C148C1B57C21E0092866D /* planck */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = planck; sourceTree = BUILT_PRODUCTS_DIR; };
4140
ED9C148F1B57C21E0092866D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
4241
EDE838551B57C5E2002F56D7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
42+
EDEEDDA01B6FE2D000DF10C1 /* ABYContextManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABYContextManager.h; sourceTree = "<group>"; };
43+
EDEEDDA11B6FE2D000DF10C1 /* ABYContextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABYContextManager.m; sourceTree = "<group>"; };
44+
EDEEDDA21B6FE2D000DF10C1 /* ABYUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABYUtils.h; sourceTree = "<group>"; };
45+
EDEEDDA31B6FE2D000DF10C1 /* ABYUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABYUtils.m; sourceTree = "<group>"; };
4346
/* End PBXFileReference section */
4447

4548
/* Begin PBXFrameworksBuildPhase section */
@@ -48,22 +51,12 @@
4851
buildActionMask = 2147483647;
4952
files = (
5053
EDE838561B57C5E2002F56D7 /* JavaScriptCore.framework in Frameworks */,
51-
F55D335E4F75649627A52AC2 /* libPods.a in Frameworks */,
5254
);
5355
runOnlyForDeploymentPostprocessing = 0;
5456
};
5557
/* End PBXFrameworksBuildPhase section */
5658

5759
/* Begin PBXGroup section */
58-
3179F541CE42B352129ED19F /* Pods */ = {
59-
isa = PBXGroup;
60-
children = (
61-
CDF90590CB4E236DA7B7C153 /* Pods.debug.xcconfig */,
62-
37B72F5B56BF19E35DA7188F /* Pods.release.xcconfig */,
63-
);
64-
name = Pods;
65-
sourceTree = "<group>";
66-
};
6760
35A6B03D755C734C71B409B1 /* Frameworks */ = {
6861
isa = PBXGroup;
6962
children = (
@@ -88,7 +81,6 @@
8881
ED9C148E1B57C21E0092866D /* planck */,
8982
ED4919561B6EB9180084F9C5 /* linenoise */,
9083
ED9C148D1B57C21E0092866D /* Products */,
91-
3179F541CE42B352129ED19F /* Pods */,
9284
35A6B03D755C734C71B409B1 /* Frameworks */,
9385
);
9486
sourceTree = "<group>";
@@ -104,6 +96,10 @@
10496
ED9C148E1B57C21E0092866D /* planck */ = {
10597
isa = PBXGroup;
10698
children = (
99+
EDEEDDA01B6FE2D000DF10C1 /* ABYContextManager.h */,
100+
EDEEDDA11B6FE2D000DF10C1 /* ABYContextManager.m */,
101+
EDEEDDA21B6FE2D000DF10C1 /* ABYUtils.h */,
102+
EDEEDDA31B6FE2D000DF10C1 /* ABYUtils.m */,
107103
ED9C148F1B57C21E0092866D /* main.m */,
108104
ED72D3CF1B57D8FF00BF6EA2 /* Planck.h */,
109105
ED72D3D01B57D8FF00BF6EA2 /* Planck.m */,
@@ -120,11 +116,9 @@
120116
isa = PBXNativeTarget;
121117
buildConfigurationList = ED9C14931B57C21E0092866D /* Build configuration list for PBXNativeTarget "planck" */;
122118
buildPhases = (
123-
50E7D5889101888C95568B66 /* Check Pods Manifest.lock */,
124119
ED9C14881B57C21E0092866D /* Sources */,
125120
ED9C14891B57C21E0092866D /* Frameworks */,
126121
ED9C148A1B57C21E0092866D /* CopyFiles */,
127-
E285E4D9C8F71B0E5DB617E3 /* Copy Pods Resources */,
128122
);
129123
buildRules = (
130124
);
@@ -166,45 +160,14 @@
166160
};
167161
/* End PBXProject section */
168162

169-
/* Begin PBXShellScriptBuildPhase section */
170-
50E7D5889101888C95568B66 /* Check Pods Manifest.lock */ = {
171-
isa = PBXShellScriptBuildPhase;
172-
buildActionMask = 2147483647;
173-
files = (
174-
);
175-
inputPaths = (
176-
);
177-
name = "Check Pods Manifest.lock";
178-
outputPaths = (
179-
);
180-
runOnlyForDeploymentPostprocessing = 0;
181-
shellPath = /bin/sh;
182-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
183-
showEnvVarsInLog = 0;
184-
};
185-
E285E4D9C8F71B0E5DB617E3 /* Copy Pods Resources */ = {
186-
isa = PBXShellScriptBuildPhase;
187-
buildActionMask = 2147483647;
188-
files = (
189-
);
190-
inputPaths = (
191-
);
192-
name = "Copy Pods Resources";
193-
outputPaths = (
194-
);
195-
runOnlyForDeploymentPostprocessing = 0;
196-
shellPath = /bin/sh;
197-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
198-
showEnvVarsInLog = 0;
199-
};
200-
/* End PBXShellScriptBuildPhase section */
201-
202163
/* Begin PBXSourcesBuildPhase section */
203164
ED9C14881B57C21E0092866D /* Sources */ = {
204165
isa = PBXSourcesBuildPhase;
205166
buildActionMask = 2147483647;
206167
files = (
168+
EDEEDDA41B6FE2D000DF10C1 /* ABYContextManager.m in Sources */,
207169
ED51CF761B66D64D00200417 /* CljsRuntime.m in Sources */,
170+
EDEEDDA51B6FE2D000DF10C1 /* ABYUtils.m in Sources */,
208171
ED72D3D11B57D8FF00BF6EA2 /* Planck.m in Sources */,
209172
ED4919591B6EB9520084F9C5 /* linenoise.c in Sources */,
210173
ED9C14901B57C21E0092866D /* main.m in Sources */,
@@ -293,15 +256,13 @@
293256
};
294257
ED9C14941B57C21E0092866D /* Debug */ = {
295258
isa = XCBuildConfiguration;
296-
baseConfigurationReference = CDF90590CB4E236DA7B7C153 /* Pods.debug.xcconfig */;
297259
buildSettings = {
298260
PRODUCT_NAME = "$(TARGET_NAME)";
299261
};
300262
name = Debug;
301263
};
302264
ED9C14951B57C21E0092866D /* Release */ = {
303265
isa = XCBuildConfiguration;
304-
baseConfigurationReference = 37B72F5B56BF19E35DA7188F /* Pods.release.xcconfig */;
305266
buildSettings = {
306267
PRODUCT_NAME = "$(TARGET_NAME)";
307268
};

planck.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 10 deletions
This file was deleted.

planck.xcworkspace/xcshareddata/planck.xccheckout

Lines changed: 0 additions & 65 deletions
This file was deleted.

planck/ABYContextManager.h

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#include <Foundation/Foundation.h>
2+
#include <JavaScriptCore/JavaScriptCore.h>
3+
4+
/**
5+
This class manages a `JSGlobalContextRef` instance, providing various methods for enriching
6+
the JavaScriptCore execution environment with a few extra things that are either
7+
needed or nice for ClojureScript execution.
8+
*/
9+
@interface ABYContextManager : NSObject
10+
11+
/**
12+
The context being managed.
13+
*/
14+
@property (assign, nonatomic, readonly) JSGlobalContextRef context;
15+
16+
/**
17+
Initializes with a compiler output directory, accepting an externally-created JSContext.
18+
19+
@param context the JavaScriptCore context
20+
@param compilerOutputDirectory the compiler output directory
21+
*/
22+
-(id)initWithContext:(JSGlobalContextRef)context compilerOutputDirectory:(NSURL*)compilerOutputDirectory;
23+
24+
/**
25+
Sets up global context in the managed context.
26+
Needed by foreign dependencies like React.
27+
*/
28+
- (void)setupGlobalContext;
29+
30+
/**
31+
Sets up console logging for the managed context.
32+
*/
33+
- (void)setUpConsoleLog;
34+
35+
/**
36+
Sets up timer functionality for the managed context.
37+
*/
38+
- (void)setUpTimerFunctionality;
39+
40+
/**
41+
Sets up `AMBLY_IMPORT_SCRIPT` capability for the managed context.
42+
*/
43+
- (void)setUpAmblyImportScript;
44+
45+
/**
46+
Bootstraps the JavaScript environment so that goog require is set up to work properly.
47+
Intended for use in dev when an app bundles up JavaScript files compiled using :optimizations :none.
48+
49+
@param depsFilePath the path to the deps file (associated with :output-to)
50+
@param googBasePath the path to the goog base.js file
51+
*/
52+
-(void)bootstrapWithDepsFilePath:(NSString*)depsFilePath googBasePath:(NSString*)googBasePath;
53+
54+
@end

0 commit comments

Comments
 (0)