Only install ParseXS and Slic3r-XS when --gui is not supplied

This commit is contained in:
Alessandro Ranellucci 2013-09-17 21:52:10 +02:00
parent bbbdae3952
commit c421feb633

View File

@ -27,7 +27,9 @@ my %recommends = qw(
Growl::GNTP 0.15
XML::SAX::ExpatXS 0
);
if (defined $ARGV[0] && $ARGV[0] eq '--gui') {
my $gui = defined $ARGV[0] && $ARGV[0] eq '--gui';
if ($gui) {
%prereqs = qw(
Wx 0.9918
);
@ -106,6 +108,7 @@ EOF
}
}
if (!$gui) {
# temporarily require this dev version until this upstream bug
# is resolved: https://rt.cpan.org/Ticket/Display.html?id=86367
system $cpanm, 'SMUELLER/ExtUtils-ParseXS-3.18_04.tar.gz';
@ -122,6 +125,7 @@ EOF
}
}
system $cpanm, '--reinstall', './xs';
}
}
if ($missing_prereqs) {
@ -130,7 +134,7 @@ if ($missing_prereqs) {
if (eval "use App::Prove; 1") {
App::Prove->new->run;
}
if (!defined $ARGV[0] || $ARGV[0] ne '--gui') {
if (!$gui) {
print "If you also want to use the GUI you can now run `perl Build.PL --gui` to install the required modules.\n";
}
}