Use ProductVersion

This commit is contained in:
Jaex 2023-01-16 03:23:40 +03:00
parent 99b21e47c0
commit 2c2e1149d7
2 changed files with 2 additions and 4 deletions

View file

@ -4,9 +4,7 @@
#define MyAppReleaseDirectory MyAppRootDirectory + "\" + MyAppName + "\bin\Release"
#define MyAppFileName MyAppName + ".exe"
#define MyAppFilePath MyAppReleaseDirectory + "\" + MyAppFileName
#dim Version[4]
#expr GetVersionComponents(MyAppFilePath, Version[0], Version[1], Version[2], Version[3])
#define MyAppVersion Str(Version[0]) + "." + Str(Version[1]) + "." + Str(Version[2])
#define MyAppVersion GetStringFileInfo(MyAppFilePath, "ProductVersion")
#define MyAppPublisher "ShareX Team"
#define MyAppURL "https://getsharex.com"
#define MyAppId "82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC"

View file

@ -252,7 +252,7 @@ private static void UpdatePaths()
Console.WriteLine("Configuration: " + Configuration);
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(ExecutablePath);
AppVersion = $"{versionInfo.ProductMajorPart}.{versionInfo.ProductMinorPart}.{versionInfo.ProductBuildPart}";
AppVersion = versionInfo.ProductVersion;
Console.WriteLine("Application version: " + AppVersion);