From 488feb23352b07c27b07468408f1318dd745810f Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 2 Sep 2017 13:36:20 -0500 Subject: [PATCH] Added --no-gui flag to force CLI usage (allows for CLI usage with AppImage build). Forced --gui flag in AppImage build. --- README.md | 2 ++ slic3r.pl | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d9f90b01c3..40c22b98af6 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ The author of the Silk icon set is Mark James. --gui Forces the GUI launch instead of command line slicing (if you supply a model file, it will be loaded into the plater) --no-plater Disable the plater tab + --no-gui Forces the command line slicing instead of gui. + This takes precedence over --gui if both are present. --autosave Automatically export current configuration to the specified file Output options: diff --git a/slic3r.pl b/slic3r.pl index e49457c20ba..3a13c823012 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -31,6 +31,7 @@ BEGIN 'debug' => \$Slic3r::debug, 'gui' => \$opt{gui}, + 'no-gui' => \$opt{no_gui}, 'o|output=s' => \$opt{output}, 'save=s' => \$opt{save}, @@ -102,7 +103,7 @@ BEGIN # launch GUI my $gui; -if ((!@ARGV || $opt{gui}) && !$opt{save} && eval "require Slic3r::GUI; 1") { +if ((!@ARGV || $opt{gui}) && !(!@ARGV || $opt{no_gui}) && !$opt{save} && eval "require Slic3r::GUI; 1") { { no warnings 'once'; $Slic3r::GUI::datadir = Slic3r::decode_path($opt{datadir} // ''); @@ -267,6 +268,8 @@ sub usage { --gui Forces the GUI launch instead of command line slicing (if you supply a model file, it will be loaded into the plater) --no-plater Disable the plater tab + --no-gui Forces the command line slicing instead of gui. + This takes precedence over --gui if both are present. --autosave Automatically export current configuration to the specified file Output options: