Commit Graph

47 Commits

Author SHA1 Message Date
Brad King e1c7747253 Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first).  First
run `clang-format` with the config file:

    ---
    SortIncludes: false
    ...

Commit the result temporarily.  Then run `clang-format` again with:

    ---
    SortIncludes: true
    IncludeCategories:
      - Regex:    'sys/types.h'
        Priority: -1
    ...

Commit the result temporarily.  Start a new branch and cherry-pick the
second commit.  Manually resolve conflicts to preserve indentation of
re-ordered includes.  This cleans up the include ordering without
changing any other style.

Use the following command to run `clang-format`:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
      egrep -z -v '^Source/cm_sha2' |
      egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
      egrep -z -v '^Utilities/(KW|cm).*/' |
      egrep -z -v '^Tests/Module/GenerateExportHeader' |
      egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
      xargs -0 clang-format -i

This selects source files that do not come from a third-party.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
Nils Gladitz de77d4a741 CPackWIX: Allow multiple patch files and diagnose if any are missing
CPACK_WIX_PATCH_FILE now accepts a list of patch files.
An error will now be produced if any of the patch files is missing.

Previously this would be silently ignored.
2015-12-14 23:28:42 +01:00
Nils Gladitz 38d723b37e CPackWIX: Allow patching of shortcut components 2015-12-12 10:36:51 +01:00
Nils Gladitz ecdc77f14d CPackWIX: Fix installed file property lookups when using components
The WIX generator incorrectly looked for installed file properties
by relative paths that included the component specific staging
directory prefix.

Remove that prefix in installed file property lookups when
generating packages with components.
2015-12-10 17:38:18 +01:00
Nils Gladitz d3625b7283 CPackWIX: Don't allow users to deselect the top-level feature (#15838)
The top-level WiX feature implicitly created by the WIX generator
represents the package as a whole.

As such it does not make sense to allow installer users to deselect
it from the installation.

Suggested-by: Mark Stijnman
2015-11-09 17:50:21 +01:00
Stephen Kelly 44ffb9cdb4 Replace foo.size() pattern with !foo.empty(). 2015-08-24 20:47:18 +02:00
Brad King 356c26ebdf cmSystemTools: Teach RunSingleCommand to separate stdout and stderr
Extend the RunSingleCommand signature to capture stdout and stderr
separately.  Allow both to be captured to the same std::string
to preserve existing behavior.  Update all call sites to do this
so that this refactoring does not introduce functional changes.
2015-04-20 15:47:50 -04:00
Nils Gladitz 98a3b2e29e CPackWIX: Omit codepage conversion when internal encoding is already UTF-8. 2015-03-27 12:22:15 +01:00
Nils Gladitz 2e16aff1e2 CPackWIX: Fix .wixobj output locations and filenames.
Preserve all but the last extension when generating .wixobj output
filenames from source files and make sure they are unique.

Output .wixobj files in cpack staging area instead
of the current working directory.
2015-03-06 21:09:19 +01:00
Nils Gladitz b0852ebc09 CPackWIX: Support patching of root <Feature> elements. 2015-03-06 21:06:42 +01:00
Nils Gladitz e6731f486e CPackWIX: Add new CPACK_STARTUP_SHORTCUTS property. 2015-02-21 18:07:36 +01:00
Nils Gladitz 279605f560 CPackWIX: Add installed file properties for the creation of shortcuts. 2015-02-21 17:30:31 +01:00
Nils Gladitz 53d7daffac CPackWIX: Refactor start menu and desktop shortcut creation. 2015-02-21 12:38:14 +01:00
Nils Gladitz a2ccbffd8b CPackWIX: Extend the patching mechanism to allow adding content to <Product>. 2015-02-13 12:09:40 +01:00
Stephen Kelly 6162c9194b Use two-iterator std::set::insert where appropriate. 2015-01-11 17:00:55 +01:00
Nils Gladitz fb009f00ae CPackWiX: Work around RelativePath() returning an empty string for the root 2014-10-03 15:10:51 +02:00
Nils Gladitz d48c781fc2 CPackWiX: Extend CPACK_WIX_ACL to support directories 2014-09-27 17:34:39 +02:00
Nils Gladitz e785fab54b CPackWiX: Teach WiX installers to remember the install location for upgrades 2014-09-19 22:42:36 +02:00
Nils Gladitz d0b1d2a65b CPackWiX: Implement CPACK_NEVER_OVERWRITE and CPACK_PERMANENT properties 2014-05-28 12:30:44 -04:00
Nils Gladitz cb59f5da97 CPackWIX: Delay creation of cmWIXPatch until CPack has initialized Logger
Without the fix CPack will crash when the cmWIXPatch class tries to issue
any diagnostics.
2014-04-18 22:45:30 +02:00
Nils Gladitz 642fa25da0 CPackWIX: support installation of empty directories 2014-03-02 00:51:42 +01:00
Nils Gladitz 378eb5b712 CPackWIX: Allow Windows Installer property customization 2014-03-01 23:13:35 +01:00
Nils Gladitz 6fcd835c07 CPackWIX: refactor and cleanup
Extract addtional classes and functions which are getting unsightly large.
Use some of the coding conventions more consistently.
2014-02-26 14:15:13 +01:00
Timo Rothenpieler b78d74de64 CPackWiX: Add support for CPACK_CREATE_DESKTOP_LINKS 2014-02-08 19:19:33 +01:00
Nils Gladitz 92c4d4039e CPackWiX: added new CPACK_WIX_CMAKE_PACKAGE_REGISTRY variable
Allows automatic registration of installed packages with
the cmake package registry.
2014-01-08 01:28:24 +01:00
Clinton Stimpson 5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -05:00
Nils Gladitz 44a7543c53 CPackWiX: transfer file read only flag during installation 2013-12-26 00:14:44 +01:00
Brad King b5ef7fd47e Merge topic 'wix-cmake-coding-conventions'
37a1157 CPackWiX: adhere to CMake member naming convention
2013-12-23 10:19:29 -05:00
Nils Gladitz 37a1157aa9 CPackWiX: adhere to CMake member naming convention 2013-12-20 18:12:01 +01:00
Nils Gladitz 7eea71ea57 CPackWiX: replace slash with backslash in registry key path
Forward slash is not understood as a key path separator.
2013-12-20 12:01:28 +01:00
Nils Gladitz 8632233a2f CPackWiX: allow customization of generated WiX sources
Added a new variable CPACK_WIX_PATCH_FILE that users can point at an
XML patch file. Fragments defined within the patch file will be inserted
at supported insertion points (currently Component, File and Directory).
2013-12-17 14:14:42 +01:00
Clinton Stimpson 0b9906c2fb Windows: Use wide-character system APIs
Make CMake compile with -DUNICODE.  Make it possible for the 8 bit
encoding to eventually be UTF-8 instead ANSI.
2013-12-09 10:29:43 -05:00
Nils Gladitz 7b390f75e8 CPackWiX: add CPack component support
Creates a hierarchy of WiX features from CPack components and component groups.
Switch to the FeatureTree UI in case components have been defined.
Handles the component REQUIRE and HIDDEN options
and the component group EXPANDED option.
2013-11-26 22:15:57 +01:00
Nils Gladitz 096591b96a CPackWiX: Add variables for custom tool extensions and flags 2013-11-12 14:10:01 -05:00
Nils Gladitz fe7f8c99a4 CPackWiX: use safe IDs for generated start menu shortcuts 2013-10-26 10:15:19 -04:00
Brad King 69fd12583c Merge topic 'wix-extra-sources'
2e6cadd CPackWiX: allow user supplied extra sources, objects and libraries
2013-10-15 09:33:22 -04:00
Nils Gladitz 2e6cadde13 CPackWiX: allow user supplied extra sources, objects and libraries 2013-10-13 13:16:54 +02:00
Nils Gladitz 3a4a74828c CPackWiX: generate deterministic ids for directories, components and files 2013-10-12 10:41:05 +02:00
Adam J. Weigold bf23891942 CPackWIX: Add support for custom WiX templates
WiX provides a lot of functionality for installers that cannot be
supported (easily) in the default WIX.template.in file.

For most users, the default template should be fine.  However if users
want to produce merge modules, include custom actions, etc, this new
option allows for a hook into how the wxs is produced.
2013-07-19 14:50:43 -04:00
Richard Ulrich bfa2e299ae CPackWIX: Add option to specify the language(s) of the installer
Add option "CPACK_WIX_CULTURES".
2013-07-19 14:50:43 -04:00
Richard Ulrich 6e51ea9870 CPackWIX: Handle multiple shortcuts in the start menu 2013-07-19 14:50:42 -04:00
Ian Monroe 6d77e1ab3f CPackWIX: Fix MSI package layout regression from parent
The parent commit added a regression where if the install directory had:

  parent
    child A
    child B

the produced MSI would install:

  parent
    child A
       child B
2013-07-19 10:49:20 -04:00
Fredrik Axelsson 8c0e32550c CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967)
Add start menu items including an uninstall shortcut.  Add variable
CPACK_WIX_PROGRAM_MENU_FOLDER to configure folder name.
2013-07-19 10:49:00 -04:00
Eric LaFranchi 3793dca08a CPack: WIX Product Icon, UI Banner, UI Dialog support (#13789) 2012-12-28 15:32:15 -05:00
David Cole a74bd470a4 CPack: Fix dashboard errors and warnings (#11575)
...revealed by the Nightly dashboard runs last night.

Use "size_t" instead of "std::size_t" so that it compiles with
Visual Studio 6, too.

Fix warnings about shadowed "tmp" local variable and ordering of
member variables vs. lines of code in the constructor initializer
list.
2012-12-04 14:37:41 -05:00
David Cole 0729ad476c CPack: Fix dashboard errors (#11575)
Use same technique here with UuidToString as already found in
cmGlobalVisualStudio7Generator::CreateGUID to avoid using a type
that is not defined on older systems... (VS 7.0 and Borland)
2012-12-03 13:16:35 -05:00
Nils Gladitz 85baac1503 CPack: Add a WiX Generator (#11575)
This new CPack generator produces an *.msi installer file.
Requires having the WiX Toolset installed in order to work
properly.

Download the WiX Toolset installer "WiX36.exe" here:

  http://wix.codeplex.com/releases/view/93929
2012-12-03 11:00:31 -05:00