1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
#!/usr/bin/perl
use strict;
use warnings;
use File::pushd;
use Cwd qw(abs_path);
=head1 Description
This script builds the Windows installer. The installer creates a stand alone installation that bundles the perl environment.
It requires:
=over
=item *
The publican source including the brands
=item *
Perl
=item *
NSIS
=item *
PP
=item *
Up to date LibXML and LibXSLT packages
=back
See README for more information on deps.
=cut
my @brands = qw{publican-fedora publican-gimp publican-jboss publican-jboss-community publican-jboss-community-hibernate publican-redhat publican-jboss-community-richfaces };
system('Build realclean') if( -f 'Build' );
system('perl Build.PL');
system('Build');
my $common_content = abs_path('blib/datadir/Common_Content');
my $common_config = abs_path('blib/datadir');
my $publican = abs_path('blib/script/publican');
my $lib = abs_path('blib/lib');
my $dir;
$dir = pushd("Users_Guide");
system(qq{perl -I $lib $publican clean --common_config="$common_config" --common_content="$common_content"});
system(qq{perl -I $lib $publican build --publish --formats=html-desktop --langs=en-US --common_config="$common_config" --common_content="$common_content"});
$dir = undef;
my $brand_path = 'D:\Data\temp\Redhat\publican\trunk';
foreach my $brand (@brands) {
print("\nPreparing $brand\n");
$dir = pushd("$brand_path/$brand");
system(qq{perl -I $lib $publican clean --common_config="$common_config" --common_content="$common_content"});
system(qq{perl -I $lib $publican build --formats=xml --langs=all --publish --common_config="$common_config" --common_content="$common_content"});
$dir = undef;
}
$dir = pushd('windows');
print("\nRunning pp\n");
system('pp @pp-opts ..\bin\publican -vv 1>2> pp.log');
print("\nRunning NSIS\n");
system('"C:\Program Files\NSIS\makensis.exe" publican.nsi');
$dir = undef;
exit(0);
|