Commit a7c7c6e1 authored by ghweber's avatar ghweber
Browse files

Merged 2.1RC into trunk: Added script to convert VisIt install to app bundle.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12676 18c085ea-50e0-402c-830e-de6fd14e8384
parent 82e1f3c1
......@@ -113,6 +113,9 @@ exec perl -x $0 ${1+"$@"};
# Add trick to remove trailing slashes for machines with defective
# dirname programs.
#
# Gunther H. Weber, Mon Oct 4 14:49:52 PDT 2010
# If running as MacOS app bundle change directory to user's home direcotry.
#
###############################################################################
......@@ -458,13 +461,22 @@ $ENV{VISITVERSION} = $ver;
$ENV{VISITPROGRAM} = $progname;
$ENV{VISITDIR} = $visitdir;
# -----------------------------------------------------------------------------
# If launched from an MacOS app bundle, change directory to users home
# -----------------------------------------------------------------------------
# Otherwise all file dialogs in the gui default to a location inside the
# appbundle, which is confusing to users.
if ($ENV{VISIT_STARTED_FROM_APPBUNDLE} eq "TRUE")
{
chdir($ENV{HOME});
}
# -----------------------------------------------------------------------------
# Run the internal launcher!
# -----------------------------------------------------------------------------
@visitcmd = ("${visitdir}/bin/internallauncher", @visitargs);
exec @visitcmd or die "Can't execute visit launcher script: $!\n";
# -----------------------------------------------------------------------------
# Helper functions
# -----------------------------------------------------------------------------
......
#!/bin/sh
visit_version=`readlink $1/current`
if [ $? != 0 ]; then
echo "Cannot determine VisIt version number"
exit
fi
mkdir $1/Contents
cat >$1/Contents/Info.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>visit</string>
<key>CFBundleGetInfoString</key>
<string>VisIt Visualization Tool</string>
<key>CFBundleIconFile</key>
<string>VisItIcon.icns</string>
<key>CFBundleIdentifier</key>
<string>VISI</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
EOF
echo " <string>VisIt version $visit_version</string>" >> $1/Contents/Info.plist
cat >> $1/Contents/Info.plist <<EOF
<key>LSEnvironment</key>
<dict>
<key>TERM_PROGRAM</key>
<string>Apple_Terminal</string>
<key>VISIT_STARTED_FROM_APPBUNDLE</key>
<string>TRUE</string>
</dict>
<key>CFBundleName</key>
EOF
echo " <string>VisIt $visit_version</string>" >> $1/Contents/Info.plist
cat >>$1/Contents/Info.plist <<EOF
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
EOF
echo " <string>VisIt $visit_version</string>" >> $1/Contents/Info.plist
cat >>$1/Contents/Info.plist <<EOF
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
EOF
echo " <string>$visit_version</string>" >>$1/Contents/Info.plist
cat >>$1/Contents/Info.plist <<EOF
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC</string>
</dict>
</plist>
EOF
mkdir $1/Contents/MacOS
ln -s ../../bin/visit $1/Contents/MacOS/visit
mkdir $1/Contents/Resources
cp $1/current/darwin-*/bin/gui.app/Contents/Resources/VisItIcon.icns $1/Contents/Resources
mv $1 `dirname $1`/VisIt.app
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment