4 if [ "$PLATFORM" != "desktop" -a "$PLATFORM" != "os2007" -a "$PLATFORM" != "os2008" ]; then
5 echo "Invalid platform parameter, defaulting to OS 2008"
8 echo "Building for $PLATFORM"
12 if [ "$PLATFORM" = "os2007" ]; then
15 BUILD_BASE=./build-$PLATFORM
19 # Create PyPackager directory structure from the original files
20 # Please make sure the following files are in this directory before
33 mkdir -p $BUILD_BASE/usr/share/icons/hicolor/{scalable,26x26,64,64}/hildon
34 mkdir -p $BUILD_BASE/usr/share/applications/hildon
35 mkdir -p $BUILD_BASE/usr/local/{bin,lib}
37 cp gc_dialer/gc_dialer_256.png $BUILD_BASE/usr/share/icons/hicolor/scalable/hildon/gc_dialer.png
38 cp gc_dialer/gc_dialer_64.png $BUILD_BASE/usr/share/icons/hicolor/64x64/hildon/gc_dialer.png
39 cp gc_dialer/gc_dialer_26.png $BUILD_BASE/usr/share/icons/hicolor/26x26/hildon/gc_dialer.png
41 cp gc_dialer/gc_dialer.desktop $BUILD_BASE/usr/share/applications/hildon
43 cp gc_dialer/gc_dialer.glade $BUILD_BASE/usr/local/lib
46 #Construct the program by cat-ing all the python files together
47 echo "#!/usr/bin/python2.5" > $BUILD_BASE/usr/local/bin/gc_dialer.py
48 #echo "from __future__ import with_statement" >> $BUILD_BASE/usr/local/bin/gc_dialer.py
49 cat gc_dialer/gc_dialer.py gc_dialer/gcbackend.py gc_dialer/browser_emu.py | grep -e '^import ' | sort -u >> $BUILD_BASE/usr/local/bin/gc_dialer.py
50 cat gc_dialer/browser_emu.py gc_dialer/gcbackend.py gc_dialer/gc_dialer.py | grep -v 'browser_emu' | grep -v 'gcbackend' | grep -v "#!" >> $BUILD_BASE/usr/local/bin/gc_dialer.py
51 chmod 755 $BUILD_BASE/usr/local/bin/gc_dialer.py
55 #Perform platform specific work
56 if [ "$PLATFORM" != "desktop" ]; then
57 echo " Generic Maemo Support"
58 # Compress whitespace for 30% savings, make sure we are a HildonWindow
59 sed -i 's/^[ \t]*//;s/[ \t]*$//;s/GtkWindow/HildonWindow/' $BUILD_BASE/usr/local/lib/gc_dialer.glade