This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Added Windows support for libtxt in order to build flutter_tester.exe #4395
Merged
Conversation
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
Relatively minor changes were needed to get libtxt building on Windows (missing/incompatiable headers, the odd syscall, path separators, etc.). Windows doesn't render text in the same way as other platforms, so some tests that checked for specific pixel offsets are disabled.
| } | ||
|
|
||
| do { | ||
| if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) == 0) { |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of this check?
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This checks that the WIN32_FIND_DATAA isn't a directory or an archive since we're only interested in files. Actually, this should probably be FILE_ATTRIBUTE_DIRECTORY. EDIT: This wasn't right. See next comment.
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since font files are archivable, we only need to consider files which have this attribute.
jason-simmons
approved these changes
Nov 29, 2017
bsalomon
pushed a commit
to bsalomon/engine
that referenced
this pull request
Dec 8, 2017
…flutter#4395) * Added Windows support for libtxt in order to build flutter_tester.exe. Relatively minor changes were needed to get libtxt building on Windows (missing/incompatiable headers, the odd syscall, path separators, etc.). Windows doesn't render text in the same way as other platforms, so some tests that checked for specific pixel offsets are disabled.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Relatively simple changes were needed to get libtxt building on Windows, but some tests which were failing due to Windows not rendering fonts the same as other platforms are now disabled on Windows.
Also, I haven't had a chance to run the code formatter yet since Windows buildtools doesn't have clang. Will probably pull on Linux and commit formatted changes after review before submitting.