| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
### Script to create a win32 installer file |
| 4 |
### 20090510 Stelios Bounanos M0GLD, Dave Freese W1HKJ |
| 5 |
|
| 6 |
### change for the target application |
| 7 |
comptty_name=comptty |
| 8 |
comptty_bin=comptty.exe |
| 9 |
|
| 10 |
if [ $# -ne 2 ]; then |
| 11 |
echo "Syntax: $0 data-dir build-dir" >&2 |
| 12 |
exit 1 |
| 13 |
fi |
| 14 |
|
| 15 |
if [ -z "$PACKAGE_TARNAME" ]; then |
| 16 |
echo "E: \$PACKAGE_TARNAME undefined" |
| 17 |
exit 1 |
| 18 |
fi |
| 19 |
|
| 20 |
PWD=`pwd` |
| 21 |
data="${PWD}/$1" |
| 22 |
build="${PWD}/$2" |
| 23 |
|
| 24 |
# more sanity checks |
| 25 |
for d in "$data" "$build"; do |
| 26 |
test -d "$d" && continue |
| 27 |
echo "E: ${d}: not a directory" >&2 |
| 28 |
exit 1 |
| 29 |
done |
| 30 |
if ! test -w "$build"; then |
| 31 |
echo "E: ${build} is not writeable" >&2 |
| 32 |
exit 1 |
| 33 |
fi |
| 34 |
|
| 35 |
set -e |
| 36 |
|
| 37 |
test "x$NOSTRIP" = "x" && $STRIP -S "$comptty_bin" |
| 38 |
def="$def -Dcomptty_NAME=$comptty_name -Dcomptty_BINARY=$comptty_bin -Dcomptty_VERSION=$PACKAGE_VERSION" |
| 39 |
|
| 40 |
$MAKENSIS -V2 -NOCD -D"INSTALLER_FILE=$INSTALLER_FILE" -D"LICENSE_FILE=$data/../COPYING" \ |
| 41 |
-D"SUPPORT_URL=$PACKAGE_HOME" -D"UPDATES_URL=$PACKAGE_DL" $def "$data/win32/fl_app.nsi" |