Martin Storsjö
b34e1cd82b
windres-wrapper: Don't leave the .preproc.rc behind if producing .res
2021-04-09 13:42:29 +03:00
Martin Storsjö
c3529a6b9b
windres-wrapper: Implement support for the --preprocessor option
2021-03-10 10:22:06 +02:00
Martin Storsjö
d5cda17953
wrappers: Return 0 when printing help in the windres wrapper
2020-11-21 21:34:50 +02:00
Russell Haley
5497454d16
Update windres-wrapper --version to return 0
...
modified: wrappers/windres-wrapper.c - print_version now passes 0 to
exit function.
2020-11-21 21:33:14 +02:00
Martin Storsjö
30f252f157
windres-wrapper: Add support for the language option
...
llvm-rc got support for this option on Jun 23rd [1], so the currently
pinned version of llvm-project doesn't support it - but earlier
versions just silently ignore the option, so it should be safe
to include in the wrapper now already.
[1] https://github.com/llvm/llvm-project/commit/f36f8b41beb9cc0353d5624934406d39b78753e0
2020-06-23 13:29:53 +03:00
Martin Storsjö
8507ee6023
windres-wrapper: Do the format name comparisons case insensitively
2020-03-14 12:58:18 +02:00
Martin Storsjö
b1e19e7ebb
wrappers: Relicense windres-wrapper.c from Unlicense to ISC
...
This is done with permission from Josh de Kock, see
https://github.com/mstorsjo/llvm-mingw/pull/4 for discussion.
2020-03-05 11:31:31 +02:00
Anton Mitrofanov
130bbed695
windres-wrapper: Fix --target=pe-i386
2020-02-09 23:43:40 +02:00
Martin Storsjö
ee894b6f63
windres: Accept the abbreviated form --include in addition to --include-dir
...
As GNU binutils windres uses getopt for option parsing, it accepts
any unique abbreviation of the long options. For now just look
for this particular abbreviation instead of any potential one,
as there's at least one existing use in the wild of --include:
https://github.com/tcltk/tcl/blob/fe69f643609d633facf249c9c963ce121153a8ff/win/tcl.m4#L640
2020-01-05 22:09:31 +02:00
Martin Storsjö
ce7d3ec874
windres-wrapper: Short options joined with the option value doesn't use an equals character
...
This makes options like "-iinput.rc -ooutput.o" work properly.
2019-11-21 08:10:52 +02:00
Martin Storsjö
9f8e5cebd6
windres-wrapper: Implement the -F/--target flag like GNU windres
...
The values passed to this parameter aren't arch/vendor/os triples, but
bfd target names.
2019-10-08 09:24:50 +03:00
Martin Storsjö
750ab50433
wrappers: Consistently quote all arguments when calling spawn or creating a command line
2019-05-06 11:04:53 +03:00
Martin Storsjö
fa88c4ee1e
wrappers: Escape the first argument to spawn
...
This fixes running in paths that contain a space.
2019-05-06 11:04:53 +03:00
Martin Storsjö
97ca0681bc
wrappers: Split out shared helpers for native wrapper executables to a header
2019-05-06 11:04:53 +03:00
Martin Storsjö
66055dfe63
wrappers: Take the argv null terminator into account when checking for overflows
...
When adding the terminator without incrementing arg and checking for
overflows with "arg > max_arg", we need to allocate space for one
extra element for the implicit terminator.
2019-05-06 11:04:27 +03:00
Martin Storsjö
013dfc08e4
windres-wrapper: Check that the number of args isn't exceeded
2019-05-06 11:04:27 +03:00
Martin Storsjö
ae2a98efba
windres: Ignore the --use-temp-file option
...
This option seems to be used occasionally by projects to work around
various issues with popen in GNU windres.
Our windres wrapper always uses a temp file for the preprocessing
output, so for us the option is a no-op.
2018-11-13 00:35:53 +02:00
Martin Storsjö
643d9c1645
windres: Fix handling of -D/-U options with a space between the option and the name of the define
2018-10-19 09:23:30 +03:00
Martin Storsjö
b611bc1904
Convert the windres wrapper from shell script to C
...
This allow running windres on windows without a surrounding posix shell.
2018-10-10 23:33:19 +03:00