mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-11 19:17:07 +00:00
Update press to support new fileExecutableSearcher style.
Reviewed by me.
This commit is contained in:
1 parent
64a401125d
commit
f02286e3f5
2 files changed
+19
-7
No files matched your search
+9
-5
@@ -270,13 +270,17 @@ function pressEnvironment(rootPath, outputFiles, environment, options) {
|
||||
stream.print("Stripping extra imports from \0blue(" + path + "\0)");
|
||||
|
||||
var code = executable.code();
|
||||
var dependencies = executable.fileDependencies();
|
||||
var dependencies = executable.fileDependencies(),
|
||||
fileExecutableSearcher = executable.fileExecutableSearcher();
|
||||
for (var i = 0; i < dependencies.length; i++) {
|
||||
var dependency = dependencies[i];
|
||||
var dependencyExecutable = new _OBJJ.FileExecutableSearch(
|
||||
new analyzer.context.global.CFURL(dependency.isLocal() ? FILE.join(FILE.dirname(path), dependency.path()) : dependency.path()),
|
||||
dependency.isLocal()
|
||||
).result();
|
||||
var dependencyExecutable = nil;
|
||||
|
||||
fileExecutableSearcher(dependency.URL(), dependency.isLocal(), function(aFileExecutable)
|
||||
{
|
||||
dependencyExecutable = aFileExecutable;
|
||||
});
|
||||
|
||||
var dependencyPath = dependencyExecutable.path();
|
||||
if (!requiredFiles[dependencyPath]) {
|
||||
stream.print(" -> \0red(" + dependencyPath + "\0)");
|
||||
|
||||
@@ -187,8 +187,16 @@ ObjectiveJRuntimeAnalyzer.prototype.mergeLibraryImports = function()
|
||||
ObjectiveJRuntimeAnalyzer.prototype.executableForImport = function(path, isLocal)
|
||||
{
|
||||
if (isLocal === undefined) isLocal = true;
|
||||
var _OBJJ = this.require("objective-j");
|
||||
return new _OBJJ.FileExecutableSearch(new this.context.global.CFURL(path), isLocal).result();
|
||||
var _OBJJ = this.require("objective-j"),
|
||||
fileExecutable = nil,
|
||||
URL = new this.context.global.CFURL(path);
|
||||
|
||||
_OBJJ.Executable.fileExecutableSearcherForURL(URL)(URL, isLocal, function(/*FileExecutable*/ aFileExecutable)
|
||||
{
|
||||
fileExecutable = aFileExecutable;
|
||||
});
|
||||
|
||||
return fileExecutable;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user