| 1 | #!/usr/bin/perl -w | ||
| 2 | use strict; | ||
| 3 | use lib 'lib'; | ||
| 4 | use IPC::System::Simple qw(run); | ||
| 5 | require App::SweeperBot; | ||
| 6 | |||
| 7 | my $output = q{SweeperBot.exe}; | ||
| 8 | my $input = q{bin\sweeperbot.pl}; | ||
| 9 | |||
| 10 | my @dlls = qw( | ||
| 11 | CORE_RL_bzlib_ | ||
| 12 | CORE_RL_jpeg_ | ||
| 13 | CORE_RL_lcms_ | ||
| 14 | CORE_RL_magick_ | ||
| 15 | CORE_RL_tiff_ | ||
| 16 | CORE_RL_ttf_ | ||
| 17 | CORE_RL_zlib_ | ||
| 18 | IM_MOD_RL_rgb_ | ||
| 19 | IM_MOD_RL_rle_ | ||
| 20 | X11 | ||
| 21 | ); | ||
| 22 | |||
| 23 | my @info = ( | ||
| 24 | qq{FileVersion=$App::SweeperBot::VERSION}, | ||
| 25 | qq{FileDescription="Play minesweeper automatically"}, | ||
| 26 | qq{LegalCopyright="May be distributed or modified under the terms of Perl 5"}, | ||
| 27 | ); | ||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | my $magick_path = q{c:\perl\site\lib\auto\Image\Magick}; | ||
| 32 | |||
| 33 | foreach my $dll (@dlls) { | ||
| 34 | -e "$magick_path/$dll.dll" or die "Can't find $magick_path/$dll.dll"; | ||
| 35 | } | ||
| 36 | |||
| 37 | run( | ||
| 38 | q{pp.bat},'-o', $output, '-I=lib', | ||
| 39 | ( map { "-l=$magick_path\\$_.dll" } @dlls), | ||
| 40 | '-N', join(";",@info), | ||
| 41 | qw(-z 9), | ||
| 42 | $input | ||
| 43 | ); | ||
| 44 |