Skip to content

Commit

Permalink
Platform dependant code in F.T.CmdLine was disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ASPePeX committed Nov 25, 2021
1 parent c3aa1b0 commit b86cc54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 4 additions & 8 deletions src/Tools/CmdLine/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@ class Program
[STAThread]
static void Main(string[] args)
{
#if WINDOWS
var result = Parser.Default.ParseArguments<Install, Pack, Player, Publish, ProtoSchema>(args)
.WithParsed<Install>(install =>
{
install.Run();
})
#else
var result = Parser.Default.ParseArguments<Pack, Player, Publish, ProtoSchema>(args)
#endif
.WithParsed<Pack>(pack =>
{
pack.Run();
Expand All @@ -38,6 +30,10 @@ static void Main(string[] args)
{
publish.Run();
})
.WithParsed<Install>(install =>
{
install.Run();
})
.WithNotParsed(errs =>
{
/*foreach (var error in errs)
Expand Down
8 changes: 6 additions & 2 deletions src/Tools/CmdLine/Verbs/Install.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace Fusee.Tools.CmdLine.Verbs
{
#if WINDOWS
#nullable enable
[Verb("install", HelpText = "Sets up file association for .fus and .fuz files as well as a custom uri handler for 'fusee://'.")]
internal class Install
Expand All @@ -16,6 +15,12 @@ internal class Install

public int Run()
{
if (!OperatingSystem.IsWindows())
{
Console.WriteLine("This operation is only available on Windows operating systems!");
return (int)ErrorCode.PlatformNotHandled;
}

ErrorCode exitCode = ErrorCode.Success;

if (!Uninstall)
Expand Down Expand Up @@ -100,5 +105,4 @@ public int Run()
return 0;
}
}
#endif
}

0 comments on commit b86cc54

Please sign in to comment.