mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-29 17:02:05 +13:00
Update ShareX.Setup project to use new paths
This commit is contained in:
parent
84afe02270
commit
d9c737d8c8
5 changed files with 8 additions and 9 deletions
Binary file not shown.
|
@ -41,7 +41,7 @@ private enum SetupType
|
|||
Steam // Create Steam folder
|
||||
}
|
||||
|
||||
private static readonly SetupType Setup = SetupType.Beta;
|
||||
private static readonly SetupType Setup = SetupType.Stable;
|
||||
|
||||
private static readonly string parentDir = @"..\..\..\";
|
||||
private static readonly string binDir = Path.Combine(parentDir, "ShareX", "bin");
|
||||
|
@ -49,15 +49,17 @@ private enum SetupType
|
|||
private static readonly string debugDir = Path.Combine(binDir, "Debug");
|
||||
private static readonly string steamDir = Path.Combine(binDir, "Steam");
|
||||
private static readonly string debugPath = Path.Combine(debugDir, "ShareX.exe");
|
||||
private static readonly string outputDir = Path.Combine(parentDir, "InnoSetup", "Output");
|
||||
private static readonly string innoSetupDir = Path.Combine(parentDir, @"ShareX.Setup\InnoSetup");
|
||||
private static readonly string outputDir = Path.Combine(innoSetupDir, "Output");
|
||||
private static readonly string portableDir = Path.Combine(outputDir, "ShareX-portable");
|
||||
private static readonly string steamOutputDir = Path.Combine(outputDir, "ShareX");
|
||||
private static readonly string portableAppsDir = Path.Combine(parentDir, @"..\PortableApps\ShareXPortable\App\ShareX");
|
||||
private static readonly string steamLauncherDir = Path.Combine(parentDir, @"..\ShareX_Steam\ShareX_Steam\bin\Release");
|
||||
private static readonly string steamUpdatesDir = Path.Combine(steamOutputDir, "Updates");
|
||||
private static readonly string chromeReleaseDir = Path.Combine(parentDir, @"..\ShareX_Chrome\ShareX_Chrome\bin\Release");
|
||||
private static readonly string innoSetupPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe";
|
||||
private static readonly string innoSetupScriptPath = Path.Combine(parentDir, "InnoSetup", "ShareX setup.iss");
|
||||
private static readonly string innoSetupCompilerPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe";
|
||||
private static readonly string innoSetupScriptPath = Path.Combine(innoSetupDir, "ShareX-setup.iss");
|
||||
private static readonly string zipPath = @"C:\Program Files\7-Zip\7z.exe";
|
||||
|
||||
private static string ReleaseDirectory => Setup == SetupType.Steam ? steamDir : releaseDir;
|
||||
|
||||
|
@ -112,7 +114,7 @@ private static void UploadLatestFile()
|
|||
private static void CompileSetup()
|
||||
{
|
||||
Console.WriteLine("Compiling setup...");
|
||||
Process.Start(innoSetupPath, string.Format("\"{0}\"", innoSetupScriptPath)).WaitForExit();
|
||||
Process.Start(innoSetupCompilerPath, string.Format("\"{0}\"", innoSetupScriptPath)).WaitForExit();
|
||||
Console.WriteLine("Setup file created.");
|
||||
}
|
||||
|
||||
|
@ -220,7 +222,7 @@ private static void CopyFiles(string directory, string searchPattern, string toF
|
|||
private static void Zip(string source, string target)
|
||||
{
|
||||
ProcessStartInfo p = new ProcessStartInfo();
|
||||
p.FileName = "7za.exe";
|
||||
p.FileName = zipPath;
|
||||
p.Arguments = string.Format("a -tzip \"{0}\" \"{1}\" -r -mx=9", target, source);
|
||||
p.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
Process process = Process.Start(p);
|
||||
|
|
|
@ -51,9 +51,6 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="7za.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
|
Loading…
Reference in a new issue