Skip to content

Commit

Permalink
Added better support for debugging.
Browse files Browse the repository at this point in the history
Reviewed by me.
  • Loading branch information
Francisco Tolmasky committed Dec 9, 2008
1 parent f6b3afa commit a966e75
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 10 deletions.
23 changes: 23 additions & 0 deletions Objective-J/bootstrap.js
@@ -0,0 +1,23 @@
/*
* bootstrap.js
* Objective-J
*
* Created by Francisco Tolmasky.
* Copyright 2008, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

objj_import("main.j", YES, function() { main(); });
1 change: 1 addition & 0 deletions Objective-J/build.xml
Expand Up @@ -18,6 +18,7 @@
<file name = "evaluate.js" />
<file name = "static.js" />
<file name = "debug.js" />
<file name = "bootstrap.js" />

</filelist>

Expand Down
8 changes: 5 additions & 3 deletions Objective-J/file.js
Expand Up @@ -37,9 +37,11 @@ var objj_files = { },
objj_bundlesForClass = { },
objj_searches = { };

var OBJJ_NO_FILE = {},
OBJJ_INCLUDE_PATHS = ["Frameworks", "SomethingElse"];

var OBJJ_NO_FILE = {};

if (!window.OBJJ_INCLUDE_PATHS)
var OBJJ_INCLUDE_PATHS = ["Frameworks", "SomethingElse"];

var OBJJ_BASE_URI = "";

IF (OPERA)
Expand Down
35 changes: 35 additions & 0 deletions Tools/NewApplication/index-debug.html
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
<!--
//
// index-debug.html
//
// Created by __Me__ on __Date__.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
-->
<head>

<title>Hello World</title>

<script type = "text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</script>

<script src = "Frameworks/Debug/Objective-J/Objective-J.js" type = "text/javascript"></script>

</head>

<body>
<div style="position: absolute; left: 50%; top: 50%;">
<center>
<img src = "Frameworks/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif" style="left: -32px; position: relative; top: -32px;" />
</center>
</div>
</body>
</html>

7 changes: 4 additions & 3 deletions Tools/NewApplication/index.html
Expand Up @@ -15,11 +15,12 @@

<title>Hello World</title>

<script src = "Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>

<script type = "text/javascript">
objj_import("main.j", YES, function() { main(); });
OBJJ_MAIN_FILE = "main.j";
</script>

<script src = "Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>


</head>

Expand Down
31 changes: 27 additions & 4 deletions Tools/steam/steam.js
Expand Up @@ -404,7 +404,7 @@ function mainCreate()
sourceFrameworks = new File(OBJJ_HOME + "/lib/Frameworks"),
sourceDebugFrameworks = new File(OBJJ_HOME + "/lib/Frameworks-Debug"),
destinationFrameworks = new File(destination + "/Frameworks"),
destinationDebugFrameworks = new File(destination + "/Frameworks-Debug");
destinationDebugFrameworks = new File(destination + "/Frameworks/Debug");

System.out.println(sourceNewApplication.getCanonicalPath() + "," + destinationNewApplication.getCanonicalPath() + "," + sourceFrameworks.getCanonicalPath() + "," + destinationFrameworks.getCanonicalPath());

Expand All @@ -414,13 +414,36 @@ function mainCreate()

if (!link)
{
exec(["cp", "-vR", sourceDebugFrameworks.getCanonicalPath(), destinationDebugFrameworks.getCanonicalPath()], true);
exec(["cp", "-vR", sourceFrameworks.getCanonicalPath(), destinationFrameworks.getCanonicalPath()], true);
exec(["cp", "-vR", sourceDebugFrameworks.getCanonicalPath(), destinationDebugFrameworks.getCanonicalPath()], true);
}
else
{
exec(["ln", "-s", new File(System.getenv("STEAM_BUILD") + "/Debug").getCanonicalPath(), destinationDebugFrameworks.getCanonicalPath()], true);
exec(["ln", "-s", new File(System.getenv("STEAM_BUILD") + "/Release").getCanonicalPath(), destinationFrameworks.getCanonicalPath()], true);
var STEAM_BUILD = System.getenv("STEAM_BUILD");

// Release Frameworks
new File(destinationFrameworks).mkdir();

exec(["ln", "-s", new File(STEAM_BUILD + "/Release/Objective-J").getCanonicalPath(),
new File(destination + "/Frameworks/Objective-J").getCanonicalPath()], true);

exec(["ln", "-s", new File(STEAM_BUILD + "/Release/Foundation").getCanonicalPath(),
new File(destination + "/Frameworks/Foundation").getCanonicalPath()], true);

exec(["ln", "-s", new File(STEAM_BUILD + "/Release/AppKit").getCanonicalPath(),
new File(destination + "/Frameworks/AppKit").getCanonicalPath()], true);

// Debug Frameworks
new File(destinationDebugFrameworks).mkdir();

exec(["ln", "-s", new File(STEAM_BUILD + "/Debug/Objective-J").getCanonicalPath(),
new File(destination + "/Frameworks/Debug/Objective-J").getCanonicalPath()], true);

exec(["ln", "-s", new File(STEAM_BUILD + "/Debug/Foundation").getCanonicalPath(),
new File(destination + "/Frameworks/Debug/Foundation").getCanonicalPath()], true);

exec(["ln", "-s", new File(STEAM_BUILD + "/Debug/AppKit").getCanonicalPath(),
new File(destination + "/Frameworks/Debug/AppKit").getCanonicalPath()], true);
}
}
else
Expand Down

0 comments on commit a966e75

Please sign in to comment.