Skip to content

Commit

Permalink
ref app info in assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
siblount committed Jan 14, 2024
1 parent 1bc7311 commit a64dc07
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 5 deletions.
38 changes: 38 additions & 0 deletions src/DAZ_Installer.Windows/DAZ_Installer.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@
<UseWindowsForms>true</UseWindowsForms>
<ForceDesignerDpiUnaware>true</ForceDesignerDpiUnaware>
<ImplicitUsings>disable</ImplicitUsings>
<PlatformTarget>AnyCPU</PlatformTarget>
<Title>Product Manager for Daz Studio</Title>
<Version>$(AssemblyVersion)$(VersionSuffix)</Version>
<Product>Product Manager for Daz Studio</Product>
<Authors>Solomon Blount and the community</Authors>
<Description>Product Manager for Daz Studio</Description>
<Copyright>Solomon Blount</Copyright>
<FileVersion>0.9.*</FileVersion>
<SignAssembly>True</SignAssembly>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile></AssemblyOriginatorKeyFile>
<InformationalVersion>$(AssemblyVersion)$(VersionSuffix)</InformationalVersion>
<AssemblyVersion>0.9.*</AssemblyVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<Deterministic>False</Deterministic>
<FileAlignment>512</FileAlignment>
<VersionSuffix>Pre-alpha</VersionSuffix>
<IsPreRelease>True</IsPreRelease>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Deterministic>False</Deterministic>
<FileAlignment>512</FileAlignment>

</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -94,6 +120,11 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -136,6 +167,13 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy &quot;$(SolutionDir)DAZ_Installer.Core\libs\UnRAR.dll&quot; &quot;$(OutDir)UnRAR.dll&quot;&#xD;&#xA;copy &quot;$(SolutionDir)DAZ_Installer.Core\External\7za.exe&quot; &quot;$(OutDir)7za.exe&quot;&#xD;&#xA;echo OutDir: $(OutDir)&#xD;&#xA;echo TargetDir: $(TargetDir)&#xD;&#xA;echo ProjectDir: $(ProjectDir)" />
</Target>
Expand Down
6 changes: 4 additions & 2 deletions src/DAZ_Installer.Windows/Forms/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ namespace DAZ_Installer.Windows.Forms
public partial class AboutForm : Form
{
public static string AboutString =
"Copyright © - Solomon Blount" + "\n" +
$"{Program.AppName} {Program.AppVersion} Pre-Alpha" + "\n" +
"Copyright © Solomon Blount" + "\n" +
$"{Program.AppName} {Program.AppVersion} {Program.VersionSuffix}" + "\n" +
"\n" +
$"{Program.AppName} is an application that allows users to install and manage their products for DAZ Studio from any vendor supporting common packaging formats. ";

public AboutForm()
{
InitializeComponent();
mainInfoLbl.Text = AboutString;
titleLbl.Text = Program.AppName;
}
}
}
2 changes: 1 addition & 1 deletion src/DAZ_Installer.Windows/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public MainForm()
InitializeComponent();
activeForm = this;
InitalizePages();

Text = Program.AppName;
if (Environment.OSVersion.Version.Build >= 22000) DPGlobal.isWindows11 = true;
}

Expand Down
7 changes: 5 additions & 2 deletions src/DAZ_Installer.Windows/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
using System.Windows.Forms;
using Serilog;
using Serilog.Templates;
using System.Reflection;

namespace DAZ_Installer.Windows
{
static class Program
{
public const string AppName = "Product Manager for DAZ Studio";
public const string AppVersion = "0.7";
public static readonly string AppName = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyProductAttribute>().Product;
public static readonly string AppVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
public static readonly string Authors = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyCompanyAttribute>().Company;
public static readonly string VersionSuffix = "Pre-Alpha";
public static bool IsRunByIDE => Debugger.IsAttached;
public static readonly DragDropEffects DropEffect = DragDropEffects.All;
public static int MainThreadID { get; private set; } = 0;
Expand Down

0 comments on commit a64dc07

Please sign in to comment.