#!perl.exe # # Douglas Thrift's Search Engine Installer Build Script # # $Id$ use strict; my $output = qx("./Search.exe" "-version"); my $mingw = "no"; for (my $index = 0; $index <= $#ARGV; $index++) { if ($ARGV[$index] eq "-mingw") { $mingw = "yes"; } } if ($output =~ /Douglas Thrift\'s Search Engine ((\d+)\.(\d+)\w*)/) { my $defines = "/DDTSE_VERSION=$1 /DDTSE_MAJOR=$2 /DDTSE_MINOR=$3"; if ($mingw eq "yes") { $defines .= " /DDTSE_MINGW"; } if ($output =~ /OpenSSL/) { $defines .= " /DDTSE_OPENSSL"; } system("makensis $defines dtse-win32.nsi"); } else { die "$0: couldn't get version"; }