mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 12:41:24 +12:00
Code refactoring
This commit is contained in:
parent
2a9fc60117
commit
b178657d3f
|
@ -47,16 +47,14 @@ private enum SetupJobs
|
||||||
CreateChecksumFile = 1 << 8,
|
CreateChecksumFile = 1 << 8,
|
||||||
OpenOutputDirectory = 1 << 9,
|
OpenOutputDirectory = 1 << 9,
|
||||||
|
|
||||||
Stable = CreateSetup | CreatePortable | CreateChecksumFile | OpenOutputDirectory,
|
Release = CreateSetup | CreatePortable | DownloadFFmpeg | CreateChecksumFile | OpenOutputDirectory,
|
||||||
Setup = CreateSetup | OpenOutputDirectory,
|
Debug = CreateDebug | DownloadFFmpeg | CreateChecksumFile | OpenOutputDirectory,
|
||||||
Portable = CreatePortable | OpenOutputDirectory,
|
Steam = CreateSteamFolder | DownloadFFmpeg | CreateChecksumFile | OpenOutputDirectory,
|
||||||
Debug = CreateDebug | OpenOutputDirectory,
|
MicrosoftStore = CreateMicrosoftStoreFolder | CompileAppx | DownloadFFmpeg | CreateChecksumFile | OpenOutputDirectory,
|
||||||
Steam = CreateSteamFolder | OpenOutputDirectory,
|
MicrosoftStoreDebug = CreateMicrosoftStoreDebugFolder | CompileAppx | DownloadFFmpeg | CreateChecksumFile | OpenOutputDirectory
|
||||||
MicrosoftStore = CreateMicrosoftStoreFolder | CompileAppx | OpenOutputDirectory,
|
|
||||||
MicrosoftStoreDebug = CreateMicrosoftStoreDebugFolder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SetupJobs Job = SetupJobs.Debug;
|
private static SetupJobs Job = SetupJobs.Release;
|
||||||
private static bool AppVeyor = false;
|
private static bool AppVeyor = false;
|
||||||
|
|
||||||
private static string Configuration
|
private static string Configuration
|
||||||
|
@ -199,7 +197,7 @@ private static void Main(string[] args)
|
||||||
FileHelpers.CopyAll(OutputDir, ParentDir);
|
FileHelpers.CopyAll(OutputDir, ParentDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Job.HasFlag(SetupJobs.OpenOutputDirectory))
|
if (Job.HasFlag(SetupJobs.OpenOutputDirectory) && !AppVeyor)
|
||||||
{
|
{
|
||||||
FileHelpers.OpenFolder(OutputDir, false);
|
FileHelpers.OpenFolder(OutputDir, false);
|
||||||
}
|
}
|
||||||
|
@ -224,19 +222,19 @@ private static void CheckArgs(string[] args)
|
||||||
|
|
||||||
if (configuration.Equals("Release", StringComparison.OrdinalIgnoreCase))
|
if (configuration.Equals("Release", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
Job = SetupJobs.CreateSetup | SetupJobs.CreatePortable | SetupJobs.CreateChecksumFile | SetupJobs.DownloadFFmpeg;
|
Job = SetupJobs.Release;
|
||||||
}
|
}
|
||||||
else if (configuration.Equals("Debug", StringComparison.OrdinalIgnoreCase))
|
else if (configuration.Equals("Debug", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
Job = SetupJobs.CreateDebug | SetupJobs.CreateChecksumFile | SetupJobs.DownloadFFmpeg;
|
Job = SetupJobs.Debug;
|
||||||
}
|
}
|
||||||
else if (configuration.Equals("Steam", StringComparison.OrdinalIgnoreCase))
|
else if (configuration.Equals("Steam", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
Job = SetupJobs.CreateSteamFolder | SetupJobs.CreateChecksumFile | SetupJobs.DownloadFFmpeg;
|
Job = SetupJobs.Steam;
|
||||||
}
|
}
|
||||||
else if (configuration.Equals("MicrosoftStore", StringComparison.OrdinalIgnoreCase))
|
else if (configuration.Equals("MicrosoftStore", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
Job = SetupJobs.CreateMicrosoftStoreFolder | SetupJobs.CompileAppx | SetupJobs.CreateChecksumFile | SetupJobs.DownloadFFmpeg;
|
Job = SetupJobs.MicrosoftStore;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue