1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Resolve Windows file version and product version strings.

This commit is contained in:
Yuvan Wickramasinghe 2025-05-13 17:47:21 -07:00
parent 0cf382532c
commit aa46ebadb7
No known key found for this signature in database

View file

@ -1027,6 +1027,12 @@ namespace IDE
AddBuildFileDependency(project.mWindowsOptions.mIconFile);
AddBuildFileDependency(project.mWindowsOptions.mManifestFile);
String fileVersion = scope String();
gApp.ResolveConfigString(gApp.mPlatformName, workspaceOptions, project, options, project.mWindowsOptions.mFileVersion, "file version", fileVersion);
String productVersion = scope String();
gApp.ResolveConfigString(gApp.mPlatformName, workspaceOptions, project, options, project.mWindowsOptions.mProductVersion, "product version", productVersion);
switch (mPlatformType)
{
case .Windows:
@ -1035,8 +1041,8 @@ namespace IDE
cacheStr.AppendF("Company\t{}\n", project.mWindowsOptions.mCompany);
cacheStr.AppendF("Product\t{}\n", project.mWindowsOptions.mProduct);
cacheStr.AppendF("Copyright\t{}\n", project.mWindowsOptions.mCopyright);
cacheStr.AppendF("FileVersion\t{}\n", project.mWindowsOptions.mFileVersion);
cacheStr.AppendF("ProductVersion\t{}\n", project.mWindowsOptions.mProductVersion);
cacheStr.AppendF("FileVersion\t{}\n", fileVersion);
cacheStr.AppendF("ProductVersion\t{}\n", productVersion);
case .Linux:
cacheStr.AppendF("Options\t{}\n", project.mLinuxOptions.mOptions);
case .Wasm:
@ -1265,11 +1271,17 @@ namespace IDE
}
}
String fileVersion = scope String();
gApp.ResolveConfigString(gApp.mPlatformName, workspaceOptions, project, options, winOptions.mFileVersion, "file version", fileVersion);
String productVersion = scope String();
gApp.ResolveConfigString(gApp.mPlatformName, workspaceOptions, project, options, winOptions.mProductVersion, "product version", productVersion);
let targetFileName = scope String();
Path.GetFileName(targetPath, targetFileName);
if (resGen.AddVersion(winOptions.mDescription, winOptions.mComments, winOptions.mCompany, winOptions.mProduct,
winOptions.mCopyright, winOptions.mFileVersion, winOptions.mProductVersion, targetFileName) case .Err)
winOptions.mCopyright, fileVersion, productVersion, targetFileName) case .Err)
{
gApp.OutputErrorLine("Failed to add version");
return .Err;