diff --git a/SabreHelper/Build.cs b/SabreHelper/Build.cs index d1ffcbf6..819eb541 100644 --- a/SabreHelper/Build.cs +++ b/SabreHelper/Build.cs @@ -130,6 +130,7 @@ Usage: SingleGame.exe [-r=rootdir|-n] Options: -r=rootdir Set the directory name for path size + -l, --log Enable logging to file -n Disable single-game mode -z Disable forceunzipping "); diff --git a/SingleGame/SingleGame.cs b/SingleGame/SingleGame.cs index df399717..8dd9349e 100644 --- a/SingleGame/SingleGame.cs +++ b/SingleGame/SingleGame.cs @@ -40,6 +40,7 @@ namespace SabreTools _filename = args[0]; + bool tofile = false; if (args.Length > 1) { for (int i = 1; i < args.Length; i++) @@ -52,6 +53,10 @@ namespace SabreTools case "-z": _forceunpack = false; break; + case "-l": + case "--log": + tofile = true; + break; default: if (args[i].StartsWith("-r")) { @@ -62,6 +67,9 @@ namespace SabreTools } } + // Set the possibly new value for logger + logger.ToFile = tofile; + _path = (_path == "" ? Environment.CurrentDirectory : _path); // Drag and drop means quotes; we don't want quotes