Add VERSIONINFO to DLL version of library (#578)

This commit is contained in:
Chuck Walbourn
2025-02-04 11:44:12 -08:00
committed by GitHub
parent 3a7adffc46
commit 87e8b9513f
12 changed files with 152 additions and 37 deletions

View File

@@ -152,3 +152,23 @@ jobs:
inputs:
cwd: ''
cmakeArgs: --build out4 -v --config RelWithDebInfo
- task: CMake@1
displayName: 'CMake (MSVC): Config x64 (Xbox Series X|S, DLL)'
inputs:
cwd: ''
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out5 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF -DBUILD_SHARED_LIBS=ON'
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug (Xbox Series X|S, DLL)'
inputs:
cwd: ''
cmakeArgs: --build out5 -v --config Debug
- task: CMake@1
displayName: 'CMake (MSVC): Config x64 (Xbox One, DLL)'
inputs:
cwd: ''
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out6 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_SHARED_LIBS=ON'
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug (Xbox One, DLL)'
inputs:
cwd: ''
cmakeArgs: --build out6 -v --config Debug

34
build/DirectXTex.rc.in Normal file
View File

@@ -0,0 +1,34 @@
#include <winres.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Microsoft Corp"
VALUE "FileDescription", "DirectXTex texture processing library"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "directxtex.dll"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corp."
VALUE "OriginalFilename", "directxtex.dll"
VALUE "ProductName", "DirectXTex"
VALUE "ProductVersion", "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@@ -7,5 +7,5 @@ param(
[string]$version
)
$versionComma = $version.Replace(".", ",")
$files = 'Texassemble\texassemble.rc', 'Texconv\Texconv.rc', 'Texdiag\texdiag.rc'
$files = 'Texassemble\texassemble.rc', 'Texconv\Texconv.rc', 'Texdiag\texdiag.rc', 'build\DirectXTex.rc.in'
foreach ($file in $files) { (Get-Content $file).replace('1,0,0,0', $versionComma).replace('1.0.0.0', $version) | Set-Content $file }