Skip to content

Clarify Windows export warnings for File and Product Version #106007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions platform/windows/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,14 @@
if (version_array.size() != 4 || !version_array[0].is_valid_int() ||
!version_array[1].is_valid_int() || !version_array[2].is_valid_int() ||
!version_array[3].is_valid_int() || file_version.contains_char('-')) {
return TTR("Invalid file version.");
return TTR("Invalid file version. Proper format is x.x.x.x where x is any int.");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return TTR("Invalid file version. Proper format is x.x.x.x where x is any int.");
return TTR("Invalid file version. The expected format is `n.n.n.n` where `n` is any integer.");

}
}
} else if (p_name == "application/product_version") {
String product_version = p_preset->get("application/product_version");
if (!product_version.is_empty()) {
PackedStringArray version_array = product_version.split(".", false);
if (version_array.size() != 4 || !version_array[0].is_valid_int() ||
!version_array[1].is_valid_int() || !version_array[2].is_valid_int() ||
!version_array[3].is_valid_int() || product_version.contains_char('-')) {
return TTR("Invalid product version.");
if (product_version[0].is_valid_int()) {

Check failure on line 397 in platform/windows/export/export_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🤖 Android / Editor (target=editor)

no member named 'is_valid_int' in 'CharProxy<char32_t>'

Check failure on line 397 in platform/windows/export/export_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🍎 macOS / Editor (target=editor, tests=yes)

no member named 'is_valid_int' in 'CharProxy<char32_t>'

Check failure on line 397 in platform/windows/export/export_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)

no member named 'is_valid_int' in 'CharProxy<char32_t>'

Check failure on line 397 in platform/windows/export/export_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)

no member named 'is_valid_int' in 'CharProxy<char32_t>'

Check failure on line 397 in platform/windows/export/export_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🏁 Windows / Editor (target=editor, tests=yes)

'is_valid_int': is not a member of 'CharProxy<char32_t>'

Check failure on line 397 in platform/windows/export/export_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🏁 Windows / Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)

no member named 'is_valid_int' in 'CharProxy<char32_t>'
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't compile:

no member named 'is_valid_int' in 'CharProxy<char32_t>'

I'm not sure how CharProxy<char32_t> works, but is_digit(production_version[0]) (from core/string/char_utils.h) may work.

return TTR("Invalid product version. Allowable format is any string beginning with a number");
Copy link
Member

@akien-mga akien-mga May 2, 2025

Choose a reason for hiding this comment

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

Suggested change
return TTR("Invalid product version. Allowable format is any string beginning with a number");
return TTR("Invalid product version. The expected format is any string starting with a number.");

}
}
}
Expand Down
Loading