Qpid
  1. Qpid
  2. QPID-2711

Add version and icon resources to Windows C++ exe/dll files

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: None
    • Labels:
      None

      Description

      Windows DLL and EXE files produced by qpid/cpp need a version resource and the EXE files need an icon. This issue tracks the addition of those resources.

      1. qpid_cpp-add-win32-version-and-icon-5.patch
        20 kB
        Chuck Rolke
      2. qpid-icon.ico
        52 kB
        Chuck Rolke

        Activity

        Hide
        Chuck Rolke added a comment -

        Based at qpid/cpp, this patch adds version and icon resources to windows dll and exe files produced by the cpp directory.

        Notes:

        1. A single .rc file is added to each library and executable in the CMakeLists.txt script. This implies that for any given build all exe and dll files will get the same version and icon since their resources are created from the same file set.

        2. A generic version number is chosen as the checked in value. When individual developers compile and link then their files will have the generic values embedded in them. The idea is nominally to prevent day-to-day developers from producing images that may be confused with shipping products. In order to produce a shippable product the build process is expected to replace or to edit the generic values with genuine version numbers.

        3. My thanks to whoever produced the qpid-icon.ico file. That's a nice piece of work and it probably required more effort than my patch.

        Show
        Chuck Rolke added a comment - Based at qpid/cpp, this patch adds version and icon resources to windows dll and exe files produced by the cpp directory. Notes: 1. A single .rc file is added to each library and executable in the CMakeLists.txt script. This implies that for any given build all exe and dll files will get the same version and icon since their resources are created from the same file set. 2. A generic version number is chosen as the checked in value. When individual developers compile and link then their files will have the generic values embedded in them. The idea is nominally to prevent day-to-day developers from producing images that may be confused with shipping products. In order to produce a shippable product the build process is expected to replace or to edit the generic values with genuine version numbers. 3. My thanks to whoever produced the qpid-icon.ico file. That's a nice piece of work and it probably required more effort than my patch.
        Hide
        Steve Huston added a comment -

        The .rc file needs hand edits for all releases. This is not necessary and is a risk for introducing errors. All the variable information can be substituted in by cmake.

        Should probably also check with Apache legal on the copyright notice. Or leave it out and let the license included in the installer govern.

        You're welcome for the icon file. I bought a nice tool that cut it down to a few hours' work.

        Show
        Steve Huston added a comment - The .rc file needs hand edits for all releases. This is not necessary and is a risk for introducing errors. All the variable information can be substituted in by cmake. Should probably also check with Apache legal on the copyright notice. Or leave it out and let the license included in the installer govern. You're welcome for the icon file. I bought a nice tool that cut it down to a few hours' work.
        Hide
        Chuck Rolke added a comment -

        Sorry about the "hand edit" phrase. I meant "script edit". Hand editing anything for a build is bad; all build scripts info must be checked in for a repeatable build.

        I'll get rid of the copyright entirely.

        I'm rethinking the "one RC file" approach and tending toward one RC file for each object. Then each object has independent version info and descriptive file strings. This method avoids having a another new file to hold the version and file description info; put the info directly into the correct RC file and be done.

        Show
        Chuck Rolke added a comment - Sorry about the "hand edit" phrase. I meant "script edit". Hand editing anything for a build is bad; all build scripts info must be checked in for a repeatable build. I'll get rid of the copyright entirely. I'm rethinking the "one RC file" approach and tending toward one RC file for each object. Then each object has independent version info and descriptive file strings. This method avoids having a another new file to hold the version and file description info; put the info directly into the correct RC file and be done.
        Hide
        Chuck Rolke added a comment -

        Based at qpid/cpp this patch adds a Windows version resource and an Icon to exe and dll files.

        1. The qpid/cpp/CMakeLists file is reordered to construct CPACK variables before adding subdirectories. The /src subdirectory uses the CPACK variable version values.

        2. The qpid/cpp/src/CMakeLists file is enhanced to propagate windows versions specified 1) in a file dedicated to windows version settings, 2) in CPACK variables, and 3) later on in the file via a command line.

        3. A file, cpp/src/CMakeWinVersions.cmake is added to contain windows version settings 1) for all projcects or 2) for individual projects. This file gives users fine grained control of what goes into any project's version.RC file.

        4. A single template RC file is added. This file is the input to a configure_file cmake command. Its variables are substituted to create the actual version.rc file for a given project.

        5. An icon file is added.

        Notes:
        a. copyright information is left blank
        b. default version values are taken from the CPACK settings and the project's names.

        Show
        Chuck Rolke added a comment - Based at qpid/cpp this patch adds a Windows version resource and an Icon to exe and dll files. 1. The qpid/cpp/CMakeLists file is reordered to construct CPACK variables before adding subdirectories. The /src subdirectory uses the CPACK variable version values. 2. The qpid/cpp/src/CMakeLists file is enhanced to propagate windows versions specified 1) in a file dedicated to windows version settings, 2) in CPACK variables, and 3) later on in the file via a command line. 3. A file, cpp/src/CMakeWinVersions.cmake is added to contain windows version settings 1) for all projcects or 2) for individual projects. This file gives users fine grained control of what goes into any project's version.RC file. 4. A single template RC file is added. This file is the input to a configure_file cmake command. Its variables are substituted to create the actual version.rc file for a given project. 5. An icon file is added. Notes: a. copyright information is left blank b. default version values are taken from the CPACK settings and the project's names.
        Hide
        Chuck Rolke added a comment -

        This submission improves the override precedence rules for better operation.

        1. The settings override precedence from lowest to highest:
        2. 1. CPACK settings from cpp/CMakeLists.txt
        3. 2. Global settings from CMakeWinVeresions.cmake file
        4. 3. Command line version number (only) from add_msvc_version_full call
        5. 4. Per-project settings from CMakeWinVeresions.cmake file
        Show
        Chuck Rolke added a comment - This submission improves the override precedence rules for better operation. The settings override precedence from lowest to highest: 1. CPACK settings from cpp/CMakeLists.txt 2. Global settings from CMakeWinVeresions.cmake file 3. Command line version number (only) from add_msvc_version_full call 4. Per-project settings from CMakeWinVeresions.cmake file
        Hide
        Chuck Rolke added a comment -

        The icon file. Place it in qpid\cpp\src\windows\resources.

        Show
        Chuck Rolke added a comment - The icon file. Place it in qpid\cpp\src\windows\resources.

          People

          • Assignee:
            Ted Ross
            Reporter:
            Chuck Rolke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development