mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
About dialog now displays only first 7 characters of last commit hash + hash is clickable + should be able to compile without git
This commit is contained in:
parent
407bddff4f
commit
5f22bd956e
6
.gitignore
vendored
6
.gitignore
vendored
@ -2,10 +2,10 @@
|
|||||||
/src/*.suo
|
/src/*.suo
|
||||||
/src/bin
|
/src/bin
|
||||||
/src/obj
|
/src/obj
|
||||||
/src/Properties/AssemblyInfo.cs
|
|
||||||
/src/Test/bin
|
/src/Test/bin
|
||||||
/src/Test/obj
|
/src/Test/obj
|
||||||
/src/UpdateAssemblyDescription/bin
|
/src/UpdateAssemblyInfo/bin
|
||||||
/src/UpdateAssemblyDescription/obj
|
/src/UpdateAssemblyInfo/obj
|
||||||
|
/src/Properties/AssemblyInfo.cs
|
||||||
/SE*.zip
|
/SE*.zip
|
||||||
/SubtitleEdit-*-setup.exe
|
/SubtitleEdit-*-setup.exe
|
||||||
|
15
src/Forms/About.Designer.cs
generated
15
src/Forms/About.Designer.cs
generated
@ -33,6 +33,7 @@
|
|||||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
this.richTextBoxAbout1 = new System.Windows.Forms.RichTextBox();
|
this.richTextBoxAbout1 = new System.Windows.Forms.RichTextBox();
|
||||||
this.buttonDonate = new System.Windows.Forms.Button();
|
this.buttonDonate = new System.Windows.Forms.Button();
|
||||||
|
this.linkLabelGitBuildHash = new System.Windows.Forms.LinkLabel();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
@ -97,11 +98,24 @@
|
|||||||
this.buttonDonate.UseVisualStyleBackColor = false;
|
this.buttonDonate.UseVisualStyleBackColor = false;
|
||||||
this.buttonDonate.Click += new System.EventHandler(this.buttonDonate_Click);
|
this.buttonDonate.Click += new System.EventHandler(this.buttonDonate_Click);
|
||||||
//
|
//
|
||||||
|
// linkLabelGitBuildHash
|
||||||
|
//
|
||||||
|
this.linkLabelGitBuildHash.AutoSize = true;
|
||||||
|
this.linkLabelGitBuildHash.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.linkLabelGitBuildHash.Location = new System.Drawing.Point(148, 15);
|
||||||
|
this.linkLabelGitBuildHash.Name = "linkLabelGitBuildHash";
|
||||||
|
this.linkLabelGitBuildHash.Size = new System.Drawing.Size(90, 20);
|
||||||
|
this.linkLabelGitBuildHash.TabIndex = 43;
|
||||||
|
this.linkLabelGitBuildHash.TabStop = true;
|
||||||
|
this.linkLabelGitBuildHash.Text = "linkLabel1";
|
||||||
|
this.linkLabelGitBuildHash.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelGitBuildHash_LinkClicked);
|
||||||
|
//
|
||||||
// About
|
// About
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(457, 372);
|
this.ClientSize = new System.Drawing.Size(457, 372);
|
||||||
|
this.Controls.Add(this.linkLabelGitBuildHash);
|
||||||
this.Controls.Add(this.buttonDonate);
|
this.Controls.Add(this.buttonDonate);
|
||||||
this.Controls.Add(this.okButton);
|
this.Controls.Add(this.okButton);
|
||||||
this.Controls.Add(this.pictureBox1);
|
this.Controls.Add(this.pictureBox1);
|
||||||
@ -131,6 +145,7 @@
|
|||||||
private System.Windows.Forms.PictureBox pictureBox1;
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
private System.Windows.Forms.RichTextBox richTextBoxAbout1;
|
private System.Windows.Forms.RichTextBox richTextBoxAbout1;
|
||||||
private System.Windows.Forms.Button buttonDonate;
|
private System.Windows.Forms.Button buttonDonate;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabelGitBuildHash;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,11 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
string minorMinorVersion = string.Empty;
|
string minorMinorVersion = string.Empty;
|
||||||
if (versionInfo.Length >= 3 && versionInfo[2] != "0")
|
if (versionInfo.Length >= 3 && versionInfo[2] != "0")
|
||||||
minorMinorVersion = "." + versionInfo[2];
|
minorMinorVersion = "." + versionInfo[2];
|
||||||
labelProduct.Text = String.Format("{0} {1}.{2}{3}, build {4}", _languageGeneral.Title, versionInfo[0], versionInfo[1], minorMinorVersion, Utilities.AssemblyDescription.Substring(0, 10)); //versionInfo[3]);
|
labelProduct.Text = String.Format("{0} {1}.{2}{3}, build", _languageGeneral.Title, versionInfo[0], versionInfo[1], minorMinorVersion);
|
||||||
|
string buildHash = Utilities.AssemblyDescription;
|
||||||
|
linkLabelGitBuildHash.Left = labelProduct.Left + labelProduct.Width - 5;
|
||||||
|
if (buildHash != null && buildHash.Length > 6)
|
||||||
|
linkLabelGitBuildHash.Text = String.Format("{0}", Utilities.AssemblyDescription.Substring(0, 7));
|
||||||
richTextBoxAbout1.Text = _language.AboutText1.TrimEnd() + Environment.NewLine +
|
richTextBoxAbout1.Text = _language.AboutText1.TrimEnd() + Environment.NewLine +
|
||||||
Environment.NewLine +
|
Environment.NewLine +
|
||||||
_languageGeneral.TranslatedBy.Trim();
|
_languageGeneral.TranslatedBy.Trim();
|
||||||
@ -65,5 +69,10 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Process.Start("http://www.nikse.dk/Donate");
|
Process.Start("http://www.nikse.dk/Donate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void linkLabelGitBuildHash_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
Process.Start("https://github.com/SubtitleEdit/subtitleedit/commit/" + Utilities.AssemblyDescription);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAAK/INwWK6QAAAAlwSFlzAAAO
|
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAAK/INwWK6QAAAAlwSFlzAAAO
|
||||||
vgAADr4B6kKxwAAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuNUmK/OAAAA72SURBVHhe7drr
|
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuNUmK/OAAAA72SURBVHhe7drr
|
||||||
j1XVGQZw/xWjBi0aEFAwoGKhBQsGtKgY6TjiSAQJxYiiAQMGlIuoCJgiImJAU8MUtUBEWhuC2uIHq0ZM
|
j1XVGQZw/xWjBi0aEFAwoGKhBQsGtKgY6TjiSAQJxYiiAQMGlIuoCJgiImJAU8MUtUBEWhuC2uIHq0ZM
|
||||||
FK3VVFNrNWpSo3wwu/u3znnnrLPnzAUYak3YyZN9W3ut93ney1p7n3PKye3kdnI7ufW17d27t1izZk3C
|
FK3VVFNrNWpSo3wwu/u3znnnrLPnzAUYak3YyZN9W3ut93ney1p7n3PKye3kdnI7ufW17d27t1izZk3C
|
||||||
6tWr0/6BBx7ohvsfWJPQ6n7cq17vwv21fd5m7dq1aV/tL8ZgS9gTxxs3biy2bNlSHDhwoKibf/zbzp2/
|
6tWr0/6BBx7ohvsfWJPQ6n7cq17vwv21fd5m7dq1aV/tL8ZgS9gTxxs3biy2bNlSHDhwoKibf/zbzp2/
|
||||||
|
@ -63,8 +63,6 @@ namespace UpdateAssemblyInfo
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
DoUpdateAssembly("[GITHASH]", clrHash.Result, template, target);
|
DoUpdateAssembly("[GITHASH]", clrHash.Result, template, target);
|
||||||
File.WriteAllText(errorFileName, "GIT TAGS: " + clrTags.Result);
|
|
||||||
|
|
||||||
DoUpdateAssembly("[REVNO]", clrTags.Result.Split('-')[1] , target, target);
|
DoUpdateAssembly("[REVNO]", clrTags.Result.Split('-')[1] , target, target);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -76,6 +74,16 @@ namespace UpdateAssemblyInfo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// allow for compile without git
|
||||||
|
DoUpdateAssembly("[GITHASH]", string.Empty, template, target);
|
||||||
|
DoUpdateAssembly("[REVNO]", "0", template, target);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Console.WriteLine("Error running Git");
|
Console.WriteLine("Error running Git");
|
||||||
Console.WriteLine(" - git folder: " + workingFolder);
|
Console.WriteLine(" - git folder: " + workingFolder);
|
||||||
Console.WriteLine(" - template: " + template);
|
Console.WriteLine(" - template: " + template);
|
||||||
|
Loading…
Reference in New Issue
Block a user