#!/bin/sh

set -e

if [ "$1" == "" ]; then
    echo "Usage: make_package BUILD_DIR"
    exit 1
fi

rm -rf $1/dist/wine_gecko
make -C $1/xulrunner/installer
cp -r $1/dist/xulrunner $1/dist/wine_gecko
cp wine/VERSION $1/dist/wine_gecko
for f in README.txt xulrunner.exe xulrunner-stub.exe js.exe nspr-config; do
    rm -f $1/dist/wine_gecko/$f
done

echo "New package is in dist/wine_gecko. You need to create a CAB archive from it."

