Setup updates

This commit is contained in:
Jaex 2015-09-27 15:46:29 +03:00
parent 5ca6514af1
commit 838ebaa1e4
6 changed files with 34 additions and 47 deletions

View File

@ -55,8 +55,8 @@ Name: "CreateStartupIcon"; Description: "Launch {#AppName} automatically at Wind
Source: "{#AppParentDirectory}\ShareX.exe"; DestDir: {app}; Flags: ignoreversion
Source: "{#AppParentDirectory}\ShareX.exe.config"; DestDir: {app}; Flags: ignoreversion
Source: "{#AppParentDirectory}\*.dll"; DestDir: {app}; Flags: ignoreversion
Source: "{#AppParentDirectory}\*.css"; DestDir: {app}; Flags: ignoreversion
Source: "{#AppParentDirectory}\*.txt"; DestDir: {app}; Flags: ignoreversion
Source: "{#AppParentDirectory}\IndexerDefault.css"; DestDir: {app}; Flags: ignoreversion
Source: "..\Licenses\*.txt"; DestDir: {app}\Licenses; Flags: ignoreversion
Source: "Output\Recorder-devices-setup.exe"; DestDir: {app}; Flags: ignoreversion
Source: "..\..\ShareX_Chrome\ShareX_Chrome\bin\Release\ShareX_Chrome.exe"; DestDir: {app}; Flags: ignoreversion

View File

@ -324,12 +324,13 @@ namespace ShareX.ScreenCaptureLib
this.lblImageCount.AutoSize = true;
this.lblImageCount.Location = new System.Drawing.Point(696, 48);
this.lblImageCount.Name = "lblImageCount";
this.lblImageCount.Size = new System.Drawing.Size(66, 13);
this.lblImageCount.Size = new System.Drawing.Size(78, 13);
this.lblImageCount.TabIndex = 12;
this.lblImageCount.Text = "Image count";
this.lblImageCount.Text = "Image count: 0";
//
// btnResetCombine
//
this.btnResetCombine.Enabled = false;
this.btnResetCombine.Location = new System.Drawing.Point(696, 16);
this.btnResetCombine.Name = "btnResetCombine";
this.btnResetCombine.Size = new System.Drawing.Size(216, 23);
@ -352,6 +353,7 @@ namespace ShareX.ScreenCaptureLib
//
// btnStartTask
//
this.btnStartTask.Enabled = false;
this.btnStartTask.Location = new System.Drawing.Point(312, 64);
this.btnStartTask.Name = "btnStartTask";
this.btnStartTask.Size = new System.Drawing.Size(376, 23);
@ -561,6 +563,7 @@ namespace ShareX.ScreenCaptureLib
this.lblProcessing.Size = new System.Drawing.Size(137, 25);
this.lblProcessing.TabIndex = 1;
this.lblProcessing.Text = "Processing...";
this.lblProcessing.Visible = false;
//
// pbOutput
//

View File

@ -232,11 +232,11 @@ namespace ShareX.ScreenCaptureLib
btnCapture.Text = "Start capture";
this.ShowActivate();
tcScrollingCapture.SelectedTab = tpOutput;
btnGuessEdges.Enabled = btnGuessCombineAdjustments.Enabled = images.Count > 1;
btnStartTask.Enabled = images.Count > 0;
StartingProcess();
if (Options.RemoveDuplicates) RemoveDuplicates();
lblImageCount.Text = "Image count: " + images.Count;
btnGuessEdges.Enabled = btnGuessCombineAdjustments.Enabled = images.Count > 1;
btnStartTask.Enabled = btnResetCombine.Enabled = images.Count > 0;
ResetCombine();
EndingProcess();
isCapturing = false;

View File

@ -42,21 +42,21 @@ namespace ShareX.Setup
Steam // Create Steam folder
}
private static SetupType Setup = SetupType.Steam;
private static readonly SetupType Setup = SetupType.Steam;
private static string parentDir = @"..\..\..\";
private static string binDir = Path.Combine(parentDir, "ShareX", "bin");
private static string releaseDir = Path.Combine(binDir, "Release");
private static string debugDir = Path.Combine(binDir, "Debug");
private static string steamDir = Path.Combine(binDir, "Steam");
private static string debugPath = Path.Combine(debugDir, "ShareX.exe");
private static string outputDir = Path.Combine(parentDir, "InnoSetup", "Output");
private static string portableDir = Path.Combine(outputDir, "ShareX-portable");
private static string steamOutputDir = Path.Combine(outputDir, "ShareX");
private static string steamLauncherDir = Path.Combine(parentDir, @"..\ShareX_Steam\ShareX_Steam\bin\Release");
private static string steamUpdatesDir = Path.Combine(steamOutputDir, "Updates");
private static string innoSetupPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe";
private static string innoSetupScriptPath = Path.Combine(parentDir, "InnoSetup", "ShareX setup.iss");
private static readonly string parentDir = @"..\..\..\";
private static readonly string binDir = Path.Combine(parentDir, "ShareX", "bin");
private static readonly string releaseDir = Path.Combine(binDir, "Release");
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 portableDir = Path.Combine(outputDir, "ShareX-portable");
private static readonly string steamOutputDir = Path.Combine(outputDir, "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 innoSetupPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe";
private static readonly string innoSetupScriptPath = Path.Combine(parentDir, "InnoSetup", "ShareX setup.iss");
private static string ReleaseDirectory => Setup == SetupType.Steam ? steamDir : releaseDir;
@ -135,21 +135,13 @@ namespace ShareX.Setup
Directory.CreateDirectory(destination);
List<string> files = new List<string>();
string[] endsWith = new string[] { "ShareX.exe", "ShareX.exe.config", ".dll", ".css", ".txt" };
string[] ignoreEndsWith = new string[] { };
foreach (string filepath in Directory.GetFiles((ReleaseDirectory)))
{
if (endsWith.Any(x => filepath.EndsWith(x, StringComparison.InvariantCultureIgnoreCase)) &&
ignoreEndsWith.All(x => !filepath.EndsWith(x, StringComparison.InvariantCultureIgnoreCase)))
{
files.Add(filepath);
}
}
CopyFiles(files, destination);
CopyFile(Path.Combine(ReleaseDirectory, "ShareX.exe"), destination);
CopyFile(Path.Combine(ReleaseDirectory, "ShareX.exe.config"), destination);
CopyFiles(ReleaseDirectory, "*.dll", destination);
CopyFile(Path.Combine(ReleaseDirectory, "IndexerDefault.css"), destination);
CopyFiles(Path.Combine(parentDir, "Licenses"), "*.txt", Path.Combine(destination, "Licenses"));
CopyFile(Path.Combine(outputDir, "Recorder-devices-setup.exe"), destination);
CopyFile(Path.Combine(parentDir, @"..\ShareX_Chrome\ShareX_Chrome\bin\Release\ShareX_Chrome.exe"), destination);
string[] languages = new string[] { "de", "es", "fr", "hu", "ko-KR", "nl-NL", "pt-BR", "tr", "zh-CN" };
@ -164,11 +156,7 @@ namespace ShareX.Setup
CopyFile(Path.Combine(parentDir, "Lib", "ffmpeg.exe"), destination);
CopyFile(Path.Combine(parentDir, "Lib", "ffmpeg-x64.exe"), destination);
}
CopyFile(Path.Combine(outputDir, "Recorder-devices-setup.exe"), destination);
CopyFile(Path.Combine(parentDir, @"..\ShareX_Chrome\ShareX_Chrome\bin\Release\ShareX_Chrome.exe"), destination);
if (Setup != SetupType.Steam)
else
{
File.WriteAllText(Path.Combine(destination, "PersonalPath.cfg"), "ShareX", Encoding.UTF8);
@ -192,7 +180,7 @@ namespace ShareX.Setup
Console.WriteLine("Portable created.");
}
private static void CopyFiles(IEnumerable files, string toFolder)
private static void CopyFiles(string[] files, string toFolder)
{
if (!Directory.Exists(toFolder))
{

View File

@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC")]
[assembly: AssemblyVersion("10.2.5")]
[assembly: AssemblyFileVersion("10.2.5")]
[assembly: AssemblyVersion("10.2.6")]
[assembly: AssemblyFileVersion("10.2.6")]

View File

@ -1004,10 +1004,6 @@
<None Include="Resources\network-ip.png" />
<None Include="Resources\ruler-triangle.png" />
<None Include="Resources\application-network.png" />
<None Include="..\LICENSE.txt">
<Link>LICENSE.txt</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\Lib\7z-x64.dll">
<Link>7z-x64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>