1#!perl.exe 2# 3# Douglas Thrift's Search Engine Installer Build Script 4# 5# $Id: dtse-win32.pl 331 2004-04-05 22:50:25Z Douglas Thrift $ 6 7use strict; 8 9my $output = qx("./Search.exe" "-version"); 10my $mingw = "no"; 11 12for (my $index = 0; $index <= $#ARGV; $index++) 13{ 14 if ($ARGV[$index] eq "-mingw") 15 { 16 $mingw = "yes"; 17 } 18} 19 20if ($output =~ /Douglas Thrift\'s Search Engine ((\d+)\.(\d+)\w*)/) 21{ 22 my $defines = "/DDTSE_VERSION=$1 /DDTSE_MAJOR=$2 /DDTSE_MINOR=$3"; 23 24 if ($mingw eq "yes") { $defines .= " /DDTSE_MINGW"; } 25 if ($output =~ /OpenSSL/) { $defines .= " /DDTSE_OPENSSL"; } 26 27 system("makensis $defines dtse-win32.nsi"); 28} 29else 30{ 31 die "$0: couldn't get version"; 32} 33