StrawberryPerl/Perl-Dist-Strawberry

remove dependency on WiX when MSI output is disabled

Closed this issue · 14 comments

remove dependency on WiX when MSI output is disabled

This appears to be the relevant code:

if (defined $self->global->{wixbin_dir}) {
my $d = $self->global->{wixbin_dir};
unless (-f "$d/candle.exe" && -f "$d/light.exe") {
die "ERROR: invalid wixbin_dir '$d' (candle.exe+light.exe not found)\n";
}
}

Adding a check for $ENV{SKIP_MSI_STEP} might be sufficient. Maybe also check the list of steps for OutputMSI.

Indeed, candle.exe & light.exe are required by OutputMSI and the related step will fail if run with not functional such binary.

But you can remove the related step from your .pp file and remove the -wixbin_dir option from the bat file so the step pointed out by @shawnlaffan will just be skipped.

@g-bougard That's what I am doing.

May I try to fix this issue? Can be cool to become a strawberry perl contributor.

@sergiotarxz Of course. We're happy to get help from as many people as possible. If you want to discuss things with people, you can join the IRC channel as well.

@genio What irc channel?

I cannot connect to irc.perl.org it hangs forever... Not even in kiwi.

@g-bougard That's what I am doing.

Can you at least share the output showing your issue ? And maybe your script ?

I will share a reproducible example as soon as I can. What I mean is that I did that to circumvent the error. It happens without doing nothing that is not setting the environment variable.

@sergiotarxz - have you been able to generate a reproducible example?

@shawnlaffan You have to stop sending -wixbin_dir=z:\sw\wix311 in the build files and set the environment variable SKIP_MSI_STEP to a perl true value and the code will still need wixbin_dir or it will refuse to work even when wixbin is no longer needed because you no longer need to generate a MSI.

Looking back over the thread, there is this comment: #172 (comment)

So the change should just require an additional check for the env var:

if (defined $self->global->{wixbin_dir}) {

becomes

        if (defined $self->global->{wixbin_dir} && !$ENV{SKIP_MSI_STEP}) { 

@sergiotarxz - would you be up to implementing a PR? It's not hard to do myself but it's good to have more contributors.

Actually it is slightly more complex than just a one-line change. PR is in #194