#!/bin/sh # Copyright (c) 2005,2006,2013 # Foundation for Research and Technology-Hellas (Greece). # All rights reserved. # # This file is part of CGAL (www.cgal.org); you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; version 3 of the License, # or (at your option) any later version. # # Licensees holding a valid commercial license may use this file in # accordance with the commercial license agreement provided with the software. # # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # $URL$ # $Id$ # SPDX-License-Identifier: LGPL-3.0+ # # Authors: Herve Bronnimann # Menelaos Karavelas # Eric Berberich # This script creates the appropriate directory structure so that a CGAL # Qt demo can be run on MacOSX usage() { echo "Usage: cgal_make_macosx_app executable" } case $# in 0) usage exit 1 esac for i do if [ -x "$i" ] ; then EXECUTABLE=$i else usage exit 1 fi done if [ -z "$EXECUTABLE.app" ] ; then mkdir $EXECUTABLE.app fi test -d $EXECUTABLE.app/Contents/MacOS/ || mkdir -p $EXECUTABLE.app/Contents/MacOS/ strip $EXECUTABLE cp $EXECUTABLE $EXECUTABLE.app/Contents/MacOS/$EXECUTABLE rm -f $EXECUTABLE.app/Contents/PkgInfo echo "APPL????" > $EXECUTABLE.app/Contents/PkgInfo rm -f $EXECUTABLE.app/Contents/Info.plist cat > $EXECUTABLE.app/Contents/Info.plist < CFBundleIconFile cgal_app.icns CFBundlePackageType APPL CFBundleGetInfoString Created by CGAL CFBundleSignature ttxt CFBundleExecutable $EXECUTABLE ENDINFO if [ -d "help" ] ; then cat >> $EXECUTABLE.app/Contents/Info.plist <CFBundleHelpBookFolder Help CFBundleHelpBookName Help ENDINFO test -d $EXECUTABLE.app/Contents/Resources/Help || mkdir -p $EXECUTABLE.app/Contents/Resources/Help cp -r help/* $EXECUTABLE.app/Contents/Resources/Help ln -s index.html $EXECUTABLE.app/Contents/Resources/Help/Help.html fi cat >> $EXECUTABLE.app/Contents/Info.plist <NOTE This file was generated by CGAL/scripts/cgal_make_macosx_app. ENDINFO test -d $EXECUTABLE.app/Contents/Resources || mkdir -p $EXECUTABLE.app/Contents/Resources DIR=$( cd "$( dirname "$0" )" && pwd ) cp $DIR/../auxiliary/cgal_app.icns $EXECUTABLE.app/Contents/Resources echo "created $EXECUTABLE.app ..."