mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Properly detect the version from the program file
This commit is contained in:
parent
8fd5794936
commit
40917df822
@ -1,5 +1,8 @@
|
||||
### Changelog
|
||||
|
||||
#### Version - 3.0.0.3 -
|
||||
* Properly detect the program version
|
||||
|
||||
#### Version - 3.0.0.2 - 8/19/2022
|
||||
* Be more tolerant of bad picture Urls while validating Nexus Downloads (thanks ForgottenGlory)
|
||||
* Fix loading and saving of several compiler fields
|
||||
|
@ -130,7 +130,12 @@ namespace Wabbajack
|
||||
try
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||
var location = assembly.Location;
|
||||
if (string.IsNullOrWhiteSpace(location))
|
||||
location = Process.GetCurrentProcess().MainModule?.FileName ?? "";
|
||||
|
||||
_logger.LogInformation("App Location: {Location}", assembly.Location);
|
||||
var fvi = FileVersionInfo.GetVersionInfo(location);
|
||||
Consts.CurrentMinimumWabbajackVersion = Version.Parse(fvi.FileVersion);
|
||||
VersionDisplay = $"v{fvi.FileVersion}";
|
||||
AppName = "WABBAJACK " + VersionDisplay;
|
||||
|
Loading…
Reference in New Issue
Block a user