From 5a844c91f12ceb0fab87ec888f463d057bffdd06 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 3 Oct 2017 17:05:47 +0200 Subject: [PATCH] When executing G-code post-processing scripts written in perl on windows, run the perl interpreter, which was used to run the Slic3r. https://github.com/prusa3d/Slic3r/issues/514 --- lib/Slic3r/Print.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 3db1b0b43..160f70e06 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -89,7 +89,11 @@ sub export_gcode { if (($^O eq 'MSWin32') ? !(-e $script) : !(-x $script)) { die "The configured post-processing script is not executable: check permissions. ($script)\n"; } - system($script, $output_file); + if ($^O eq 'MSWin32' && $script =~ /\.[pP][lL]/) { + system($^X, $script, $output_file); + } else { + system($script, $output_file); + } } } }