diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | macosx/Makefile | 59 | ||||
-rw-r--r-- | macosx/README | 7 | ||||
-rw-r--r-- | macosx/Wish.pbproj/project.pbxproj | 13 |
4 files changed, 63 insertions, 29 deletions
@@ -1,3 +1,16 @@ +2003-10-01 Daniel Steffen <das@users.sourceforge.net> + + * macosx/Wish.pbproj/project.pbxproj: + * macosx/Makefile: fixed redo prebinding bug when DESTDIR="". + Added support for all applicable customizable makefile variables + from tcl/macosx/Makefile. + + * macosx/README: + * macosx/Wish.pbproj/project.pbxproj: ensure that the versioned + wishX.X script works correctly when Tk.framework with multiple + versions is present by referring to a copy of 'Wish Shell.app' + located in Tk.framework/Versions/X.X/Resources. + 2003-09-29 Donal K. Fellows <fellowsd@cs.man.ac.uk> * unix/tcl.m4 (SC_ENABLE_FRAMEWORK): Added note to make it clearer diff --git a/macosx/Makefile b/macosx/Makefile index e4f029a..9aa832f 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -1,38 +1,57 @@ ################################################################################ # -# Simple makefile for building on Mac OS X with the -# Project Builder command line tool 'pbxbuild' +# Makefile to build AquaTk on Mac OS X packaged as a Framework +# uses Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.7.2.3 2003/09/25 05:37:48 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.4 2003/10/01 14:35:39 das Exp $ # ################################################################################ -INSTALL_ROOT ?= +#------------------------------------------------------------------------------- +# customizable settings -BUILD_DIR ?= ${CURDIR}/../../build -SYMROOT ?= ${BUILD_DIR}/${PROJECT} +DESTDIR ?= +INSTALL_ROOT ?= ${DESTDIR} + +BUILD_DIR ?= ${CURDIR}/../../build +SYMROOT ?= ${BUILD_DIR}/${PROJECT} +OBJROOT ?= ${SYMROOT} + +EXTRA_MAKE_ARGS ?= + +INSTALL_PATH ?= /Library/Frameworks +APPLICATION_INSTALL_PATH ?= /Applications/Utilities + +PREFIX ?= /usr +BINDIR ?= ${PREFIX}/bin TCL_FRAMEWORK_DIR ?= ${BUILD_DIR}/tcl -TCLSH_DIR ?= ${TCL_FRAMEWORK_DIR} +TCLSH_DIR ?= ${TCL_FRAMEWORK_DIR} + +#------------------------------------------------------------------------------- + +PROJECT = tk +TARGET = Wish -PROJECT = tk -TARGET = Wish +DEVBUILDSTYLE = Development +DEPBUILDSTYLE = Deployment -DEVBUILDSTYLE = Development -DEPBUILDSTYLE = Deployment +PBXBUILD = /usr/bin/pbxbuild -PBXBUILD = /usr/bin/pbxbuild +MAKE_VARS := SYMROOT OBJROOT BINDIR APPLICATION_INSTALL_PATH \ + TCL_FRAMEWORK_DIR TCLSH_DIR +MAKE_ARGS_V = $(foreach v,${MAKE_VARS},$v=${$v}) -BUILD = ${PBXBUILD} SYMROOT="${SYMROOT}" -target "${TARGET}" \ - TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" \ - TCLSH_DIR="${TCLSH_DIR}" ${MAKEOVERRIDES} +BUILD = ${PBXBUILD} -target "${TARGET}" ${MAKE_ARGS_V} \ + DYLIB_INSTALL_PATH="${INSTALL_PATH}" \ + ${EXTRA_MAKE_ARGS} ${MAKEOVERRIDES} -DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" -DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" +DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" +DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" -INSTALLOPTS = INSTALL_ROOT="${INSTALL_ROOT}" +INSTALLOPTS = INSTALL_ROOT="${INSTALL_ROOT}" -EMBEDDEDOPTS = EMBEDDED_BUILD=1 +EMBEDDEDOPTS = EMBEDDED_BUILD=1 ################################################################################ @@ -81,7 +100,7 @@ clean-deploy: ################################################################################ cleanup-embedded: - @-cd ${INSTALL_ROOT}; \ + @-cd ${INSTALL_ROOT}/; \ chmod -RH u+w Library/Frameworks/Tcl.framework; \ rm -rf Library/Frameworks/Tcl.framework; \ chmod -RH u+w Library/Frameworks/Tk.framework; \ diff --git a/macosx/README b/macosx/README index 65380e1..07302c0 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ TclTkAqua README ---------------- -RCS: @(#) $Id: README,v 1.6.2.2 2003/07/18 01:06:33 das Exp $ +RCS: @(#) $Id: README,v 1.6.2.3 2003/10/01 14:35:39 das Exp $ This is the README file for the Mac OS X native versions of Tcl & Tk. @@ -70,9 +70,8 @@ system's standard framework directories: /Network/Library/Frameworks /System/Library/Frameworks and 'Wish Shell' as well as /usr/bin/tclsh will work. -- /usr/bin/wish is a script that calls 'Wish Shell' in its default location - /Applications/Utilities/Wish Shell.app -it will break if 'Wish Shell' is moved. +- /usr/bin/wish is a script that calls a copy of 'Wish Shell' contained in + Tk.framework/Resources - if 'Wish Shell' is started from the Finder or via 'open', $argv contains a "-psn_XXXX" argument. This is the Wish's carbon process serial number, you may diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 8b1daed..9c4fcc7 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -2880,11 +2880,14 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright  F5877FBD031FAC6A016F146B, ); buildSettings = { + APPLICATION_INSTALL_PATH = "${SYSTEM_ADMIN_APPS_DIR}"; + BINDIR = /usr/bin; + DYLIB_INSTALL_PATH = /Library/Frameworks; FRAMEWORK_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)\" \"$(SYMROOT)\""; FRAMEWORK_VERSION = 8.4; GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; - INSTALL_PATH = /Applications/Utilities; + INSTALL_PATH = "${APPLICATION_INSTALL_PATH}"; LIBRARY_SEARCH_PATHS = ""; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\""; @@ -3141,7 +3144,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright  ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -n \"${EMBEDDED_BUILD:-}\" ]; then\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents\"\n\n# if we are embedding frameworks, copy them into the app\nrm -rf \"Frameworks\"\nmkdir -p \"Frameworks\"\nif [ \"${DEPLOYMENT_LOCATION:-}\" = \"YES\" -o \"${ACTION}\" = \"install\" ]; then\n FWKDIR=\"${INSTALL_ROOT}/Library/Frameworks\"\nelse\n FWKDIR=\"${TARGET_BUILD_DIR}\"\nfi\ncp -fRPH \"${FWKDIR}/Tcl.framework\" \"Frameworks\"\ncp -fRPH \"${FWKDIR}/Tk.framework\" \"Frameworks\"\n\n# fix install names when embedding\nfix_install_id ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -id $(otool -L \"$1\" | awk \"/$(basename \"$1\")\\.framework.*[^:]\\$/ {sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_name ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -change $(otool -L \"$1\" | awk \"/$2\\.framework.*[^:]\\$/ {print \\$1; sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_id Frameworks/Tcl.framework/Tcl\nfix_install_id Frameworks/Tk.framework/Tk\nfix_install_name Frameworks/Tk.framework/Tk Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tk\n\nfi"; + shellScript = "if [ -n \"${EMBEDDED_BUILD:-}\" ]; then\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents\"\n\n# if we are embedding frameworks, copy them into the app\nrm -rf \"Frameworks\"\nmkdir -p \"Frameworks\"\nif [ \"${DEPLOYMENT_LOCATION:-}\" = \"YES\" -o \"${ACTION}\" = \"install\" ]; then\n FWKDIR=\"${INSTALL_ROOT}${DYLIB_INSTALL_PATH}\"\nelse\n FWKDIR=\"${TARGET_BUILD_DIR}\"\nfi\ncp -fpRPH \"${FWKDIR}/Tcl.framework\" \"Frameworks\"\ncp -fpRPH \"${FWKDIR}/Tk.framework\" \"Frameworks\"\n\n# fix install names when embedding\nfix_install_id ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -id $(otool -L \"$1\" | awk \"/$(basename \"$1\")\\.framework.*[^:]\\$/ {sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_name ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -change $(otool -L \"$1\" | awk \"/$2\\.framework.*[^:]\\$/ {print \\$1; sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_id Frameworks/Tcl.framework/Tcl\nfix_install_id Frameworks/Tk.framework/Tk\nfix_install_name Frameworks/Tk.framework/Tk Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tk\n\nfi"; }; F55BC46802B2D38B01DC9062 = { fileEncoding = 5; @@ -3191,7 +3194,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright  ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# ensure we can overwrite a previous install\nif [ -d \"${INSTALL_ROOT}/${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\" ]; then\n chmod -RH u+w \"${INSTALL_ROOT}/${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\"\nfi"; + shellScript = "# ensure we can overwrite a previous install\nif [ -d \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\" ]; then\n chmod -RH u+w \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\"\nfi"; }; F5877FB8031F982D016F146B = { buildActionMask = 8; @@ -3229,7 +3232,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright  ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nif [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# fix permissions on uninstalled products\nchmod a+w \"${TEMP_ROOT}/UninstalledProducts\"\nchmod a+w \"${TEMP_ROOT}\"/UninstalledProducts/libtkstub*.a"; + shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}/\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nif [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# fix permissions on uninstalled products\nchmod a+w \"${TEMP_ROOT}/UninstalledProducts\"\nchmod a+w \"${TEMP_ROOT}\"/UninstalledProducts/libtkstub*.a"; }; F5877FBD031FAC6A016F146B = { buildActionMask = 8; @@ -3242,7 +3245,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright  ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nEXECUTABLE_DIR=\"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents/MacOS\"\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\n if [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\n if [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\n if [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\n PREBIND_OPTS=\"-r .\"\nfi\nredo_prebinding ${PREBIND_OPTS:-} -e \"${EXECUTABLE_DIR}\" \"${EXECUTABLE_DIR}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# install wish script & symbolic links\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\nmkdir -p \"${INSTALL_ROOT}/usr/bin\"\nrm -f \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\"\ncat > \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\" <<EOF\n#!/bin/sh\n\"\\$(dirname \\$0)/../../${EXECUTABLE_DIR}/${PRODUCT_NAME}\" \"\\$@\"\nEOF\nchmod a+x \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\"\nln -fs \"wish${FRAMEWORK_VERSION}\" \"${INSTALL_ROOT}/usr/bin/wish\"\nfi"; + shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}/\"\nAPP_DIR=\"${PRODUCT_NAME}.${WRAPPER_EXTENSION}\"\nEXECUTABLE_DIR=\"${APP_DIR}/Contents/MacOS\"\nEXECUTABLE=\"${EXECUTABLE_DIR}/${PRODUCT_NAME}\"\nFWK_RSRC_DIR=\"${DYLIB_INSTALL_PATH}/Tk.framework/Versions/${FRAMEWORK_VERSION}/Resources\"\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\n if [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\n if [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\n if [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\n PREBIND_OPTS=\"-r .\"\nfi\nredo_prebinding ${PREBIND_OPTS:-} -e \"./${INSTALL_PATH}/${EXECUTABLE_DIR}\" \"./${INSTALL_PATH}/${EXECUTABLE}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# copy Wish.app into framework, install wish script & symbolic link\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\nrm -rf \"./${FWK_RSRC_DIR}/${APP_DIR}\"\ncp -fpRPH \"./${INSTALL_PATH}/${APP_DIR}\" \"./${FWK_RSRC_DIR}\"\nmkdir -p \"./${BINDIR}\"\nrm -f \"./${BINDIR}/wish${FRAMEWORK_VERSION}\"\ncat > \"./${BINDIR}/wish${FRAMEWORK_VERSION}\" <<EOF\n#!/bin/sh\n\"\\$(dirname \\$0)$(echo ${BINDIR} | sed -e 's#/[^/][^/]*#/..#g')${FWK_RSRC_DIR}/${EXECUTABLE}\" \"\\$@\"\nEOF\nchmod a+x \"./${BINDIR}/wish${FRAMEWORK_VERSION}\"\nln -fs \"wish${FRAMEWORK_VERSION}\" \"./${BINDIR}/wish\"\nfi"; }; F59D847903390D7E016F146B = { buildActionMask = 2147483647; |