summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceScriptStmt.h
Commit message (Collapse)AuthorAgeFilesLines
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-1/+1
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [llvm-rc] Support not expressions.Martin Storsjo2018-12-051-2/+56
| | | | | | | | Patch by Jacek Caban! Differential Revision: https://reviews.llvm.org/D55242 llvm-svn: 348363
* [llvm-rc] Support EXSTYLE statement.Martin Storsjo2018-11-291-0/+13
| | | | | | | | Patch by Jacek Caban! Differential Revision: https://reviews.llvm.org/D55020 llvm-svn: 347858
* [llvm-rc] Add support for the optional CLASS statement for dialogsMartin Storsjo2018-05-151-0/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D46875 llvm-svn: 332386
* [llvm-rc] Add support for parsing memory flagsMartin Storsjo2018-05-151-27/+46
| | | | | | | | | | | | | | | | | | | | | | | | Most of the handling is pretty straightforward; fetch the default memory flags for the specific resource type before parsing the flags and apply them on top of that, except that some flags imply others and some flags clear more than one flag. For icons and cursors, the flags set get passed on to all individual single icon/cursor resources, while only some flags affect the icon/cursor group resource. For stringtables, the behaviour is pretty simple; the first stringtable resource of a bundle sets the flags for the whole bundle. The output of these tests match rc.exe byte for byte. The actual use of these memory flags is deprecated and they have no effect since Win16, but some resource script files may still happen to have them in place. Differential Revision: https://reviews.llvm.org/D46818 llvm-svn: 332329
* [llvm-rc] Add support for the RCDATA resource typeMartin Storsjo2018-05-091-0/+1
| | | | | | | | | This is the same as any other user defined resource, but with a specific allocated resource type number. Differential Revision: https://reviews.llvm.org/D46636 llvm-svn: 331902
* [llvm-rc] Add support for all missing dialog controlsMartin Storsjo2018-05-081-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D46507 llvm-svn: 331808
* [llvm-rc] Implement the BITMAP resource typeMartin Storsjo2018-05-071-0/+24
| | | | | | Differential Revision: https://reviews.llvm.org/D46509 llvm-svn: 331670
* [llvm-rc] Serialize user-defined resources to .res files.Zachary Turner2017-10-061-1/+12
| | | | | | | | | | | | | | | | This allows rc to serialize user-defined resources, as documented at: msdn.microsoft.com/en-us/library/windows/desktop/aa381054.aspx Escape sequences are yet unavailable, and are to be added in one of child patches. Patch by: Marek Sokolowski Differential Revision: https://reviews.llvm.org/D38423 llvm-svn: 315117
* [llvm-rc] Serialize STRINGTABLE statements to .res file.Zachary Turner2017-10-061-2/+8
| | | | | | | | | | | | | | | This allows llvm-rc to serialize STRINGTABLE resources. These are output in an unusual way: we locate them at the end of the file, and strings are merged into bundles of max 16 strings, depending on their IDs, language, and characteristics. Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381050.aspx Patch by: Marek Sokolowski Differential Revision: https://reviews.llvm.org/D38420 llvm-svn: 315112
* [llvm-rc] Serialize VERSIONINFO resources to .res files.Zachary Turner2017-10-061-11/+85
| | | | | | | | | | | This is now able to dump VERSIONINFO resources. Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx Differential Revision: https://reviews.llvm.org/D38410 Patch by: Marek Sokolowski llvm-svn: 315110
* [llvm-rc] Serialize CURSOR and ICON resources to .resZachary Turner2017-10-061-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part 6 of llvm-rc serialization. This adds ability to output cursors and icons as resources. Unfortunately, we can't just copy .cur or .ico files to output - as each file might contain multiple images, each of them needs to be unpacked and stored as a separate resource. This forces us to parse cursor and icon contents. (Fortunately, these formats are pretty similar and can be processed by mostly common code). As test files are binary, here is a short explanation of .cur and .ico files stored: cursor.cur, cursor-8.cur, cursor-32.cur are sample correct cursor files, differing in their bit depth. icon-old.ico, icon-new.ico are sample correct icon files; icon-png.ico is a sample correct icon file in PNG format (instead of usual BMP); cursor-eof.cur is an incorrect cursor file - this is cursor.cur with some of its final bytes removed. cursor-bad-offset.cur is an incorrect cursor file - image header states that image data begins at offset 0xFFFFFFFF. Sample correct cursors and icons were created by Nico Weber. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D37878 llvm-svn: 315109
* [llvm-rc] Add optional serialization support for DIALOG(EX) resources.Zachary Turner2017-10-061-7/+16
| | | | | | | | | | | | | | | | | | This is part 5 of llvm-rc serialization support. This allows DIALOG and DIALOGEX to serialize if dialog-specific optional statements are provided. These are (as of now): CAPTION, FONT, and STYLE. Notably, FONT statement can take more than two arguments when describing DIALOGEX resources (as in msdn.microsoft.com/en-us/library/windows/desktop/aa381013.aspx). I made some changes to the parser to reflect this fact. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D37864 llvm-svn: 315104
* [llvm-rc] Serialize DIALOG(EX) to .res files (serialization, pt 4).Marek Sokolowski2017-09-301-7/+41
| | | | | | | | | | | | | This is now able to serialize DIALOG and DIALOGEX resources to .res files. It still can't parse dialog-specific CAPTION, FONT, and STYLE optional statement - these will be added in the following patch. A limited set of controls is included. However, more can be easily added by extending SupportedCtls map defined in ResourceScriptStmt.cpp. Differential Revision: https://reviews.llvm.org/D37862 llvm-svn: 314578
* [llvm-rc] Serialize MENU resources to .res files (serialization, pt 3).Marek Sokolowski2017-09-291-4/+36
| | | | | | | | | | | | | | | | | | | | This allows MENU resources to be serialized. MENU resource statement doc: msdn.microsoft.com/en-us/library/windows/desktop/aa381025.aspx POPUP sub-statement doc: msdn.microsoft.com/en-us/library/windows/desktop/aa381030.aspx MENUITEM sub-statement doc: msdn.microsoft.com/en-us/library/windows/desktop/aa381024.aspx MENUHEADER structure: msdn.microsoft.com/en-us/library/windows/desktop/ms648018.aspx (and NORMALMENUITEM, POPUPMENUITEM structs). Thanks for Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D37828 llvm-svn: 314562
* [llvm-rc] Serialize ACCELERATORS to .res files (serialization, pt 2).Marek Sokolowski2017-09-291-8/+39
| | | | | | | | | | | | | | | | | | | | This allows llvm-rc to serialize ACCELERATORS resources. Additionally, as this is the first type of resource to support basic optional resource statements (LANGUAGE, CHARACTERISTICS, VERSION), ACCELERATORS statement documentation: msdn.microsoft.com/en-us/library/windows/desktop/aa380610.aspx Accelerator table structure documentation: msdn.microsoft.com/en-us/library/windows/desktop/ms648010.aspx Optional resource statement fields are described in: msdn.microsoft.com/en-us/library/windows/desktop/ms648027.aspx Thanks for Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D37824 llvm-svn: 314549
* [llvm-rc] Refactoring needed for ACCELERATORS and MENU resources.Marek Sokolowski2017-09-291-34/+45
| | | | | | | | | | | | | | | | | | | | This is a part of llvm-rc serialization patch set (serialization, pt 1.5). This: * Unifies the internal representation of flags in ACCELERATORS and MENU with the corresponding representation in .res files (noticed in https://reviews.llvm.org/D37828#inline-329828). * Creates an RCResource subclass, OptStatementsRCResource, describing resource statements that can declare resource-local optional statements (proposed in https://reviews.llvm.org/D37824#inline-329775). These modifications don't fit to any of the current patches, so I'm submitting them as a separate patch. Differential Revision: https://reviews.llvm.org/D37841 llvm-svn: 314541
* [llvm-rc] Serialize HTML resources to .res files (serialization, pt 1).Marek Sokolowski2017-09-291-4/+98
| | | | | | | | | | | | | | This allows to process HTML resources defined in .rc scripts and output them to resulting .res files. Additionally, some infrastructure allowing to output these files is created. This is the first resource type we can operate on. Thanks to Nico Weber for his original work in this area. Differential Revision: reviews.llvm.org/D37283 llvm-svn: 314538
* [llvm-rc] Add user-defined resources parsing ability. [8/8]Marek Sokolowski2017-09-291-0/+18
| | | | | | | | | | | | | This allows llvm-rc to parse user-defined resources (ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381054.aspx). These statements either import files, or put the specified raw data in the resulting resource file. Thanks to Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D37033 llvm-svn: 314478
* [llvm-rc] Add VERSIONINFO parsing ability. [6/8]Marek Sokolowski2017-09-281-0/+100
| | | | | | | | | | | | | This extends the set of llvm-rc parser's available resources by another one, VERSIONINFO. Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx Thanks to Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D37021 llvm-svn: 314468
* [llvm-rc] Add DIALOG(EX) parsing ability (parser, pt 5/8).Marek Sokolowski2017-08-291-0/+89
| | | | | | | | | | | | | | This extends the set of resources parsed by llvm-rc by DIALOG and DIALOGEX. Additionally, three optional resource statements specific to these two resources are added: CAPTION, FONT, and STYLE. Thanks for Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D36905 llvm-svn: 312009
* [llvm-rc] Add MENU parsing ability (parser, pt 4/8).Marek Sokolowski2017-08-281-0/+86
| | | | | | | | | | | | | | This extends llvm-rc parsing tool by MENU resource (msdn.microsoft.com/en-us/library/windows/desktop/aa381025(v=vs.85).aspx). As for now, MENUEX (msdn.microsoft.com/en-us/library/windows/desktop/aa381023(v=vs.85).aspx) seems unnecessary. Thanks for Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D36898 llvm-svn: 311956
* [llvm-rc] Add ACCELERATORS parsing ability. (parser, pt 3/8).Marek Sokolowski2017-08-281-1/+42
| | | | | | | | | | | | | | This improves the current llvm-rc parser by the ability of parsing ACCELERATORS statement. Moreover, some small improvements to the original parsing commit were made. Thanks for Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D36894 llvm-svn: 311946
* [llvm-rc] Add ICON and HTML parsing ability (parser, pt 2/8).Marek Sokolowski2017-08-281-0/+24
| | | | | | | | | | | This extends the current llvm-rc parser by ICON and HTML resources. Moreover, some tests have been slightly rewritten. Thanks for Nico Weber for his original work in this area. Differential Revision: https://reviews.llvm.org/D36891 llvm-svn: 311939
* Reapply: [llvm-rc] Add basic RC scripts parsing ability.Marek Sokolowski2017-08-181-0/+145
| | | | | | | | | | | | | | As for now, the parser supports a limited set of statements and resources. This will be extended in the following patches. Thanks to Nico Weber (thakis) for his original work in this area. This patch was originally submitted as r311175 and got reverted in r311177 because of the problems with compilation under gcc. Differential Revision: https://reviews.llvm.org/D36340 llvm-svn: 311184
* Revert "[llvm-rc] Add basic RC scripts parsing ability."Marek Sokolowski2017-08-181-145/+0
| | | | | | | | This reverts commit r311175. This failed some buildbots compilation. llvm-svn: 311177
* [llvm-rc] Add basic RC scripts parsing ability.Marek Sokolowski2017-08-181-0/+145
As for now, the parser supports a limited set of statements and resources. This will be extended in the following patches. Thanks to Nico Weber (thakis) for his original work in this area. Differential Revision: https://reviews.llvm.org/D36340 llvm-svn: 311175
OpenPOWER on IntegriCloud