Browse Source

Read copyright information from GlobalAssemblyInfo

pull/1/head
Daniel Grunwald 15 years ago
parent
commit
cc0747bd45
  1. 4
      src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml
  2. 5
      src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml.cs
  3. 2
      src/Main/Base/Project/Resources/CommonAboutDialog.xfrm
  4. 5
      src/Main/Base/Project/Src/Gui/Dialogs/CommonAboutDialog.cs
  5. 2
      src/Main/GlobalAssemblyInfo.template
  6. 2
      src/Tools/UpdateAssemblyInfo/Main.cs

4
src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml

@ -74,9 +74,7 @@ @@ -74,9 +74,7 @@
Grid.Row="2"
Padding="4,0,4,0"
TextWrapping="WrapWithOverflow">
Copyright ©<Run Name="copyrightYearRange"/>
<Hyperlink
NavigateUri="mailto:webmaster@icsharpcode.net">IC#SharpCode</Hyperlink>
Copyright ©<Run Name="copyrightText"/>
<Run Text=" "/>
<Run
Text="{x:Static gui:AboutSharpDevelopTabPage.LicenseSentence}" />

5
src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml.cs

@ -11,6 +11,7 @@ using System.Reflection; @@ -11,6 +11,7 @@ using System.Reflection;
using System.Windows.Controls;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.StartPage
{
@ -27,8 +28,8 @@ namespace ICSharpCode.StartPage @@ -27,8 +28,8 @@ namespace ICSharpCode.StartPage
List<BoxEntry> entries = items.ConvertAll(control => new BoxEntry { Control = control } );
startPageItems.ItemsSource = entries;
var aca = (AssemblyCopyrightAttribute)typeof(StartPageControl).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0];
copyrightYearRange.Text = aca.Copyright.Substring(0, 9);
var aca = (AssemblyCopyrightAttribute)typeof(CommonAboutDialog).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0];
copyrightText.Text = aca.Copyright;
}
sealed class BoxEntry

2
src/Main/Base/Project/Resources/CommonAboutDialog.xfrm

@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
<!-- The copyright label -->
<System.Windows.Forms.Label>
<Text value = "(c) 2000-2010 by icsharpcode.net"/>
<Name value = "copyrightLabel"/>
<Width value = "400"/>
<Height value = "20"/>
<Location value = "{X=8, Y=234}"/>

5
src/Main/Base/Project/Src/Gui/Dialogs/CommonAboutDialog.cs

@ -7,8 +7,9 @@ @@ -7,8 +7,9 @@
using System;
using System.Drawing;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using ICSharpCode.Core.WinForms;
using ICSharpCode.SharpDevelop.Gui.XmlForms;
@ -132,6 +133,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -132,6 +133,8 @@ namespace ICSharpCode.SharpDevelop.Gui
public CommonAboutDialog()
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.CommonAboutDialog.xfrm"));
var aca = (AssemblyCopyrightAttribute)typeof(CommonAboutDialog).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0];
ControlDictionary["copyrightLabel"].Text = "Copyright " + aca.Copyright;
}
protected override void SetupXmlLoader()

2
src/Main/GlobalAssemblyInfo.template

@ -20,7 +20,7 @@ using System.Reflection; @@ -20,7 +20,7 @@ using System.Reflection;
[assembly: System.Runtime.InteropServices.ComVisible(false)]
[assembly: AssemblyCompany("ic#code")]
[assembly: AssemblyProduct("SharpDevelop")]
[assembly: AssemblyCopyright("2000-2010 AlphaSierraPapa")]
[assembly: AssemblyCopyright("2000-2010 AlphaSierraPapa for the SharpDevelop Team")]
[assembly: AssemblyVersion(RevisionClass.FullVersion)]
[assembly: NeutralResourcesLanguage("en-US")]

2
src/Tools/UpdateAssemblyInfo/Main.cs

@ -189,7 +189,7 @@ namespace UpdateAssemblyInfo @@ -189,7 +189,7 @@ namespace UpdateAssemblyInfo
static void ReadRevisionNumberFromGit()
{
ProcessStartInfo info = new ProcessStartInfo("cmd", "/c git rev-list " + BaseCommit + "..HEAD");
ProcessStartInfo info = new ProcessStartInfo("cmd", "/c git rev-list --first-parent " + BaseCommit + "..HEAD");
info.RedirectStandardOutput = true;
info.UseShellExecute = false;
using (Process p = Process.Start(info)) {

Loading…
Cancel
Save