Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[acd701]: mac / patch-xrc.sh Maximize Restore History

Download this file

patch-xrc.sh    56 lines (45 with data), 1.8 kB

 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
#!/bin/sh
# $Id: patch-xrc.sh 2004 2007-05-11 00:17:50Z ippei $
huginVer="$HUGIN_PACKAGE_VERSION"
huginBuilder="$HUGIN_BUILDER"
resdir="$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources"
huginsrcdir="../src/hugin1/hugin"
xrcsrcdir="$huginsrcdir/xrc"
celeste_data="../src/celeste/data"
icpfind_default="../src/hugin1/icpfind/default.mac"
hugin_exiftool_arg="../src/hugin_base/algorithms/panorama_makefile/hugin_exiftool_copy.arg"
rm -fR $resdir/xrc
echo "copying xrc folder to $resdir/xrc"
cp -R $xrcsrcdir $resdir/
# This file is needed for the new tabbed About panel
cp ../COPYING $resdir/xrc/data/
echo "removing extra files from xrc folder"
for DIR in $resdir/xrc "$resdir/xrc/??*" "$resdir/xrc/??*/??*"
do
rm -fR $DIR/.hg*
rm -f $DIR/.??*
rm -fR $DIR/CVS
rm -f $DIR/Makefil*
rm -f $DIR/CMake*
done
echo "patching $resdir/xrc/main_frame.xrc to have no border around the tab control."
mv $resdir/xrc/main_frame.xrc $resdir/xrc/main_frame.xrc-bk
sed -e s/wxALL// $resdir/xrc/main_frame.xrc-bk > $resdir/xrc/main_frame.xrc
rm $resdir/xrc/main_frame.xrc-bk
echo "reworking authors.txt to html like file"
rm -rf ../authors.1 ../authors.htm
# OSX sed doesn't recognise the \t as tab. Just use a TAB from the keyboard instead
sed -e 's+ +</td><td>+g' \
-e 's+$+</td></tr><tr><td>+g' \
../authors.txt > ../authors.htm
authors=`cat ../authors.htm`
echo "generating about.htm from about.htm.in"
sed -e "s+\${AUTHORS_LIST}+`echo $(cat ../authors.htm)`</td></tr>+g" \
$resdir/xrc/data/about.htm.in > $resdir/xrc/data/about.htm
rm $resdir/xrc/data/about.htm.in
echo "copying celeste data"
cp -f $celeste_data/* $resdir/xrc/
echo "copying default cpdetector settings"
cp -f $icpfind_default $resdir/xrc/default.setting
echo "copying exiftool settings"
cp -f $hugin_exiftool_arg $resdir/xrc