mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
CLI fixes, separate cmd version from regular
This commit is contained in:
@@ -42,10 +42,10 @@ namespace Flowframes
|
|||||||
|
|
||||||
var optsSet = new OptionSet
|
var optsSet = new OptionSet
|
||||||
{
|
{
|
||||||
{
|
// {
|
||||||
"c|console", "Show console",
|
// "c|console", "Show console",
|
||||||
v => ShowConsole = v != null
|
// v => ShowConsole = v != null
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
"np|no_python", "Disable Python implementations",
|
"np|no_python", "Disable Python implementations",
|
||||||
v => DisablePython = v != null
|
v => DisablePython = v != null
|
||||||
@@ -127,8 +127,8 @@ namespace Flowframes
|
|||||||
if (!opts.TryParseOptions(Environment.GetCommandLineArgs()))
|
if (!opts.TryParseOptions(Environment.GetCommandLineArgs()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!ShowConsole)
|
// if (!ShowConsole)
|
||||||
FreeConsole();
|
// FreeConsole();
|
||||||
|
|
||||||
Python.DisablePython = DisablePython;
|
Python.DisablePython = DisablePython;
|
||||||
Config.NoWrite = DontSaveConfig;
|
Config.NoWrite = DontSaveConfig;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProjectGuid>{389E42DD-A163-49D7-9E0A-AE41090A07B3}</ProjectGuid>
|
<ProjectGuid>{389E42DD-A163-49D7-9E0A-AE41090A07B3}</ProjectGuid>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>Flowframes</RootNamespace>
|
<RootNamespace>Flowframes</RootNamespace>
|
||||||
<AssemblyName>Flowframes</AssemblyName>
|
<AssemblyName>Flowframes</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ namespace Flowframes
|
|||||||
Config.Init();
|
Config.Init();
|
||||||
|
|
||||||
Task.Run(() => DiskSpaceCheckLoop());
|
Task.Run(() => DiskSpaceCheckLoop());
|
||||||
args = Environment.GetCommandLineArgs().Where(a => a[0] == '-').Select(x => x.Trim().Substring(1).Lower()).ToArray();
|
|
||||||
Logger.Log($"Command Line: {Environment.CommandLine}", true);
|
Logger.Log($"Command Line: {Environment.CommandLine}", true);
|
||||||
|
|
||||||
LaunchGui();
|
LaunchGui();
|
||||||
@@ -64,7 +63,7 @@ namespace Flowframes
|
|||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
bool showMdlDownloader = Cli.ShowMdlDownloader || args.Contains("show-model-downloader"); // The latter check may be needed for legacy reasons
|
bool showMdlDownloader = Cli.ShowMdlDownloader; // The latter check may be needed for legacy reasons
|
||||||
|
|
||||||
mainForm = new Form1() { ShowModelDownloader = showMdlDownloader, Enabled = !Cli.AutoRun };
|
mainForm = new Form1() { ShowModelDownloader = showMdlDownloader, Enabled = !Cli.AutoRun };
|
||||||
Application.Run(mainForm);
|
Application.Run(mainForm);
|
||||||
|
|||||||
Reference in New Issue
Block a user