Add zig rc subcommand, a (cross-platform) drop-in replacement for rc.exe#17412
Merged
andrewrk merged 1 commit intoziglang:masterfrom Oct 12, 2023
Merged
Add zig rc subcommand, a (cross-platform) drop-in replacement for rc.exe#17412andrewrk merged 1 commit intoziglang:masterfrom
zig rc subcommand, a (cross-platform) drop-in replacement for rc.exe#17412andrewrk merged 1 commit intoziglang:masterfrom
Conversation
Uses resinator under-the-hood (see ziglang#17069) Closes ziglang#9564
squeek502
commented
Oct 6, 2023
Comment on lines
+304
to
+305
| } else if (mem.eql(u8, cmd, "rc")) { | ||
| return cmdRc(gpa, arena, args[1..]); |
Member
Author
There was a problem hiding this comment.
Note:
} else if (build_options.only_core_functionality) {
@panic("only a few subcommands are supported in a zig2.c build");
}above takes care of ensuring resinator is not included in the build when only_core_functionality is true.
zig rc subcommand, a drop-in replacement for rc.exezig rc subcommand, a (cross-platform) drop-in replacement for rc.exe
squeek502
added a commit
to squeek502/win32-samples-rc-tests
that referenced
this pull request
Oct 10, 2023
Member
|
Nice work! |
squeek502
added a commit
to squeek502/zig
that referenced
this pull request
Oct 19, 2023
The INCLUDE variable being used during preprocessing was an accidental regression caused by ziglang#17412. Closes ziglang#17585.
squeek502
added a commit
to squeek502/zig
that referenced
this pull request
Oct 19, 2023
The INCLUDE variable being used during `.rc` preprocessing was an accidental regression in ziglang#17412. Closes ziglang#17585. resinator changes: source_mapping: Protect against NUL bytes in #line filenames lex: Avoid recalculating column on every tab stop within string literals Proper error handling for failing to open cwd instead of `catch unreachable` Use platform-specific delimiter for INCLUDE env var parsing
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.
Uses resinator under-the-hood (see #17069)
Closes #9564
The
cmdRcfunction basically works exactly the same asmain.zigin standaloneresinator, meaning it will have the same output that the standaloneresinatordoes, e.g. warnings like this:zig rcpasses thewin32-samples-rc-testswith perfect results (matching standaloneresinator):Results when cross-compiling that same set of test files from Linux:
These results are expected, since the failing
.rcfiles rely on either Windows path separators, MSVC-specific include files, or case-insensitive paths. The "different .res outputs" are caused by minor differences in the MinGW headers vs the MSVC headers (things like strings in common.ver)And here's the usage/help text: