Repository navigation
Fix copyright text and special characters in names in macOS and Windows builds - #7038
Open
ndonkoHenri wants to merge 5 commits into
Open
ndonkoHenri wants to merge 5 commits into
ndonkoHenri wants to merge 5 commits into
Conversation
Contributor
|
Sorry @ndonkoHenri, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 13 minutes by commenting |
Deploying flet-website-v2 with
|
| Latest commit: |
fe9a328
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1a9ad31d.flet-website-v2.pages.dev |
| Branch Preview URL: | https://fix-macos-windows-copyright.flet-website-v2.pages.dev |
Without a copyright, flet build now generates one from the company, or leaves it empty without one. The company name default stays, since it names the Windows app's data folder. On macOS, the text is used as written, and // no longer cuts it off as an xcconfig comment.
A " in the company, copyright, product or artifact name failed the build with RC2104, and a sequence such as \n became a control character.
A " in the product name still failed the Windows build in main.cpp, and a sequence such as \n changed the window title. An unset copyright no longer overrides the default of a custom template.
A character that Windows doesn't allow in file names failed the build with a CMake error that didn't mention the name.
ndonkoHenri
force-pushed
the
fix/macos-windows-copyright-text
branch
from
November 2, 2026 00:46
9dae0bc to
fe9a328
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #7036, so this diff shows only its own changes. Retarget once that merges.
flet buildshipped a placeholder copyright on macOS and Windows, cut off copyright text on macOS, and failed on Windows when a name contained". This fixes those, and makes an invalid Windows artifact name fail with a clear error.Breaking changes
copyright, the text is nowCopyright © <year of the build> <company>if a company is set. With neither, the stock template leaves it empty, instead ofCopyright (c) 2026 Your Company. A custom template's own default still applies.. All rights reserved.flet build windowsnow escapes the company and product names itself. An app that added""or\\by hand must remove them, or its data folder changes:Acme\\Toolsmoves fromAcme_ToolstoAcme__Tools.The
company_namedefault staysYour Companyon purpose, and a test guards it.path_provider_windowsbuilds%APPDATA%\<company>\<product>from it, so changing it would leave released apps' data behind.Fixes
//starts a comment in an xcconfig file, so a URL in the copyright cut off the rest of the text. It's now written as/$()/.Runner.rc: a"in the company, copyright, product or artifact name failed withRC2104, and\nbecame a line break. These are now escaped.main.cpp: a"in the product name failed withC3688, and\nchanged the window title. This is now escaped too.< > : " / \ | ? *) used to end in a CMake error that didn't mention the name.flet buildnow stops before building and names the character. The docs list these characters.Testing
flet-cli tests: 1107 passed, 1 skipped.
Windows 11 ARM64 VM, x64 Flutter, full
flet build windows, reading the finished.exe:Your Company, empty copyright, data in%APPDATA%\Your Company\<product>company = 'Acme "Best" Co',copyright = 'C:\new "x" see https://a.example'Acme _Best_ Co\<product>product = 'Cprobe "Q" App'.exedetailsproduct = 'Cprobe back\new'Cprobe back\new(had a line break before)artifact = 'cprobe"qart'build/fluttermacOS, full
flet build macos, readingInfo.plist:NSHumanReadableCopyrightcopyright = "Copyright © 2026 Acme & Sons, see https://a.example/terms"rc.execonfirmed the data folder change for hand-escaped names.Not tested: real x64 Windows (the VM runs x64 under emulation), the Xcode GUI, and
flet debug macos. Reserved Windows names such asCON, and names ending in a dot or space, aren't checked. In the artifact name check, only"went through the real command on Windows; the other characters are covered by unit tests.Summary by Sourcery
Make macOS and Windows build metadata robust for special characters while replacing placeholder copyright text with predictable defaults.
Bug Fixes:
Enhancements:
Documentation:
Tests: