~ubuntu-branches/debian/sid/3depict/sid

« back to all changes in this revision

Viewing changes to makeMacOSXApp

  • Committer: Bazaar Package Importer
  • Author(s): D Haley
  • Date: 2010-08-09 21:23:50 UTC
  • Revision ID: james.westby@ubuntu.com-20100809212350-cg6yumndhwi3bqws
Tags: upstream-0.0.1
ImportĀ upstreamĀ versionĀ 0.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
 
 
4
#This will make the mac .app bundle
 
5
 
 
6
if [ $1 = '--update-config=yes' ]; then
 
7
        echo "Updating configuration files"
 
8
 
 
9
        autoreconf
 
10
 
 
11
        PNG_DIR="/usr/local"
 
12
        GL_DIR="/usr/X11"
 
13
        ./configure --with-freetype=/usr/local \
 
14
                --with-wx-prefix=/usr/local \
 
15
                --with-xml-config=/opt/local/bin/xml2-config \
 
16
                CFLAGS="-I$PNG_DIR/include -I$GL_DIR/include" \
 
17
                CXXFLAGS="-I$PNG_DIR/include -I$GL_DIR/include" \
 
18
                CPPFLAGS="-I$PNG_DIR/include -I$GL_DIR/include" \
 
19
                LDFLAGS="-L$PNG_DIR/lib -lpng"
 
20
 
 
21
        if [ $? -ne 0 ]; then
 
22
                echo "Configure unsuccessful - exiting"
 
23
                exit
 
24
        fi
 
25
 
 
26
 
 
27
        make clean
 
28
fi
 
29
 
 
30
make
 
31
 
 
32
if [ $? -ne 0 ]; then
 
33
        echo "Make unsuccessful - exiting"
 
34
        exit
 
35
fi
 
36
 
 
37
echo "Updating .app bundle..."
 
38
mkdir -p ./main.app/Contents/MacOS/
 
39
cp ./src/3Depict ./main.app/Contents/MacOS/main
 
40
cp src/tex-source/3Depict-icon.icns ./main.app/Contents/Resources/wxmac.icns
 
41
touch ./main.app/Contents/PkgInfo
 
42
touch ./main.app/Contents/info.plist
 
43
 
 
44
# relabel libraries for packaging
 
45
dylibbundler -od -b -x ./main.app/Contents/MacOS/main -d ./main.app/Contents/libs -i /usr/lib
 
46
 
 
47
#copy textures
 
48
cp -R ./src/textures ./main.app/Contents/Resources
 
49
 
 
50
echo "Done"
 
51