Codechange: Make Squirrel handle ConvertibleThroughBase. (#13453)
[openttd-github.git] / os / windows / winstore / set-version.ps1
blobba048581e2151000906d81301fbd101ed7a96d9f
1 [CmdletBinding()]
2 [Alias()]
3 Param
5 # EXE path
6 [Parameter(Mandatory=$true, Position=0)]
7 $ExePath
10 try
12 $versionInfo = (Get-Item "$ExePath").VersionInfo
14 # Generate the app version - the build number (MS calls it revision) is always 0 because the Windows Store requires that
15 $AppVersion = "$($versionInfo.FileMajorPart).$($versionInfo.FileMinorPart).$($versionInfo.FileBuildPart).0"
17 Write-Output "SET OTTD_VERSION=$($AppVersion)"
19 catch
21 Write-Output "@ECHO Error retrieving EXE version - did you provide a path?"
22 exit 1