Skip to content

Commit 39de5b0

Browse files
authored
Merge pull request #194 from StrawberryPerl/issue_172_disable_wix_if_no_MSI
Fully disable checks when $ENV{SKIP_MSI_STEP} is true Fixes #172
2 parents af07fea + fbc2693 commit 39de5b0

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

lib/Perl/Dist/Strawberry.pm

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ sub parse_options {
8484
$self->global->{image_dir_quotemeta} = $idq;
8585
$self->global->{image_dir_url} = "file:///$idu";
8686

87-
if (defined $self->global->{wixbin_dir}) {
87+
if (defined $self->global->{wixbin_dir} && !$ENV{SKIP_MSI_STEP}) {
8888
my $d = $self->global->{wixbin_dir};
8989
unless (-f "$d/candle.exe" && -f "$d/light.exe") {
9090
die "ERROR: invalid wixbin_dir '$d' (candle.exe+light.exe not found)\n";
@@ -119,11 +119,21 @@ sub do_job {
119119

120120
#check
121121
$self->message(0, "starting global check");
122-
$i = 0;
123-
for (@{$self->{build_job_steps}}) {
124-
$self->message(1, "checking [step:$i] ".ref($_));
125-
$_->check unless $_->{data}->{done}; # dies on error
122+
$i = -1;
123+
STEP:
124+
for my $step (@{$self->{build_job_steps}}) {
126125
$i++;
126+
my $msg = "checking [step:$i] ".ref($_);
127+
if ($step->{config}->{disable}) {
128+
$msg .= " (disabled, skipping check)";
129+
$self->message(1, $msg);
130+
next STEP;
131+
}
132+
$self->message(1, $msg);
133+
134+
next STEP if $step->{data}->{done};
135+
136+
$step->check; # dies on error
127137
};
128138

129139
#run

0 commit comments

Comments
 (0)