#!/bin/sh
mkdir -p "$SYMROOT/$BUILD_STYLE/AlephOne.app/Contents/Resources/DataFiles"
cp "$SRCROOT"/../data/Fonts "$SYMROOT/$BUILD_STYLE/AlephOne.app/Contents/Resources/DataFiles/"
mkdir -p "$SYMROOT/$BUILD_STYLE/AlephOne.app/Contents/Resources/DataFiles/Themes"
cp -R "$SRCROOT/../data/default_theme" "$SYMROOT/$BUILD_STYLE/AlephOne.app/Contents/Resources/DataFiles/Themes/Default" 2>/dev/null
rm -rf "$SYMROOT"/$BUILD_STYLE/AlephOne.app/Contents/Resources/DataFiles/Themes/Default/{CVS,Makefile.am}

# Update Info.plist based on alephversion.h
DISPLAY_VERSION=$( grep '^#define A1_DISPLAY_VERSION' "$SRCROOT"/../Source_Files/Misc/alephversion.h | sed -e 's/\(.*\"\)\(.*\)\(\"\)/\2/g' )
DATE_VERSION=$( grep '^#define A1_DATE_VERSION' "$SRCROOT"/../Source_Files/Misc/alephversion.h | sed -e 's/\(.*\"\)\(.*\)\(\"\)/\2/g' )
sed -i '' -e s/A1_DISPLAY_VERSION/$DISPLAY_VERSION/g "$SYMROOT/$BUILD_STYLE/AlephOne.app/Contents/Info.plist"
sed -i '' -e s/A1_DATE_VERSION/$DATE_VERSION/g "$SYMROOT/$BUILD_STYLE/AlephOne.app/Contents/Info.plist"


