mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-29 13:21:59 +08:00
Added --no-gui flag to force CLI usage (allows for CLI usage with AppImage build).
Forced --gui flag in AppImage build.
This commit is contained in:
parent
66074f5398
commit
d6469b284a
@ -114,6 +114,8 @@ Contributions by Henrik Brix Andersen, Vojtech Bubnik, Nicolas Dandrimont, Mark
|
||||
GUI options:
|
||||
--gui Forces the GUI launch instead of command line slicing (if you
|
||||
supply a model file, it will be loaded into the plater)
|
||||
--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:
|
||||
|
@ -54,7 +54,7 @@ cd - > /dev/null
|
||||
# disable parameter expansion to forward all arguments unprocessed to the VM
|
||||
set -f
|
||||
# run the VM and pass along all arguments as is
|
||||
LD_LIBRARY_PATH="$DIR/usr/lib" "${DIR}/usr/bin/perl-local" -I"${DIR}/usr/lib/local-lib/lib/perl5" "${DIR}/usr/bin/slic3r.pl" "$@"
|
||||
LD_LIBRARY_PATH="$DIR/usr/lib" "${DIR}/usr/bin/perl-local" -I"${DIR}/usr/lib/local-lib/lib/perl5" "${DIR}/usr/bin/slic3r.pl" --gui "$@"
|
||||
EOF
|
||||
|
||||
chmod +x AppRun
|
||||
|
@ -29,6 +29,7 @@ my %cli_options = ();
|
||||
|
||||
'debug' => \$Slic3r::debug,
|
||||
'gui' => \$opt{gui},
|
||||
'no-gui' => \$opt{no_gui},
|
||||
'o|output=s' => \$opt{output},
|
||||
'j|threads=i' => \$opt{threads},
|
||||
|
||||
@ -105,7 +106,7 @@ if ($opt{save}) {
|
||||
|
||||
# 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} // '');
|
||||
@ -336,6 +337,8 @@ $j
|
||||
GUI options:
|
||||
--gui Forces the GUI launch instead of command line slicing (if you
|
||||
supply a model file, it will be loaded into the plater)
|
||||
--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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user