From a82330b835f030b58f60c7c24d247930174791ac Mon Sep 17 00:00:00 2001 From: Jaex Date: Fri, 14 Oct 2022 01:44:23 +0300 Subject: [PATCH] Create Steam zip file --- ShareX.Setup/Program.cs | 22 ++++++++++++++-------- appveyor.yml | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ShareX.Setup/Program.cs b/ShareX.Setup/Program.cs index cdf1f4e83..91393844a 100644 --- a/ShareX.Setup/Program.cs +++ b/ShareX.Setup/Program.cs @@ -82,9 +82,10 @@ private enum SetupJobs private static string InnoSetupDir => Path.Combine(SetupDir, "InnoSetup"); private static string MicrosoftStorePackageFilesDir => Path.Combine(SetupDir, "MicrosoftStore"); - private static string PortableFilePath => Path.Combine(OutputDir, $"ShareX-{AppVersion}-portable.zip"); + private static string PortableZipPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}-portable.zip"); private static string SteamLauncherDir => Path.Combine(ParentDir, @"ShareX.Steam\bin\Release"); private static string SteamUpdatesDir => Path.Combine(SteamOutputDir, "Updates"); + private static string SteamZipPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}-Steam.zip"); private static string NativeMessagingHostDir => Path.Combine(ParentDir, @"ShareX.NativeMessagingHost\bin\Release"); private static string RecorderDevicesSetupPath => Path.Combine(OutputDir, "Recorder-devices-setup.exe"); private static string MicrosoftStoreAppxPath => Path.Combine(OutputDir, $"ShareX-{AppVersion}.appx"); @@ -92,13 +93,14 @@ private enum SetupJobs private static string InnoSetupCompilerPath = @"C:\Program Files (x86)\Inno Setup 6\ISCC.exe"; private static string MakeAppxPath = @"C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\makeappx.exe"; - private static string AppVersion = GetAppVersion(); + private static string AppVersion; private static void Main(string[] args) { Console.WriteLine("ShareX setup started."); CheckAppVeyor(args); + AppVersion = GetAppVersion(); Console.WriteLine("Setup job: " + Job); @@ -311,14 +313,18 @@ private static void CreateFolder(string source, string destination, SetupJobs jo FileHelpers.CopyAll(Path.Combine(ParentDir, @"ShareX.ScreenCaptureLib\Stickers"), Path.Combine(destination, "Stickers")); - if (job == SetupJobs.CreateMicrosoftStoreFolder || job == SetupJobs.CreateMicrosoftStoreDebugFolder) - { - FileHelpers.CopyAll(MicrosoftStorePackageFilesDir, destination); - } - else if (job == SetupJobs.CreatePortable) + if (job == SetupJobs.CreatePortable) { FileHelpers.CreateEmptyFile(Path.Combine(destination, "Portable")); - ZipManager.Compress(Path.GetFullPath(destination), Path.GetFullPath(PortableFilePath)); + ZipManager.Compress(Path.GetFullPath(destination), Path.GetFullPath(PortableZipPath)); + } + else if (job == SetupJobs.CreateSteamFolder) + { + ZipManager.Compress(Path.GetFullPath(destination), Path.GetFullPath(SteamZipPath)); + } + else if (job == SetupJobs.CreateMicrosoftStoreFolder || job == SetupJobs.CreateMicrosoftStoreDebugFolder) + { + FileHelpers.CopyAll(MicrosoftStorePackageFilesDir, destination); } Console.WriteLine("Folder created."); diff --git a/appveyor.yml b/appveyor.yml index dba0c5e92..1f547be4f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ artifacts: name: Portable - path: ShareX-*-portable.zip.sha256 name: Portable-Checksum -- path: ShareX-Steam +- path: ShareX-*-Steam.zip name: Steam - path: ShareX-*.appx name: MicrosoftStore