mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Merge pull request #3203 from sylveon/master
Enable building Store and Steam artifacts on all builds
This commit is contained in:
commit
3e6cf489e5
3 changed files with 59 additions and 21 deletions
|
@ -1,12 +1,21 @@
|
|||
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)
|
||||
{
|
||||
if ($env:CONFIGURATION -eq "Release")
|
||||
if ($env:APPVEYOR_REPO_TAG -eq $true)
|
||||
{
|
||||
if ($env:CONFIGURATION -eq "Steam")
|
||||
{
|
||||
& "ShareX.Setup\bin\Steam\ShareX.Setup.exe" -AppVeyorSteamRelease
|
||||
}
|
||||
elseif ($env:CONFIGURATION -eq "WindowsStore")
|
||||
{
|
||||
& "ShareX.Setup\bin\WindowsStore\ShareX.Setup.exe" -AppVeyorWindowsStoreRelease
|
||||
}
|
||||
}
|
||||
elseif ($env:CONFIGURATION -eq "Release")
|
||||
{
|
||||
& "ShareX.Setup\bin\Release\ShareX.Setup.exe" -AppVeyorRelease
|
||||
}
|
||||
elseif ($env:APPVEYOR_REPO_TAG -eq $true)
|
||||
{
|
||||
if ($env:CONFIGURATION -eq "Steam")
|
||||
elseif ($env:CONFIGURATION -eq "Steam")
|
||||
{
|
||||
& "ShareX.Setup\bin\Steam\ShareX.Setup.exe" -AppVeyorSteam
|
||||
}
|
||||
|
@ -14,5 +23,4 @@ if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)
|
|||
{
|
||||
& "ShareX.Setup\bin\WindowsStore\ShareX.Setup.exe" -AppVeyorWindowsStore
|
||||
}
|
||||
}
|
||||
}
|
|
@ -47,6 +47,7 @@ private enum SetupJobs
|
|||
CreateWindowsStoreFolder = 1 << 6,
|
||||
CreateWindowsStoreDebugFolder = 1 << 7,
|
||||
CompileAppx = 1 << 8,
|
||||
DownloadFFmpeg = 1 << 9,
|
||||
|
||||
Stable = CreateSetup | CreatePortable | OpenOutputDirectory,
|
||||
Setup = CreateSetup | OpenOutputDirectory,
|
||||
|
@ -58,7 +59,9 @@ private enum SetupJobs
|
|||
Beta = CreateSetup | UploadOutputFile,
|
||||
AppVeyorRelease = CreateSetup | CreatePortable,
|
||||
AppVeyorSteam = CreateSteamFolder,
|
||||
AppVeyorWindowsStore = CreateWindowsStoreFolder | CompileAppx
|
||||
AppVeyorWindowsStore = CreateWindowsStoreFolder | CompileAppx,
|
||||
AppVeyorSteamRelease = AppVeyorSteam | DownloadFFmpeg,
|
||||
AppVeyorWindowsStoreRelease = AppVeyorWindowsStore | DownloadFFmpeg
|
||||
}
|
||||
|
||||
private static SetupJobs Job = SetupJobs.Stable;
|
||||
|
@ -113,6 +116,16 @@ private static void Main(string[] args)
|
|||
AppVeyor = true;
|
||||
Job = SetupJobs.AppVeyorWindowsStore;
|
||||
}
|
||||
else if (SetupHelpers.CheckArguments(args, "-AppVeyorSteamRelease"))
|
||||
{
|
||||
AppVeyor = true;
|
||||
Job = SetupJobs.AppVeyorSteamRelease;
|
||||
}
|
||||
else if (SetupHelpers.CheckArguments(args, "-AppVeyorWindowsStoreRelease"))
|
||||
{
|
||||
AppVeyor = true;
|
||||
Job = SetupJobs.AppVeyorWindowsStoreRelease;
|
||||
}
|
||||
|
||||
Console.WriteLine("Setup job: " + Job);
|
||||
|
||||
|
@ -136,11 +149,21 @@ private static void Main(string[] args)
|
|||
if (Job.HasFlag(SetupJobs.CreateSteamFolder))
|
||||
{
|
||||
CreateSteamFolder();
|
||||
|
||||
if (Job.HasFlag(SetupJobs.DownloadFFmpeg))
|
||||
{
|
||||
CopyFFmpeg(SteamUpdatesDir, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (Job.HasFlag(SetupJobs.CreateWindowsStoreFolder))
|
||||
{
|
||||
CreateFolder(WindowsStoreDir, WindowsStoreOutputDir, SetupJobs.CreateWindowsStoreFolder);
|
||||
|
||||
if (Job.HasFlag(SetupJobs.DownloadFFmpeg))
|
||||
{
|
||||
CopyFFmpeg(WindowsStoreOutputDir, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (Job.HasFlag(SetupJobs.CreateWindowsStoreDebugFolder))
|
||||
|
@ -150,8 +173,20 @@ private static void Main(string[] args)
|
|||
|
||||
if (Job.HasFlag(SetupJobs.CompileAppx))
|
||||
{
|
||||
Process.Start(@"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe",
|
||||
$"pack /d \"{WindowsStoreOutputDir}\" /p \"{WindowsStoreAppxPath}\" /l /o").WaitForExit();
|
||||
Process p = new Process
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = @"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe",
|
||||
Arguments = $"pack /d \"{WindowsStoreOutputDir}\" /p \"{WindowsStoreAppxPath}\" /l /o",
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true
|
||||
}
|
||||
};
|
||||
p.OutputDataReceived += (s, e) => Console.WriteLine(e.Data);
|
||||
p.Start();
|
||||
p.BeginOutputReadLine();
|
||||
p.WaitForExit();
|
||||
|
||||
Directory.Delete(WindowsStoreOutputDir, true);
|
||||
}
|
||||
|
@ -267,11 +302,7 @@ private static void CreateFolder(string source, string destination, SetupJobs jo
|
|||
|
||||
Helpers.CopyAll(Path.Combine(ParentDir, @"ShareX.ScreenCaptureLib\Stickers"), Path.Combine(destination, "Stickers"));
|
||||
|
||||
if (job == SetupJobs.CreateSteamFolder)
|
||||
{
|
||||
CopyFFmpeg(destination, true, true);
|
||||
}
|
||||
else if (job == SetupJobs.CreatePortableAppsFolder)
|
||||
if (job == SetupJobs.CreatePortableAppsFolder)
|
||||
{
|
||||
Helpers.CreateEmptyFile(Path.Combine(destination, "PortableApps"));
|
||||
}
|
||||
|
@ -279,7 +310,6 @@ private static void CreateFolder(string source, string destination, SetupJobs jo
|
|||
{
|
||||
SetupHelpers.CopyFile(Path.Combine(DesktopBridgeHelperDir, "ShareX_DesktopBridgeHelper.exe"), destination);
|
||||
Helpers.CopyAll(WindowsStorePackageFilesDir, destination);
|
||||
CopyFFmpeg(destination, false, true);
|
||||
}
|
||||
else if (job == SetupJobs.CreatePortable)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2">
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2" IgnorableNamespaces="desktop2">
|
||||
<Identity Name="19568ShareX.ShareX" ProcessorArchitecture="x64" Publisher="CN=366A5DE5-2EC7-43FD-B559-05986578C4CC" Version="12.1.0.0" />
|
||||
<Properties>
|
||||
<DisplayName>ShareX</DisplayName>
|
||||
|
@ -36,7 +36,7 @@
|
|||
<desktop:StartupTask TaskId="ShareX" Enabled="true" DisplayName="ShareX" />
|
||||
</desktop:Extension>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap3:FileTypeAssociation Name="ShareXCustomUploader" desktop2:UseUrl="false" Parameters='-CustomUploader "%1"'>
|
||||
<uap3:FileTypeAssociation Name="sharex-custom-uploader" desktop2:UseUrl="false" Parameters='-CustomUploader "%1"'>
|
||||
<uap:DisplayName>ShareX custom uploader</uap:DisplayName>
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:FileType>.sxcu</uap:FileType>
|
||||
|
|
Loading…
Reference in a new issue