From: Chris Hanson Date: Sun, 7 Mar 2010 07:09:58 +0000 (-0800) Subject: New script. X-Git-Tag: 20100708-Gtk~126^2~4 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=739e3e5b2c4ddc8efec63f3da88e769836a023f1;p=mit-scheme.git New script. --- diff --git a/dist/make-macosx-app b/dist/make-macosx-app new file mode 100755 index 000000000..5c0598b0f --- /dev/null +++ b/dist/make-macosx-app @@ -0,0 +1,63 @@ +#!/bin/bash +# +# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010 Massachusetts Institute of +# Technology +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at +# your option) any later version. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# inputs: binary tar +# outputs: MacOS X application + +system_args () +{ + (( ${#} >= 2 )) || usage + DIST_TYPE=${1} + ARCH=${2} +} +ARGS_FUNCTION=system_args + +system_usage () +{ + echo "usage: ${PROGRAM} TYPE ARCH [OPTIONS]" + usage_arg_type + echo " ARCH must be 'i386' or 'x86-64'" + echo " OPTIONS are passed to the configure script" +} +USAGE_FUNCTION=system_usage + +. "$(dirname "${0}")"/shared.sh +make_output_dir + +shift 2 + +OUT=${MACOSX_OUT}-${ARCH} + +compile () +{ + my_configure --enable-native-code="${ARCH}" "${@}" + my_make compile-microcode + etc/macosx/make-app.sh +} + +notify "Compiling executable" +unpack_dist_file_to "${DIST_DIR}" "${DIST_DIR}" +run_command "${OUT}"-compile "${DIST_DIR}"/src compile "${@}" + +notify "Building application bundle" +run_command "${OUT}"-buildapp "${DIST_DIR}"/src etc/macosx/make-app.sh +my_mv "${DIST_DIR}"/src/mit-scheme.app mit-scheme-9.0-"${ARCH}".app