mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +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/bin
|
||||
/src/obj
|
||||
/src/Properties/AssemblyInfo.cs
|
||||
/src/Test/bin
|
||||
/src/Test/obj
|
||||
/src/UpdateAssemblyDescription/bin
|
||||
/src/UpdateAssemblyDescription/obj
|
||||
/src/UpdateAssemblyInfo/bin
|
||||
/src/UpdateAssemblyInfo/obj
|
||||
/src/Properties/AssemblyInfo.cs
|
||||
/SE*.zip
|
||||
/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.richTextBoxAbout1 = new System.Windows.Forms.RichTextBox();
|
||||
this.buttonDonate = new System.Windows.Forms.Button();
|
||||
this.linkLabelGitBuildHash = new System.Windows.Forms.LinkLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@ -97,11 +98,24 @@
|
||||
this.buttonDonate.UseVisualStyleBackColor = false;
|
||||
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
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(457, 372);
|
||||
this.Controls.Add(this.linkLabelGitBuildHash);
|
||||
this.Controls.Add(this.buttonDonate);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
@ -131,6 +145,7 @@
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.RichTextBox richTextBoxAbout1;
|
||||
private System.Windows.Forms.Button buttonDonate;
|
||||
private System.Windows.Forms.LinkLabel linkLabelGitBuildHash;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
string minorMinorVersion = string.Empty;
|
||||
if (versionInfo.Length >= 3 && versionInfo[2] != "0")
|
||||
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 +
|
||||
Environment.NewLine +
|
||||
_languageGeneral.TranslatedBy.Trim();
|
||||
@ -65,5 +69,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
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">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAAK/INwWK6QAAAAlwSFlzAAAO
|
||||
vgAADr4B6kKxwAAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuNUmK/OAAAA72SURBVHhe7drr
|
||||
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuNUmK/OAAAA72SURBVHhe7drr
|
||||
j1XVGQZw/xWjBi0aEFAwoGKhBQsGtKgY6TjiSAQJxYiiAQMGlIuoCJgiImJAU8MUtUBEWhuC2uIHq0ZM
|
||||
FK3VVFNrNWpSo3wwu/u3znnnrLPnzAUYak3YyZN9W3ut93ney1p7n3PKye3kdnI7ufW17d27t1izZk3C
|
||||
6tWr0/6BBx7ohvsfWJPQ6n7cq17vwv21fd5m7dq1aV/tL8ZgS9gTxxs3biy2bNlSHDhwoKibf/zbzp2/
|
||||
|
@ -63,8 +63,6 @@ namespace UpdateAssemblyInfo
|
||||
try
|
||||
{
|
||||
DoUpdateAssembly("[GITHASH]", clrHash.Result, template, target);
|
||||
File.WriteAllText(errorFileName, "GIT TAGS: " + clrTags.Result);
|
||||
|
||||
DoUpdateAssembly("[REVNO]", clrTags.Result.Split('-')[1] , target, target);
|
||||
return 0;
|
||||
}
|
||||
@ -76,6 +74,16 @@ namespace UpdateAssemblyInfo
|
||||
}
|
||||
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(" - git folder: " + workingFolder);
|
||||
Console.WriteLine(" - template: " + template);
|
||||
|
Loading…
Reference in New Issue
Block a user