|
From: Andre R. <and...@us...> - 2006-02-08 19:13:56
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30611/build_XCode/tools Added Files: appcopyright.c appversion.c postlinking.sh Log Message: Moved more strings from about.c, shell.r, winland.rc into versions.h, so it gets easier to keep these updated for different variants of the kernel. Also reorganized how the Xcode build extracts the version info from versions.h. --- NEW FILE: appcopyright.c --- /* $Id: appcopyright.c,v 1.1 2006/02/08 19:13:44 andreradke Exp $ */ /****************************************************************************** UserLand Frontier(tm) -- High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. Copyright (C) 1992-2004 UserLand Software, Inc. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ /* 2006-02-06 aradke: just a fancy way to extract copyright year string */ #include <stdio.h> #include "versions.h" main () { printf(APP_COPYRIGHT); return 0; } /*main*/ --- NEW FILE: appversion.c --- /* $Id: appversion.c,v 1.1 2006/02/08 19:13:44 andreradke Exp $ */ /****************************************************************************** UserLand Frontier(tm) -- High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. Copyright (C) 1992-2004 UserLand Software, Inc. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ /* 2006-02-06 aradke: just a fancy way to extract app version string */ #include <stdio.h> #include "versions.h" main () { printf(APP_VERSION_STRING); return 0; } /*main*/ --- NEW FILE: postlinking.sh --- # debug #set -x #printenv # Build Frontier.icns file # There seems to be some bugs here, so just use # pre-created Frontier.icns file. # Also add "icns.r" path to Input files and # "Frontier.icns" path to Output files below. # #/Developer/Tools/Rez "${SRCROOT}/../resources/Frontier/icns.r" -d TARGET_API_MAC_CARBON=1 -d FRONTIER_FRAMEWORK_INCLUDES=1 -i "${SRCROOT}/../Common/headers" -useDF -o "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frontier.icns" # Strip trademark character to prevent problems with shell quoting #product_str=`echo ${PRODUCT_NAME} | awk -F '\342' '{print $1};'` product_str=${PRODUCT_NAME} ################################################## # # Parse the "versions.h" file for useful variables # echo "Extracting info from Common/headers/versions.h for Info.plist file" # go to tools directory currdir=`pwd` cd ${SRCROOT}/tools/ # pick up preprocessor definitions from target settings, e.g. "PIKE=1" preprocessor_defs=`echo ${GCC_PREPROCESSOR_DEFINITIONS} | sed -e "s/[A-Z0-9_][A-Z0-9_=]*/-D&/g"` # collect compiler flags in one string for readability cflags="${preprocessor_defs} -I${SRCROOT}/../Common/headers" # set environment variable to stop cc from complaining export MACOSX_DEPLOYMENT_TARGET="10.1" # extract the APP_VERSION_STRING cc ${cflags} -o appversion appversion.c version_str=`./appversion` echo "Using version string: ${version_str}" # extract the copyright_year_string cc ${cflags} -o appcopyright appcopyright.c copyright_str=`./appcopyright` echo "Using copyright string: ${copyright_str}" # clean up rm appversion appcopyright # revert to previous working directory cd ${currdir} ################################################## # build info.plist file using extracted information sed -e "s/\${PRODUCT_NAME_STR}/${product_str}/g" \ -e "s/\${PRODUCT_VERSION_STR}/${version_str}/g" \ -e "s/\${PRODUCT_COPYRIGHT_STR}/${copyright_str}/g" \ "${INFOPLIST_FILE}" > "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist" |