Problems building Cappuccino 0.7b

17 views
Skip to first unread message

Thomas Balthazar

unread,
Mar 20, 2009, 12:45:23 PM3/20/09
to objec...@googlegroups.com
Hello,

I've checked out Cappuccino 0.7b, and installed the plist gem.
Then I've run 'rake release' (here is the output http://gist.github.com/82429).
Then, I've added PATH="$STEAM_BUILD/Release/env/bin:$PATH" to my path.

Then, I've run :
$capp hello -l

which gives :
java -classpath
/Users/tba/objj_build/Release/env/lib:/Users/tba/objj_build/Release/env/lib/js.jar:/Users/tba/objj_build/Release/env/lib/objj:
main -I/Users/tba/objj_build/Release/env/lib/Frameworks
/Users/tba/objj_build/Release/env/lib/capp/main.j hello -l
Setting up Rhino utilties
/Users/tba/objj_build/Release/env/lib/capp/Resources/Templates/Application
-> /Users/tba/Desktop/capp-0.7b-examples/hello
/Users/tba/objj_build/Release/env/lib/capp/Resources/Templates/Application/AppController.j
-> /Users/tba/Desktop/capp-0.7b-examples/hello/AppController.j
/Users/tba/objj_build/Release/env/lib/capp/Resources/Templates/Application/index-debug.html
-> /Users/tba/Desktop/capp-0.7b-examples/hello/index-debug.html
/Users/tba/objj_build/Release/env/lib/capp/Resources/Templates/Application/index.html
-> /Users/tba/Desktop/capp-0.7b-examples/hello/index.html
/Users/tba/objj_build/Release/env/lib/capp/Resources/Templates/Application/Info.plist
-> /Users/tba/Desktop/capp-0.7b-examples/hello/Info.plist
/Users/tba/objj_build/Release/env/lib/capp/Resources/Templates/Application/main.j
-> /Users/tba/Desktop/capp-0.7b-examples/hello/main.j

And when I try to open the index.html file in Firefox 3 (develop
locally enabled) on Mac OS X 10.5.6, rake 0.8.3, gem 1.3.1, I get the
following JS alert :

"what the hell!?!!![Exception... "Component returned failure code:
0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXMLHttpRequest.send]"
nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame
:: file:///Users/tba/Desktop/capp-0.7b-examples/hello/Frameworks/Objective-J/Objective-J.js
:: anonymous :: line 2279" data: no]"

Obviously, I did something wrong.
Any idea?

Thomas Balthazar
http://suitmymind.com
http://cappuccinocasts.com

Philippe Laval

unread,
Mar 20, 2009, 1:05:02 PM3/20/09
to objec...@googlegroups.com
Hello,

after
rake release
rake install

both commands are working for me :

capp myApp
capp myApp -t NibApplication


maybe the -l flag ?


Philippe

Thomas Balthazar

unread,
Mar 20, 2009, 1:23:44 PM3/20/09
to objec...@googlegroups.com
If I run rake install, then I do a capp myApp -l, it works.
I thought it was not mandatory to install the tools, as stated here
(http://wiki.github.com/280north/cappuccino/07-beta) :
"rake install will install the tools (similar to “ant update-install”
before). However, building now creates a “virtual environment” in the
Build folder that you can optionally place in your paths:
$ PATH=/path/to/build/Release/env/bin:$PATH"

Thanks,
Thomas.

Alex Karahalios

unread,
Mar 20, 2009, 4:40:24 PM3/20/09
to objec...@googlegroups.com
capp myApp -l works, but when I run the index.html file all I get the
spinning progress indicator.

Also when I try to install using

$ rake clobber
$ rake install

I get the following 2 errors:

---------------------------
cp -r Resources/_CPMenuWindow /Development/Sources/Cappuccino/steam/
Debug/AppKit/Resources
org.mozilla.javascript.EcmaError: TypeError: Cannot read property
"length" from undefined
at
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:
3566)
at
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:
3544)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:
3572)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:
3591)
at
org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:
3604)
at
org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:
1382)
at main._c142(Unknown Source)
at main.call(Unknown Source)
at
org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:
2346)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:
282)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:
129)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:
76)
at main._c140(Unknown Source)
at main.call(Unknown Source)
at
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:
119)
at main._c11(Unknown Source)
at main.call(Unknown Source)
at
org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:
108)
at main._c0(Unknown Source)
at main.call(Unknown Source)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
3003)
at main.call(Unknown Source)
at main.exec(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime$1.run(OptRuntime.java:
252)
at org.mozilla.javascript.Context.call(Context.java:499)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
at org.mozilla.javascript.optimizer.OptRuntime.main(OptRuntime.java:
240)
at main.main(Unknown Source)
java -classpath /Development/Sources/Cappuccino/steam/Debug/env/lib:/
Development/Sources/Cappuccino/steam/Debug/env/lib/js.jar:/Development/
Sources/Cappuccino/steam/Debug/env/lib/objj: main -I/Development/
Sources/Cappuccino/steam/Debug/env/lib/Frameworks /Development/Sources/
Cappuccino/steam/Debug/env/lib/blend/main.j -d Themes/Aristo/
ThemeDescriptors.j -o /Development/Sources/Cappuccino/steam/Debug/
AppKit/Resources/Aristo.blend -R Themes/Aristo/Resources
Setting up Rhino utilties
OBJJ EXCEPTION: TypeError: Cannot read property "length" from undefined
Name: TypeError
Message: Cannot read property "length" from undefined
File:
Line: 0
Rhino Exception: org.mozilla.javascript.EcmaError: TypeError:
Cannot read property "length" from undefined
*** Message: TypeError: Cannot read property "length" from
undefined
*** Source name: null
*** Line number: 0
*** Column number: 0
*** Line Source: null
*** Filtered stack trace:
Unknown Source
Unknown Source
Unknown Source
Unknown Source
*** Script stack trace:

*** Raw stack trace:
(in /Development/Sources/Cappuccino/Tools)
(in /Development/Sources/Cappuccino/Tools/bake)
(in /Development/Sources/Cappuccino/Tools/capp)
cp -r Templates /Development/Sources/Cappuccino/steam/Debug/capp/
Resources
(in /Development/Sources/Cappuccino/Tools/nib2cib)
Compacting /Development/Sources/Cappuccino/steam/Debug/nib2cib
rake aborted!
can't convert nil into String

(See full trace by running task with --trace)

---------------------------
cp -r Resources/wheel_button_h.png /Development/Sources/Cappuccino/
steam/Release/AppKit/Resources
java -classpath /Development/Sources/Cappuccino/steam/Release/env/lib:/
Development/Sources/Cappuccino/steam/Release/env/lib/js.jar:/
Development/Sources/Cappuccino/steam/Release/env/lib/objj: main -I/
Development/Sources/Cappuccino/steam/Release/env/lib/Frameworks /
Development/Sources/Cappuccino/steam/Release/env/lib/blend/main.j -d
Themes/Aristo/ThemeDescriptors.j -o /Development/Sources/Cappuccino/
steam/Release/AppKit/Resources/Aristo.blend -R Themes/Aristo/Resources
Setting up Rhino utilties
OBJJ EXCEPTION: *** Could not locate file named "AppKit/CPTheme.j" in
search paths.
Name: OBJJFileNotFoundException
Message: undefined
File: undefined
Line: undefined

Alex Karahalios

Francisco Tolmasky

unread,
Mar 20, 2009, 7:46:26 PM3/20/09
to Cappuccino & Objective-J
I see steam floating about that error message, which shouldn't be
because steam no longer exists. What I would recommend
doing is moving your current build folder aside, and then rake install-
ing from scratch. This will also lead to less headaches
since the build products are so radically different between 0.6 and
0.7b. I apologize as I should have really mentioned this earlier.
The setup I have looks something like this:

Build-Old
Build

Then when I'm done testing 0.7 stuff, I just rename them as so:
Build (used to be Build-Old)
Build-New

GIve that a shot and let me know how it works out

Alex Karahalios

unread,
Mar 20, 2009, 8:33:46 PM3/20/09
to objec...@googlegroups.com
Well, I guess I really don't know how to use git, but undefining the
STEAM_BUILD variable, made the steam references go away. Here are the
git commands I used to checkout the 0.7b branch:

git clone git://github.com/280north/cappuccino.git Cappucccino
git checkout origin/0.7b
git checkout -b origin/0.7b

I've also tried to do a

git clone Cappucccino Cappuccino-0.7b

and build in Cappuccino-0.7b, but get the following error:

java -classpath /Development/Sources/Cappucccino-0.7b/Build/Debug/env/
lib:/Development/Sources/Cappucccino-0.7b/Build/Debug/env/lib/js.jar:/
Development/Sources/Cappucccino-0.7b/Build/Debug/env/lib/objj: main -I/
Development/Sources/Cappucccino-0.7b/Build/Debug/env/lib/Frameworks /
Development/Sources/Cappucccino-0.7b/Build/Debug/env/lib/blend/main.j -
d Themes/Aristo/ThemeDescriptors.j -o /Development/Sources/
Cappucccino-0.7b/Build/Debug/AppKit/Resources/Aristo.blend -R Themes/
Aristo/Resources


Setting up Rhino utilties
OBJJ EXCEPTION: *** Could not locate file named "AppKit/CPTheme.j" in
search paths.
Name: OBJJFileNotFoundException
Message: undefined
File: undefined
Line: undefined

M. Robert Spryn

unread,
Mar 21, 2009, 1:43:06 AM3/21/09
to objec...@googlegroups.com
Anyone looking to sell a ticket. I decided I want to go despite the
economy, but they are sold out!

Blast!

Thomas Balthazar

unread,
Mar 21, 2009, 6:09:08 AM3/21/09
to objec...@googlegroups.com
What I did :
1/ removed the old install :
sudo rm /usr/local/bin/bake
sudo rm /usr/local/bin/cplutil
sudo rm /usr/local/bin/nib2cib
sudo rm /usr/local/bin/objj
sudo rm /usr/local/bin/objjc
sudo rm /usr/local/bin/objjtest
sudo rm /usr/local/bin/ojtest
sudo rm /usr/local/bin/press
sudo rm /usr/local/bin/steam
sudo rm -Rf /usr/local/share/objj
rm -Rf $STEAM_BUILD

2/ removed OBJJ_HOME from my environment variables

3/ built the framework with rake release

4/ add STEAM_BUILD/Release/env/bin to my path :
PATH="$STEAM_BUILD/Release/env/bin:$PATH"

5/ create a new app with capp my_app -l (same problem with capp my_app
without the -l)

6/ I get the following error message when I load index.html :
Couldnot find bundle:[Exception... "Component returned failure code:
0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXMLHttpRequest.send]"
nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame
:: file:///Users/tba/Desktop/capp-0.7b-examples/hello-linked-clean/Frameworks/Objective-J/Objective-J.js
:: anonymous :: line 2279" data: no]

7/ then I run rake install and remove STEAM_BUILD/Release/env/bin from
my path (so the /usr/local/bin versions are used)

8/ creating apps with either capp -l or capp now works

My questions :
* what is the exact difference between rake release and rake install ?
* is it mandatory to run rake install? I though that we could work
with the STEAM_BUILD/Release/env without installing the tools in
/usr/local/bin

I'm trying to have a better understanding of the install process here.

Thanks in advance for your help!

Francisco Tolmasky

unread,
Mar 21, 2009, 9:32:13 AM3/21/09
to Cappuccino & Objective-J
I don't seem to be able to reproduce this problem. Could you zip up
and send me my_app so I can compare it against the the app my capp is
making?
> Thomas Balthazarhttp://suitmymind.comhttp://cappuccinocasts.com

Thomas Balthazar

unread,
Mar 21, 2009, 9:43:13 AM3/21/09
to objec...@googlegroups.com

Francisco Tolmasky

unread,
Mar 21, 2009, 10:44:10 AM3/21/09
to Cappuccino & Objective-J
It appears that Aristo is not included in your frameworks for some
reason. I'll investigate further.

millenomi

unread,
Mar 21, 2009, 10:56:57 AM3/21/09
to objec...@googlegroups.com
On Sat, Mar 21, 2009 at 3:44 PM, Francisco Tolmasky <fran...@280n.com> wrote:
>
> It appears that Aristo is not included in your frameworks for some
> reason. I'll investigate further.

It happened to me too last night. I did a rake clobber, rake debug and
it went away. Don't know what caused it though.

- ∞

Thomas Balthazar

unread,
Mar 21, 2009, 3:14:53 PM3/21/09
to objec...@googlegroups.com
Hey Francisco,

I've run some test to try to understand the build process and why
Aristo is missing.
Here are some observations

a/ If I start with an empty STEAM_BUILD folder, and run rake install,
here is the content of STEAM_BUILD :
http://dl.getdropbox.com/u/40466/01_rake-install-objj_home_usr-local-share-objj.zip
It doesn't contain an Aristo.blend folder

b/ If I start with an empty STEAM_BUILD folder, and run rake release,
here is the content of STEAM_BUILD :
http://dl.getdropbox.com/u/40466/02_rake-release-objj_home_usr-local-share-objj.zip
It doesn't contain an Aristo.blend folder

c/ If I leave the content of STEAM_BUILD with what has been generated
in b/, then I run rake install, then I can find an Aristo.blend folder
in STEAM_BUILD/Cappuccino/objj/lib/Frameworks/AppKit/Resources :
http://dl.getdropbox.com/u/40466/03_rake-install_after_rake-release.zip

I hope this helps.

I must admit that I'm a little bit lost in the whole build process,
and that I haven't succeeded to find my way through the rake
tasks/files yet. If you find the time to give some pointers, I'll be
glad to dig deeper in it.

Cheers,

Thomas Balthazar
http://suitmymind.com
http://cappuccinocasts.com




On Sat, Mar 21, 2009 at 3:44 PM, Francisco Tolmasky <fran...@280n.com> wrote:
>

Francisco Tolmasky

unread,
Mar 21, 2009, 8:04:42 PM3/21/09
to Cappuccino & Objective-J
Ok, this should be fixed now. There was an incorrect dependency issue
that caused the theme parser to run before AppKit was installed, thus
creating empty themes.

On Mar 21, 12:14 pm, Thomas Balthazar <gro...@suitmymind.com> wrote:
> Hey Francisco,
>
> I've run some test to try to understand the build process and why
> Aristo is missing.
> Here are some observations
>
> a/ If I start with an empty STEAM_BUILD folder, and run rake install,
> here is the content of STEAM_BUILD :http://dl.getdropbox.com/u/40466/01_rake-install-objj_home_usr-local-...
> It doesn't contain an Aristo.blend folder
>
> b/ If I start with an empty STEAM_BUILD folder, and run rake release,
> here is the content of STEAM_BUILD :http://dl.getdropbox.com/u/40466/02_rake-release-objj_home_usr-local-...
> It doesn't contain an Aristo.blend folder
>
> c/ If I leave the content of STEAM_BUILD with what has been generated
> in b/, then I run rake install, then I can find an Aristo.blend folder
> in STEAM_BUILD/Cappuccino/objj/lib/Frameworks/AppKit/Resources :http://dl.getdropbox.com/u/40466/03_rake-install_after_rake-release.zip
>
> I hope this helps.
>
> I must admit that I'm a little bit lost in the whole build process,
> and that I haven't succeeded to find my way through the rake
> tasks/files yet. If you find the time to give some pointers, I'll be
> glad to dig deeper in it.
>
> Cheers,
>
> ...
>
> read more »

Thomas Balthazar

unread,
Mar 22, 2009, 4:36:07 AM3/22/09
to objec...@googlegroups.com
I just tested it and it works great, thanks.

Do we still need to set OBJJ_HOME to something?
It looks like the OBJJ_HOME env variable is automatically set in the
capp script.
Is it used elsewhere?

Francisco Tolmasky

unread,
Mar 22, 2009, 7:53:37 AM3/22/09
to Cappuccino & Objective-J
OBJJ_HOME is indeed no longer necessary since the tools are smart
enough to figure out where they are when they are run, thus setting
OBJJ_HOME for the duration of their run.

On Mar 22, 1:36 am, Thomas Balthazar <gro...@suitmymind.com> wrote:
> I just tested it and it works great, thanks.
>
> Do we still need to set OBJJ_HOME to something?
> It looks like the OBJJ_HOME env variable is automatically set in the
> capp script.
> Is it used elsewhere?
>
> Thomas Balthazarhttp://suitmymind.comhttp://cappuccinocasts.com
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages