View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014466 | CMake | CPack | public | 2013-10-09 05:42 | 2014-03-05 09:58 | ||||
Reporter | Ådne Hovda | ||||||||
Assigned To | Nils Gladitz | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.11.2 | ||||||||
Target Version | Fixed in Version | CMake 3.0 | |||||||
Summary | 0014466: Deterministic file/directory IDs | ||||||||
Description | Automatically generated IDs for <File />, <Directory /> and <Component /> tags, DIR_ID_1, FILE_ID_1, COMP_ID_1, are non-deterministic and that makes it impossible to reference those objects by ID from other parts of the WiX code, to execute an installed binary, add service config and firewall exceptions, for example. So, instead compose the ID by concatenating the relative path from INSTALL_ROOT and the file name, using some valid delimiter, a combination which should always be unique within one installer. A file and its component should simply share ID. Example output: directories.wxs: <Directory Id="INSTALL_ROOT" Name="MyProduct"> <Directory Id="bin" Name="bin"/> <Directory Id="include" Name="include"/> <Directory Id="lib" Name="lib"/> <Directory Id="share" Name="share"> <Directory Id="share.man" Name="man"> <Directory Id="share.man.man3" Name="man3"/> </Directory> </Directory> </Directory> files.wxs: <DirectoryRef Id="bin"> <Component Id="bin.prog1.exe" Guid="*" Win64="$(var.Win64)"> <File Id="bin.prog1.exe" Source="c:/.../bin/prog1.exe" KeyPath="yes"/> </Component> </DirectoryRef> <DirectoryRef Id="include"> <Component Id="include.lib1.h" Guid="*" Win64="$(var.Win64)"> <File Id="include.lib1.h" Source="c:/.../include/lib1.h" KeyPath="yes"/> </Component> </DirectoryRef> <DirectoryRef Id="lib"> <Component Id="lib.lib1.lib" Guid="*" Win64="$(var.Win64)"> <File Id="lib.lib1.lib" Source="c:/.../lib/lib1.lib" KeyPath="yes"/> </Component> </DirectoryRef> <DirectoryRef Id="share.man.man3"> <Component Id="share.man.man3.prog.3" Guid="*" Win64="$(var.Win64)"> <File Id="share.man.man3.prog.3" Source="c:/.../share/man/man3/prog.3" KeyPath="yes"/> </Component> </DirectoryRef> | ||||||||
Tags | WiX | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0034083) Ådne Hovda (reporter) 2013-10-09 05:51 |
The Win64="$(var.Win64)" attribute is an optional abstraction and dependent on the included variables I suggested at http://www.cmake.org/Bug/view.php?id=14467 [^] (although it's a good idea). Sorry for the confusion. |
(0034088) Nils Gladitz (developer) 2013-10-10 03:09 |
The msi schema has a 72 character limit for the identifiers while file names can go up to 255 characters which makes concatenation of path components (or even just including the file name) for the identifier difficult. Also when non latin letters are prominently used I would have to substitute them with place holders which could make this scheme very ambiguous. I am pondering a (shortened) SHA1 hash of the path (incl. file name) + shortened file name (+ optional ambiguity counter?) ... so e.g.: a1b2c3d_prog1.exe d1b2c3a_verylongfilenamethathadtobeshortened_cropped Maybe I could alternate between both schemes depending on path lengths and the use of non latin letters. |
(0034094) Ådne Hovda (reporter) 2013-10-10 08:46 |
I'm guessing that most setups will not run into those issues and if they do, replacing the last possible part of the ID with a hash of some sort, while stripping non-ASCII characters seems like a decent fallback. Most files and directories that you are likely to reference from other WiX code are going to fit in the standard scheme. Note, this is just my assumption. |
(0034126) Nils Gladitz (developer) 2013-10-15 13:37 |
Fixed by http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a4a74828ce83a6233107b14ab219c98a4ef5eab [^] |
(0035284) Robert Maynard (manager) 2014-03-05 09:58 |
Closing resolved issues that have not been updated in more than 4 months |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-10-09 05:42 | Ådne Hovda | New Issue | |
2013-10-09 05:47 | Ådne Hovda | Tag Attached: WiX | |
2013-10-09 05:51 | Ådne Hovda | Note Added: 0034083 | |
2013-10-10 03:08 | Nils Gladitz | Assigned To | => Nils Gladitz |
2013-10-10 03:08 | Nils Gladitz | Status | new => assigned |
2013-10-10 03:09 | Nils Gladitz | Note Added: 0034088 | |
2013-10-10 08:46 | Ådne Hovda | Note Added: 0034094 | |
2013-10-15 13:37 | Nils Gladitz | Note Added: 0034126 | |
2013-10-15 13:37 | Nils Gladitz | Status | assigned => resolved |
2013-10-15 13:37 | Nils Gladitz | Fixed in Version | => CMake 3.0 |
2013-10-15 13:37 | Nils Gladitz | Resolution | open => fixed |
2013-10-16 09:02 | Robert Maynard | Fixed in Version | => CMake 3.0 |
2014-03-05 09:58 | Robert Maynard | Note Added: 0035284 | |
2014-03-05 09:58 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |