mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-29 17:02:05 +13:00
Create appx file
This commit is contained in:
parent
c5267602dc
commit
8756b9ffa1
1 changed files with 7 additions and 4 deletions
|
@ -84,6 +84,7 @@ private enum SetupJobs
|
|||
private static string NativeMessagingHostDir => Path.Combine(ParentDir, @"ShareX.NativeMessagingHost\bin\Release");
|
||||
private static string DesktopBridgeHelperDir => Path.Combine(ParentDir, @"ShareX.DesktopBridgeHelper\bin\Release");
|
||||
private static string RecorderDevicesSetupPath => Path.Combine(OutputDir, "Recorder-devices-setup.exe");
|
||||
private static string WindowsStoreAppxPath => Path.Combine(OutputDir, "ShareX.appx");
|
||||
|
||||
public static string InnoSetupCompilerPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe";
|
||||
public static string ZipPath = @"C:\Program Files\7-Zip\7z.exe";
|
||||
|
@ -263,6 +264,11 @@ private static void CreateFolder(string source, string destination, SetupJobs jo
|
|||
{
|
||||
Helpers.CopyFile(Path.Combine(DesktopBridgeHelperDir, "ShareX_DesktopBridgeHelper.exe"), destination);
|
||||
Helpers.CopyAll(WindowsStorePackageFilesDir, destination);
|
||||
|
||||
Process.Start(@"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe",
|
||||
$"pack /d \"{destination}\" /p \"{WindowsStoreAppxPath}\" /l /o").WaitForExit();
|
||||
|
||||
Directory.Delete(destination, true);
|
||||
}
|
||||
else if (job == SetupJobs.CreatePortable)
|
||||
{
|
||||
|
@ -279,10 +285,7 @@ private static void CreateFolder(string source, string destination, SetupJobs jo
|
|||
|
||||
Helpers.Zip(Path.GetFullPath(destination) + "\\*", Path.GetFullPath(zipPath));
|
||||
|
||||
if (Directory.Exists(destination))
|
||||
{
|
||||
Directory.Delete(destination, true);
|
||||
}
|
||||
Directory.Delete(destination, true);
|
||||
}
|
||||
|
||||
Console.WriteLine("Folder created.");
|
||||
|
|
Loading…
Reference in a new issue