Skip to content

Commit

Permalink
Fix for circular dependency stuff.
Browse files Browse the repository at this point in the history
Reviewed by me.
  • Loading branch information
Francisco Ryan Tolmasky I committed Feb 3, 2009
1 parent 6671414 commit 69833f3
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 41 deletions.
30 changes: 13 additions & 17 deletions AppKit/AppKit.steam
Expand Up @@ -19,22 +19,6 @@
<string>CoreGraphics/CGContextCanvas.j</string>
<string>CoreGraphics/CGContextVML.j</string>
</array>
<key>Flags</key>
<string>-DPLATFORM_DOM</string>
</dict>
<dict>
<key>Name</key>
<string>AppKit-Rhino</string>
<key>Excluded</key>
<array>
<string>CPOutlineView.j</string>
<string>CPTableColumn.j</string>
<string>CPTableView.j</string>
<string>Themes</string>
<!-- These get compiled into CGContext -->
<string>CoreGraphics/CGContextCanvas.j</string>
<string>CoreGraphics/CGContextVML.j</string>
</array>
</dict>
</array>
<key>Configurations</key>
Expand All @@ -43,12 +27,24 @@
<key>Name</key>
<string>Debug</string>
<key>Flags</key>
<string>-DDEBUG -g</string>
<string>-DDEBUG -DPLATFORM_DOM -g</string>
</dict>
<dict>
<key>Name</key>
<string>Release</string>
<key>Flags</key>
<string>-DPLATFORM_DOM -O</string>
</dict>
<dict>
<key>Name</key>
<string>Debug-Rhino</string>
<key>Flags</key>
<string>-DDEBUG -g</string>
</dict>
<dict>
<key>Name</key>
<string>Release-Rhino</string>
<key>Flags</key>
<string>-O</string>
</dict>
</array>
Expand Down
4 changes: 2 additions & 2 deletions AppKit/build.xml
Expand Up @@ -2,7 +2,7 @@
<project name = "AppKit" default = "build" basedir = "." >

<import file = "../common.xml" />
<import file = "${env.OBJJ_LIB}/steam.xml" />
<import file = "${env.OBJJ_LIB}/steam/steam.xml" />

<property name = "Theme" value = "Default" />

Expand All @@ -25,7 +25,7 @@
</steam-build>

<steam-build>
<arg line = "-f AppKit.steam -c ${Configuration} -t AppKit-Rhino" />
<arg line = "-f AppKit.steam -c ${Configuration}-Rhino -t AppKit" />
</steam-build>

<steam-build>
Expand Down
2 changes: 1 addition & 1 deletion Foundation/build.xml
Expand Up @@ -2,7 +2,7 @@
<project name = "Foundation" default = "build" basedir = "." >

<import file = "../common.xml" />
<import file = "${env.OBJJ_LIB}/steam.xml" />
<import file = "${env.OBJJ_LIB}/steam/steam.xml" />

<target name = "clean" depends = "steam-uptodate">
<steam-build>
Expand Down
8 changes: 8 additions & 0 deletions Objective-J/file.js
Expand Up @@ -135,6 +135,14 @@ objj_search.prototype.attemptNextSearchPath = function()
if (file)
{
objj_alert("The file request at " + this.filePath + " has already been downloaded at " + searchPath);
// FIXME: Do we need this for everything?
#if RHINO
var index = 0,
count = this.searchedPaths.length;

for (; index < count; ++index)
objj_files[this.searchedPaths[index]] = file;
#end
if (this.didCompleteCallback)
this.didCompleteCallback(file);

Expand Down
6 changes: 3 additions & 3 deletions Tools/Utilities/bundle.js
Expand Up @@ -111,21 +111,21 @@ function loadFrameworks(frameworkPaths, aCallback)
java.lang.System.out.println("'" + frameworkPath + "' is not a framework or could not be found.");
java.lang.System.exit(1);
}

var infoDictionary = readPlist(new File(frameworkPath + "/Info.plist"));

if (dictionary_getValue(infoDictionary, "CPBundlePackageType") !== "FMWK")
{
java.lang.System.out.println("'" + frameworkPath + "' is not a framework .");
java.lang.System.exit(1);
}

var files = dictionary_getValue(infoDictionary, "CPBundleReplacedFiles"),
index = 0,
count = files.length;

for (; index < count; ++index)
files[index] = String(frameworkPath + '/' + files[index]);

importFiles(files, function() { loadFrameworks(frameworkPaths, aCallback) });
}
2 changes: 1 addition & 1 deletion Tools/nib2cib/build.xml
Expand Up @@ -2,7 +2,7 @@
<project name = "nib2cib" default = "build" basedir = "." >

<import file = "../../common.xml" />
<import file = "${env.OBJJ_LIB}/steam.xml" />
<import file = "${env.OBJJ_LIB}/steam/steam.xml" />

<property name = "Build.nib2cib" location = "${Build}/${Configuration}/nib2cib" />
<property name = "Build.nib2cib.bin" location = "${Build}/${Configuration}/nib2cib/bin" />
Expand Down
30 changes: 22 additions & 8 deletions Tools/steam/Project.js
Expand Up @@ -238,8 +238,24 @@ Project.prototype.activeFlags = function()

Project.prototype.buildTheme = function()
{
var project = this;
var project = this/*,
frameworks = NULL;
// FIXME: OBJJ_INCLUDE_PATHS ENV VAR?
if (true)
{
OBJJ_INCLUDE_PATHS = [System.getenv("STEAM_BUILD") + "/Release-Rhino/", System.getenv("STEAM_BUILD") + "/Release/"];
frameworks = [System.getenv("STEAM_BUILD") + "/Release/Foundation", System.getenv("STEAM_BUILD") + "/Release-Rhino/AppKit"];
}
else
{
OBJJ_INCLUDE_PATHS = [OBJJ_HOME + "/lib/Frameworks-Rhino"];
frameworks = [OBJJ_HOME + "/lib/Frameworks-Rhino/Foundation", OBJJ_HOME + "/lib/Frameworks-Rhino/AppKit"];
}
// Load ALL of Foundation and AppKit, be nice to people.
loadFrameworks(frameworks, function()*/

// FIXME: This should be stubbed out. It is also in objj.js
var OBJJ_LIB = OBJJ_HOME + "/lib/";

Expand All @@ -255,13 +271,11 @@ Project.prototype.buildTheme = function()
OBJJ_INCLUDE_PATHS.push(defaultFrameworks);
}

OBJJ_INCLUDE_PATHS = [System.getenv("STEAM_BUILD") + "/Release-Rhino/", System.getenv("STEAM_BUILD") + "/Release/"];

// Load ALL of Foundation and AppKit, be nice to people.
loadFrameworks([OBJJ_LIB + "/Frameworks-Rhino/Foundation", OBJJ_LIB + "/Frameworks-Rhino/AppKit"], function()
loadFrameworks([System.getenv("STEAM_BUILD") + "/Release/Foundation", System.getenv("STEAM_BUILD") + "/Release-Rhino/AppKit"], function()
{
// FIXME!
if (!objj_getClass("CPTheme"))
return;

// Get .j files
var jFiles = getFiles(project._root, "j", project.activeTarget().exclusions().concat("Frameworks/"));

Expand Down Expand Up @@ -335,7 +349,7 @@ Project.prototype.buildTheme = function()
writer.close();
});
});

serviceTimeouts();

this.copyResources();
Expand Down Expand Up @@ -391,7 +405,7 @@ Project.prototype.build = function()
if (hasModifiedJFiles)
{
// concatenate sjheader.txt and individual .o
exec(["sh", "-c", "cat '" + OBJJ_HOME + "/lib/sjheader.txt' '" + oFiles.join("' '") + "' > '" + sjFile.getCanonicalPath() + "'"], true);
exec(["sh", "-c", "cat '" + OBJJ_STEAM + "/sjheader.txt' '" + oFiles.join("' '") + "' > '" + sjFile.getCanonicalPath() + "'"], true);
}

if (shouldGzip)
Expand Down
4 changes: 3 additions & 1 deletion Tools/steam/main.js
Expand Up @@ -13,13 +13,15 @@ importClass(java.io.SequenceInputStream);

#include "Project.js"

OBJJ_STEAM = OBJJ_HOME + "/lib/steam/";

function main()
{
if (arguments.length < 1)
printUsage();

var command = Array.prototype.shift.apply(arguments);

switch (command)
{
case "create": create.apply(create, arguments);
Expand Down
14 changes: 6 additions & 8 deletions build.xml
Expand Up @@ -206,21 +206,19 @@
<include name = "Objective-J/" />
<include name = "Foundation/" />
</fileset>
</copy>

<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino}/AppKit">
<fileset dir = "${Build}/Release/AppKit-Rhino" />
<fileset dir = "${Build}/Release-Rhino/">
<include name = "AppKit/" />
</fileset>
</copy>

<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino-Debug}">
<fileset dir = "${Build}/Debug/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
</fileset>
</copy>

<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino-Debug}/AppKit">
<fileset dir = "${Build}/Debug/AppKit-Rhino" />
<fileset dir = "${Build}/Debug-Rhino/">
<include name = "AppKit/" />
</fileset>
</copy>

<copy todir = "${Build.Cappuccino.Tools.Lib}/NewApplication">
Expand Down

0 comments on commit 69833f3

Please sign in to comment.