Rename commands classes

This commit is contained in:
Caelan
2022-05-29 17:13:12 -06:00
parent a8127f2017
commit 16e670f73f
4 changed files with 11 additions and 11 deletions

View File

@@ -11,9 +11,9 @@ using Squirrel.SimpleSplat;
namespace Squirrel.CommandLine.OSX
{
class CommandsOSX
class Commands
{
static IFullLogger Log => SquirrelLocator.Current.GetService<ILogManager>().GetLogger(typeof(CommandsOSX));
static IFullLogger Log => SquirrelLocator.Current.GetService<ILogManager>().GetLogger(typeof(Commands));
public static CommandSet GetCommands()
{
@@ -72,7 +72,7 @@ namespace Squirrel.CommandLine.OSX
if (options.icon != null)
Log.Warn("--icon is ignored if the pack directory is a '.app' bundle.");
if (options.exeName != null)
if (options.mainExe != null)
Log.Warn("--exeName is ignored if the pack directory is a '.app' bundle.");
appBundlePath = Path.Combine(releaseDir.FullName, options.packId + ".app");
@@ -91,7 +91,7 @@ namespace Squirrel.CommandLine.OSX
throw new OptionValidationException("--icon is required when generating a new app bundle.");
// auto-discover exe if it's the same as packId
var exeName = options.exeName;
var exeName = options.mainExe;
if (exeName == null && File.Exists(Path.Combine(options.packDirectory, options.packId)))
exeName = options.packId;
@@ -108,7 +108,7 @@ namespace Squirrel.CommandLine.OSX
var info = new AppInfo {
CFBundleName = options.packTitle ?? options.packId,
CFBundleDisplayName = options.packTitle ?? options.packId,
CFBundleExecutable = options.exeName,
CFBundleExecutable = options.mainExe,
CFBundleIdentifier = escapedAppleId,
CFBundlePackageType = "APPL",
CFBundleShortVersionString = options.packVersion,

View File

@@ -18,7 +18,7 @@ namespace Squirrel.CommandLine.OSX
public bool includePdb { get; private set; }
public string releaseNotes { get; private set; }
public string icon { get; private set; }
public string exeName { get; private set; }
public string mainExe { get; private set; }
public BundleOptions()
{
@@ -30,7 +30,7 @@ namespace Squirrel.CommandLine.OSX
Add("packTitle=", "Optional display/friendly {NAME} for bundle", v => packTitle = v);
Add("includePdb", "Add *.pdb files to release package", v => includePdb = true);
Add("releaseNotes=", "{PATH} to file with markdown notes for version", v => releaseNotes = v);
Add("e=|exeName=", "The file {NAME} of the main executable", v => exeName = v);
Add("e=|mainExe=", "The file {NAME} of the main executable", v => mainExe = v);
Add("i=|icon=", "{PATH} to the .icns file for this bundle", v => icon = v);
}

View File

@@ -43,7 +43,7 @@ namespace Squirrel.CommandLine
case "windows":
if (!SquirrelRuntimeInfo.IsWindows)
logger.Write("Cross-compiling will cause some features of Squirrel to be disabled.", LogLevel.Warn);
packageCommands = Windows.CommandsWindows.GetCommands();
packageCommands = Windows.Commands.GetCommands();
break;
case "mac":
@@ -51,7 +51,7 @@ namespace Squirrel.CommandLine
case "macos":
if (!SquirrelRuntimeInfo.IsOSX)
logger.Write("Cross-compiling will cause some features of Squirrel to be disabled.", LogLevel.Warn);
packageCommands = OSX.CommandsOSX.GetCommands();
packageCommands = OSX.Commands.GetCommands();
break;
default:

View File

@@ -15,9 +15,9 @@ using Squirrel.SimpleSplat;
namespace Squirrel.CommandLine.Windows
{
class CommandsWindows : IEnableLogger
class Commands : IEnableLogger
{
static IFullLogger Log => SquirrelLocator.Current.GetService<ILogManager>().GetLogger(typeof(CommandsWindows));
static IFullLogger Log => SquirrelLocator.Current.GetService<ILogManager>().GetLogger(typeof(Commands));
public static CommandSet GetCommands()
{