Skip to content

Commit

Permalink
Added --no-gui flag to force CLI usage (allows for CLI usage with App…
Browse files Browse the repository at this point in the history
…Image build).

Forced --gui flag in AppImage build.
  • Loading branch information
lordofhyphens authored and bubnikv committed Nov 30, 2017
1 parent d161d4f commit 488feb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -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 <file> Automatically export current configuration to the specified file

Output options:
Expand Down
5 changes: 4 additions & 1 deletion slic3r.pl
Expand Up @@ -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},
Expand Down Expand Up @@ -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} // '');
Expand Down Expand Up @@ -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 <file> Automatically export current configuration to the specified file
Output options:
Expand Down

0 comments on commit 488feb2

Please sign in to comment.