summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmCPackWIXGenerator.h
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2013-10-10 20:49:33 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2013-10-12 08:41:05 (GMT)
commit3a4a74828ce83a6233107b14ab219c98a4ef5eab (patch)
treef6a2a4d5d86cb7074f5846feecb269866e339f3d /Source/CPack/WiX/cmCPackWIXGenerator.h
parent7e4910fe47d667e059e42ac6395b0f4726f17064 (diff)
downloadCMake-3a4a74828ce83a6233107b14ab219c98a4ef5eab.zip
CMake-3a4a74828ce83a6233107b14ab219c98a4ef5eab.tar.gz
CMake-3a4a74828ce83a6233107b14ab219c98a4ef5eab.tar.bz2
CPackWiX: generate deterministic ids for directories, components and files
Diffstat (limited to 'Source/CPack/WiX/cmCPackWIXGenerator.h')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h
index aaccf9d..1380a171 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.h
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.h
@@ -54,6 +54,9 @@ protected:
}
private:
+ typedef std::map<std::string, std::string> id_map_t;
+ typedef std::map<std::string, size_t> ambiguity_map_t;
+
bool InitializeWiXConfiguration();
bool PackageFilesImpl();
@@ -82,13 +85,10 @@ private:
cmWIXSourceWriter& directoryDefinitions,
cmWIXSourceWriter& fileDefinitions,
cmWIXSourceWriter& featureDefinitions,
- size_t& directoryCounter,
- size_t& fileCounter,
const std::vector<std::string>& pkgExecutables,
std::vector<std::string>& dirIdExecutables
);
-
bool RequireOption(const std::string& name, std::string& value) const;
std::string GetArchitecture() const;
@@ -99,7 +99,21 @@ private:
static std::string GetRightmostExtension(const std::string& filename);
+ std::string PathToId(const std::string& path);
+
+ std::string CreateNewIdForPath(const std::string& path);
+
+ static std::string CreateHashedId(
+ const std::string& path, const std::string& normalizedFilename);
+
+ std::string NormalizeComponentForId(
+ const std::string& component, size_t& replacementCount);
+
+ static bool IsLegalIdCharacter(char c);
+
std::vector<std::string> wixSources;
+ id_map_t pathToIdMap;
+ ambiguity_map_t idAmbiguityCounter;
};
#endif