File: make_app

package info (click to toggle)
vistrails 3.0~git%2B9dc22bd-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 62,860 kB
  • sloc: python: 314,054; xml: 42,697; sql: 4,113; php: 731; sh: 469; makefile: 253
file content (99 lines) | stat: -rwxr-xr-x 4,547 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh
# usage: make_app volname
#      example: scripts/dist/make_app vistrails-mac-10.5-intel-1.3.1-rev1646
#
# Creates a disk image (dmg) of VisTrails on Mac OS X from the command line.
#
# The result will be a compressed dmg image with a README file, a LICENSE
# file and VisTrails folder containing the application and examples
# It uses py2app to build the bundle and
# DMG Canvas - http://www.araelium.com/dmgcanvas/ to generate the dmg

cd "$(dirname "$0")"

if [ $# != 1 ]; then
echo "Usage: make_app volname"
exit 0
fi
VOL="$1"
DMG="$VOL.dmg"
ALPS_VERSION="2.2.b5"
ALPS_URL="http://archive.comp-phys.org/software/vistrails/"
ALPS_FILE="alps-vistrails-${ALPS_VERSION}-macosx-10.6.tar.gz"
echo "removing build and dist folders..."
# Update release info from CHANGELOG
../common/prepare_release.py
rm -rf dist/ build/
echo "removing old bundle..."
rm -f ${DMG}
echo "building bundle..."
python setup.py py2app --no-chdir
cp -r /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/* dist/VisTrails.app/Contents/Frameworks/Python.framework/Versions/2.7/include/python2.7
cp -r /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/* dist/VisTrails.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
echo "creating links to python frameworks"
curdir=`pwd`                                               
frameworkdir="dist/VisTrails.app/Contents/Frameworks/Python.framework/"
cd $frameworkdir
ln -s Versions/2.7/include/python2.7 Headers
ln -s Versions/2.7/Python Python
ln -s Versions/2.7/Resources Resources
cd $curdir
echo "copying hdf5 headers and libs..."
mkdir -p dist/VisTrails.app/Contents/Resources/hdf5
cp -r /Users/vistrails/src/hdf5-1.8.4/hdf5/include dist/VisTrails.app/Contents/Resources/hdf5/
cp -r /Users/vistrails/src/hdf5-1.8.4/hdf5/lib dist/VisTrails.app/Contents/Resources/hdf5/
install_name_tool -id @executable_path/../Resources/hdf5/lib/libhdf5.dylib dist/VisTrails.app/Contents/Resources/hdf5/lib/libhdf5.dylib
install_name_tool -id @executable_path/../Resources/hdf5/lib/libhdf5.6.dylib dist/VisTrails.app/Contents/Resources/hdf5/lib/libhdf5.6.dylib
install_name_tool -id @executable_path/../Resources/hdf5/lib/libhdf5_hl.dylib dist/VisTrails.app/Contents/Resources/hdf5/lib/libhdf5_hl.dylib
install_name_tool -id @executable_path/../Resources/hdf5/lib/libhdf5_hl.6.dylib dist/VisTrails.app/Contents/Resources/hdf5/lib/libhdf5_hl.6.dylib 
echo "copying qt.conf..."
cp Input/qt.conf dist/VisTrails.app/Contents/Resources/
echo "copying plugins..."
echo "copying plugins..."
cp -r Input/plugins/* dist/VisTrails.app/Contents/MacOS
if [ ! -e "Input/alps_libs/${ALPS_FILE}" ]
then
    echo "downloading ALPS file from ${ALPS_URL}${ALPS_FILE}"
    curl --create-dirs ${ALPS_URL}${ALPS_FILE} -o Input/alps_libs/${ALPS_FILE} 
fi
echo "copying alps libs..."
tar -xzf Input/alps_libs/${ALPS_FILE} -C dist/
echo "copying example files..."
cp -r ../../../examples dist/
echo "copying README file..."
cp ../../../CHANGELOG dist/README
echo "copying LICENSE file..."
cp ../../../LICENSE dist/
echo "copying VisTrails.command file..."
cp Input/VisTrails.command dist/
echo "copying CLToolsWizard.command file..."
cp Input/CLToolsWizard.command dist/
echo "adding extension files..."
cp -r ../../../extensions dist/extensions
echo "adding scrpt files..."
mkdir dist/scripts
rsync -a ../.. dist/scripts/ --exclude dist
echo "copying GDAL's resource files..."
mkdir -p dist/VisTrails.app/Contents/Frameworks/GDAL.framework/Versions/1.8/Resources
cp -r /Library/Frameworks/GDAL.framework/Versions/1.8/Resources/gdal dist/VisTrails.app/Contents/Frameworks/GDAL.framework/Versions/1.8/Resources/
echo "Downloading User's Guide and adding it distribution"

#Tries to build the usersguide if sphinx and latex are available. Otherwise,
#downloads it, so make sure that the online usersguide is updated
mkdir dist/doc
python ../../get_usersguide.py dist/doc/
echo "packing everything inside the VisTrails folder..."
mkdir dist/VisTrails
mv dist/VisTrails.app dist/VisTrails/
mv dist/examples dist/VisTrails/
mv dist/extensions dist/VisTrails/
mv dist/scripts dist/VisTrails/
mv dist/VisTrails.command dist/VisTrails/
mv dist/CLToolsWizard.command dist/Vistrails/
mv dist/doc dist/VisTrails/doc
#uncomment the following lines for itk support
#echo "including itk..."
#python fix_itk_libraries.py ~/src/itk dist/VisTrails/VisTrails.app/Contents
echo "using dmgcanvas to create the compressed dmg file..."
/usr/local/bin/dmgcanvas -t vistrails.dmgCanvas -o ${DMG} -v ${VOL}
echo "Done."