Skip to content

fix(tauri-build): set Windows FileVersion/ProductVersion strings from tauri config - #15288

Merged
Legend-Master merged 1 commit into
tauri-apps:devfrom
Pagecran:fix/windows-versioninfo-strings
Apr 23, 2026
Merged

fix(tauri-build): set Windows FileVersion/ProductVersion strings from tauri config#15288
Legend-Master merged 1 commit into
tauri-apps:devfrom
Pagecran:fix/windows-versioninfo-strings

Conversation

@pascalandr

@pascalandr pascalandr commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR sets the Windows FileVersion and ProductVersion string values from config.version in tauri-build.

The current dev branch sets the numeric FILEVERSION / PRODUCTVERSION fixed fields from the Tauri config, but does not set the corresponding FileVersion / ProductVersion string values. In that case those strings fall back to whatever tauri-winres inferred from Cargo.toml.

That can leave the built .exe with mixed version sources:

  • FILEVERSION / PRODUCTVERSION fixed fields come from config.version
  • FileVersion / ProductVersion strings come from Cargo.toml

This PR restores the missing string setters so that Windows VERSIONINFO uses the version from the Tauri config consistently.

Why this is safe

  • matches the existing tauri-build changelog entry that says these fields come from tauri.conf.json
  • changes only a single existing block in crates/tauri-build/src/lib.rs
  • adds no new API surface
  • changes behavior only for undocumented transitive tauri-winres Cargo metadata overrides

Verification

  • cargo build -p tauri-build
  • manually verified the diff is limited to restoring the two missing string setters plus the .changes entry

@pascalandr
pascalandr requested a review from a team as a code owner April 23, 2026 11:04
@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through 84dd19b

There are 11 changes which include tauri with minor, @tauri-apps/api with minor, tauri-build with minor, tauri-macos-sign with patch, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-cli with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-plugin with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.10.1 2.11.0
tauri-utils 2.8.3 2.9.0
tauri-macos-sign 2.3.3 2.3.4
tauri-bundler 2.8.1 2.9.0
tauri-runtime 2.10.1 2.11.0
tauri-runtime-wry 2.10.1 2.11.0
tauri-codegen 2.5.5 2.5.6
tauri-macros 2.5.5 2.5.6
tauri-plugin 2.5.4 2.6.0
tauri-build 2.5.6 2.6.0
tauri 2.10.3 2.11.0
@tauri-apps/cli 2.10.1 2.11.0
tauri-cli 2.10.1 2.11.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master Legend-Master changed the title fix(tauri-build): restore Windows FileVersion/ProductVersion strings from config.version fix(tauri-build): set Windows FileVersion/ProductVersion strings from tauri config Apr 23, 2026
Legend-Master
Legend-Master previously approved these changes Apr 23, 2026

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

And just a bit of nitpicks. Also, I don't see anywhere we set these fields before #8168, could you verify this?

Comment thread .changes/windows-versioninfo-strings.md Outdated
@pascalandr

Copy link
Copy Markdown
Contributor Author

Thanks, updated the .changes wording in 655d831.

I also re-verified the history:

So the string setters were present before #8168 and were dropped there during the refactor.

@Legend-Master

Copy link
Copy Markdown
Contributor

Not sure what's wrong with git blame, but from some searches, it came from c6c59cf and probably a result of a merge conflict

Let's update the change file and PR descriptions

Also, you'll need to sign your commits for me to merge this

@pascalandr
pascalandr force-pushed the fix/windows-versioninfo-strings branch from 655d831 to 6b1f47e Compare April 23, 2026 12:50
@pascalandr

pascalandr commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Updated:

  • PR description corrected
  • .changes entry reworded
  • branch rewritten as a single signed commit

Legend-Master
Legend-Master previously approved these changes Apr 23, 2026

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pascalandr

pascalandr commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Updated the branch again after the branch-protection experiment note.

The no-op Cargo.toml tweak has been reverted, so the PR is back to the intended minimal diff only:

  • crates/tauri-build/src/lib.rs
  • .changes/windows-versioninfo-strings.md

The current PR head is a single signed commit on top of the latest dev.

@Legend-Master

Copy link
Copy Markdown
Contributor

We could revert, we were just experimenting with the branch protection rules

@pascalandr
pascalandr force-pushed the fix/windows-versioninfo-strings branch from 0f8a218 to 84dd19b Compare April 23, 2026 16:23
@Legend-Master
Legend-Master merged commit a30dca4 into tauri-apps:dev Apr 23, 2026
19 checks passed
razein97 pushed a commit to razein97/tauri that referenced this pull request Apr 30, 2026
razein97 pushed a commit to razein97/tauri that referenced this pull request Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants