diff --git a/Tools/capp/Generate.j b/Tools/capp/Generate.j index 4e21f96d0..264882470 100644 --- a/Tools/capp/Generate.j +++ b/Tools/capp/Generate.j @@ -119,7 +119,7 @@ function gen(/*va_args*/) function createFrameworksInFile(/*String*/ aFile, /*Boolean*/ symlink, /*Boolean*/ force) { - var destination = FILE.path(aFile); + var destination = FILE.path(FILE.absolute(aFile)); var frameworks = ["Foundation", "AppKit"]; if (!destination.isDirectory()) diff --git a/bootstrap.sh b/bootstrap.sh index bcabf1445..42b647687 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -27,6 +27,7 @@ INSTALL_DIRECTORY="/usr/local/narwhal" ORIGINAL_PATH="$PATH" if ! which -s "narwhal"; then + echo "================================================================================" echo "Narwhal JavaScript platform is required. Install it into \"$INSTALL_DIRECTORY\"?" if prompt; then echo "Downloading Narwhal..." @@ -53,16 +54,25 @@ if ! which -s "narwhal"; then fi echo "Installing necessary dependencies..." -tusk install browserjs -tusk install jake +tusk install browserjs jake if [ `uname` = "Darwin" ]; then - echo "Would you like to install the JavaScriptCore engine for Narwhal? This is optional but will make building and running Objective-J much faster." + echo "================================================================================" + echo "Would you like to install the JavaScriptCore engine for Narwhal?" + echo "This is optional but will make building and running Objective-J much faster." if prompt; then tusk install narwhal-jsc pushd "$INSTALL_DIRECTORY/packages/narwhal-jsc" make webkit popd + + echo "================================================================================" + echo "Rhino is the default Narwhal engine, should we change the default to JavaScriptCore for you?" + echo "This can by overridden by setting the NARWHAL_ENGINE environment variable to \"jsc\" or \"rhino\"." + echo "(Note: you must use Rhino for certain tools such as \"tusk\")" + if prompt; then + tusk engine jsc + fi fi fi @@ -70,22 +80,24 @@ export PATH="$ORIGINAL_PATH" if ! which -s "narwhal"; then SHELL_CONFIG="" - if [ -f "$HOME/.bashrc" ]; then + if [ -f "$HOME/.profile" ]; then + SHELL_CONFIG="$HOME/.profile" + elif [ -f "$HOME/.bashrc" ]; then SHELL_CONFIG="$HOME/.bashrc" elif [ -f "$HOME/.bash_profile" ]; then SHELL_CONFIG="$HOME/.bash_profile" - elif [ -f "$HOME/.profile" ]; then - SHELL_CONFIG="$HOME/.profile" elif [ -f "$HOME/.bash_login" ]; then SHELL_CONFIG="$HOME/.bash_login" fi - EXPORT_PATH_STRING="\nexport PATH=\"$INSTALL_DIRECTORY/bin:\$PATH\"" - + EXPORT_PATH_STRING="export PATH=\"$INSTALL_DIRECTORY/bin:\$PATH\"" + + echo "================================================================================" echo "You must add Narwhal's \"bin\" directory to your PATH environment variable. Do this automatically now?" echo "\"$EXPORT_PATH_STRING\" will be appended to \"$SHELL_CONFIG\"." if prompt; then if [ "$SHELL_CONFIG" ]; then + echo >> "$SHELL_CONFIG" echo "$EXPORT_PATH_STRING" >> "$SHELL_CONFIG" echo "Added to \"$SHELL_CONFIG\". Restart your shell or run \"source $SHELL_CONFIG\"." else