From 87389c7ca6cbc96a80c938cc6d8a742fc04a2ad7 Mon Sep 17 00:00:00 2001 From: Francisco Tolmasky Date: Thu, 19 Mar 2009 00:38:22 -0700 Subject: [PATCH] Began moving over press to new build system. Reviewed by me. --- Tools/Rakefile | 2 +- Tools/press/Rakefile | 38 +++++++++++++++++++++++++++++++++ Tools/press/{press.j => main.j} | 0 Tools/press/press | 36 ------------------------------- 4 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 Tools/press/Rakefile rename Tools/press/{press.j => main.j} (100%) delete mode 100644 Tools/press/press diff --git a/Tools/Rakefile b/Tools/Rakefile index b9e4ab1e1..04764e893 100644 --- a/Tools/Rakefile +++ b/Tools/Rakefile @@ -4,7 +4,7 @@ require 'rake' require '../common' -subprojects = %w{bake capp nib2cib} +subprojects = %w{bake capp nib2cib press} %w(build clean).each do |task_name| task task_name do diff --git a/Tools/press/Rakefile b/Tools/press/Rakefile new file mode 100644 index 000000000..4dad5dc5a --- /dev/null +++ b/Tools/press/Rakefile @@ -0,0 +1,38 @@ +#!/usr/bin/env ruby + +require 'rake' +require '../../common' +require 'objective-j' +require 'objective-j/bundletask' + + +$PRODUCT = :press +$BUILD_PATH = File.join($BUILD_DIR, $CONFIGURATION, 'press') +$ENVIRONMENT_BIN_PRODUCT = File.join($ENVIRONMENT_BIN_DIR, 'press') +$ENVIRONMENT_LIB_PRODUCT = File.join($ENVIRONMENT_LIB_DIR, 'press') + +task :build => [:press, $ENVIRONMENT_BIN_PRODUCT, $ENVIRONMENT_LIB_PRODUCT] + +# Debug Framework +ObjectiveJ::BundleTask.new(:press) do |t| + t.name = 'press' + t.identifier = 'com.280n.press' + t.version = '0.6.5' + t.author = '280 North, Inc.' + t.email = 'feedback @nospam@ 280north.com' + t.summary = 'Deployment tool for Cappuccino applications' + t.sources = FileList['*.j'] + t.resources = FileList['Resources/*'] + t.license = ObjectiveJ::License::LGPL_v2_1 + t.build_path = $BUILD_PATH + t.flag = 'DEBUG' if $CONFIGURATION == 'Debug' +end + +#executable in environment directory +file_d $ENVIRONMENT_BIN_PRODUCT do + make_objj_executable($ENVIRONMENT_BIN_PRODUCT) +end + +file_d $ENVIRONMENT_LIB_PRODUCT => [:press] do + cp_r(File.join($BUILD_PATH, '.'), $ENVIRONMENT_LIB_PRODUCT) +end diff --git a/Tools/press/press.j b/Tools/press/main.j similarity index 100% rename from Tools/press/press.j rename to Tools/press/main.j diff --git a/Tools/press/press b/Tools/press/press deleted file mode 100644 index 7d4d3d34f..000000000 --- a/Tools/press/press +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# if OBJJ_HOME isn't set, try to determine it -if [ -z $OBJJ_HOME ]; then - # get path of the executable - SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") - - # resolve symlinks - if [ -h $SELF_PATH ]; then - SELF_PATH=`readlink $SELF_PATH` - fi - - # get second ancestor directory - SELF_DIR=`dirname $SELF_PATH` - export OBJJ_HOME=`dirname $SELF_DIR` - - # check to ensure it exists, print message - if [ -d $OBJJ_HOME ]; then - echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 - else - echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 - exit 2 - fi -fi - -OBJJ_LIB="$OBJJ_HOME/lib" - -PRESS="$OBJJ_LIB/press.j" - -# convert paths for Cygwin -if [[ `uname` == CYGWIN* ]]; then - OBJJ_HOME=`cygpath -w "$OBJJ_HOME"` - PRESS=`cygpath -w "$PRESS"` -fi - -objj $PRESS $@