Meaningful error when user wants to use 3D preview but didn't install the required modules.
This commit is contained in:
parent
7d09f17810
commit
5a9c163a2e
13
Build.PL
13
Build.PL
@ -124,10 +124,15 @@ EOF
|
|||||||
system $cpanm, '--reinstall', './xs';
|
system $cpanm, '--reinstall', './xs';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eval "use App::Prove; 1" && !$missing_prereqs) {
|
if ($missing_prereqs) {
|
||||||
App::Prove->new->run;
|
exit 1;
|
||||||
|
} else {
|
||||||
|
if (eval "use App::Prove; 1") {
|
||||||
|
App::Prove->new->run;
|
||||||
|
}
|
||||||
|
if (!defined $ARGV[0] && $ARGV[0] ne '--gui') {
|
||||||
|
print "If you also want to use the GUI you can now run `perl Build.PL --gui` to install the required modules.\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit 1 if $missing_prereqs;
|
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
@ -1079,6 +1079,11 @@ sub object_preview_dialog {
|
|||||||
($obj_idx, undef) = $self->selected_object;
|
($obj_idx, undef) = $self->selected_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$Slic3r::GUI::have_OpenGL) {
|
||||||
|
Slic3r::GUI::show_error($self, "Please install the OpenGL modules to use this feature (see build instructions).");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
my $dlg = Slic3r::GUI::Plater::ObjectPreviewDialog->new($self,
|
my $dlg = Slic3r::GUI::Plater::ObjectPreviewDialog->new($self,
|
||||||
object => $self->{objects}[$obj_idx],
|
object => $self->{objects}[$obj_idx],
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user