File: win_build.pl

package info (click to toggle)
publican 4.3.2-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,364 kB
  • sloc: javascript: 17,390; perl: 13,081; xml: 11,558; makefile: 167; python: 29; sh: 29
file content (79 lines) | stat: -rwxr-xr-x 1,962 bytes parent folder | download | duplicates (5)
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
74
75
76
77
78
79
#!/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 $build = 1;

my @brands = qw{publican-fedora publican-gimp publican-jboss publican-jboss-community publican-jboss-community-hibernate publican-redhat publican-jboss-community-richfaces };
if($build) {
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;

if($build) {
$dir = pushd("Users_Guide");
system(qq{perl -CDAS -I $lib $publican clean --common_config="$common_config" --common_content="$common_content"});
system(qq{perl -CDAS -I $lib $publican build --publish --formats=html-desktop --langs=en-US --common_config="$common_config" --common_content="$common_content"});
$dir = undef;

my $brand_path = 'C:\Users\jfearn\publican';#'C:\publican\trunk';

foreach my $brand (@brands) {
	print("\nPreparing $brand\n");
	$dir = pushd("$brand_path/$brand");
	system(qq{perl -CDAS -I $lib $publican clean --common_config="$common_config" --common_content="$common_content"});
	system(qq{perl -CDAS -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);