1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

More version changes

This commit is contained in:
Brian Fiete 2019-09-18 08:17:23 -07:00
parent f20c55bac0
commit 4a809f3364
2 changed files with 53 additions and 4 deletions

View file

@ -981,6 +981,31 @@ namespace System
public const int32 SMTO_BLOCK = 0x0001;
public const int32 SMTO_ABORTIFHUNG = 0x0002;
public const int32 VS_FF_DEBUG = 0x00000001;
public const int32 VS_FF_PRERELEASE = 0x00000002;
public const int32 VS_FF_PATCHED = 0x00000004;
public const int32 VS_FF_PRIVATEBUILD = 0x00000008;
public const int32 VS_FF_INFOINFERRED = 0x00000010;
public const int32 VS_FF_SPECIALBUILD = 0x00000020L;
[CRepr]
public struct VS_FIXEDFILEINFO
{
public uint32 dwSignature; /* e.g. 0xfeef04bd */
public uint32 dwStrucVersion; /* e.g. 0x00000042 = "0.42" */
public uint32 dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */
public uint32 dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */
public uint32 dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */
public uint32 dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */
public uint32 dwFileFlagsMask; /* = 0x3F for version "0.42" */
public uint32 dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */
public uint32 dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */
public uint32 dwFileType; /* e.g. VFT_DRIVER */
public uint32 dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */
public uint32 dwFileDateMS; /* e.g. 0 */
public uint32 dwFileDateLS; /* e.g. 0 */
}
enum SECURITY_INFORMATION : int32
{
DACL_SECURITY_INFORMATION = 4
@ -1075,6 +1100,18 @@ namespace System
TRUSTEE_W Trustee;
}
[Import("version.lib"), CLink, StdCall]
public static extern IntBool GetFileVersionInfoW(char16* lptstrFilename, uint32 dwHandle, uint32 dwLen, void* lpData);
[Import("version.lib"), CLink, StdCall]
public static extern uint32 GetFileVersionInfoSizeW(char16* lptstrFilename, out uint32 lpdwHandle);
[Import("version.lib"), CLink, StdCall]
public static extern IntBool VerQueryValueW(void* pBlock, char16* lpSubBlock, ref void* lplpBuffer, out int32 puLen);
[Import("version.lib"), CLink, StdCall]
public static extern uint32 VerLanguageNameW(uint32 wLang, char16* szLang, uint32 cchLang);
[Import("advapi32.lib"), CLink, StdCall]
public static extern uint32 GetNamedSecurityInfoW(
char16* pObjectName,

View file

@ -12,6 +12,7 @@ namespace IDE.ui
Font mBigFont ~ delete _;
Font mMedFont ~ delete _;
Font mSmFont ~ delete _;
Image mImage ~ delete _;
uint32[256] mPalette;
uint8[cHeight][cWidth] mFire;
@ -31,10 +32,14 @@ namespace IDE.ui
Title = "About Beef IDE";
mBigFont = new Font();
mBigFont.Load("Segoe UI", GS!(80.0f)); //8.8
mBigFont.Load("Segoe UI", GS!(80.0f));
mMedFont = new Font();
mMedFont.Load("Segoe UI", GS!(30.0f)); //8.8
mMedFont.Load("Segoe UI", GS!(30.0f));
mSmFont = new Font();
mSmFont.Load("Segoe UI", GS!(20.0f));
mImage = Image.CreateDynamic((.)cWidth, (.)cHeight);
for (int x < cWidth)
@ -140,12 +145,19 @@ namespace IDE.ui
float angMed = Math.Min(mUpdateCnt * 0.0055f, Math.PI_f / 2);
float alpha = Math.Clamp(mUpdateCnt * 0.007f - 1.3f, 0, 1.0f);
g.SetFont(mMedFont);
using (g.PushColor(Color.Get(alpha)))
{
using (g.PushTranslate(0, (1.0f - Math.Sin(angMed))*GS!(200)))
{
g.DrawString("Copyright 2019 BeefyTech", 0, GS!(120), .Centered, mWidth);
g.SetFont(mMedFont);
g.DrawString("Copyright 2019 BeefyTech LLC", 0, GS!(120), .Centered, mWidth);
}
using (g.PushTranslate(0, (1.0f - Math.Sin(angMed))*GS!(300)))
{
g.SetFont(mSmFont);
g.DrawString(scope String()..AppendF("Version {}", gApp.mVersionInfo.FileVersion), 0, GS!(170), .Centered, mWidth);
g.DrawString(scope String()..AppendF("Build {}", gApp.mVersionInfo.ProductVersion), 0, GS!(200), .Centered, mWidth);
}
}