summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-21 13:32:33 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-04-21 13:32:33 (GMT)
commit658cc11cf19ed514f93afe3d837a0bd24377499d (patch)
treeaaba459e9f64d076479358277b1b04ccdda7ff8a /Source
parentba83d84714bff717b58ecb0c91df62ca91db3bb8 (diff)
parentcb59f5da97723f648df78fd16d95697008d5d42b (diff)
downloadCMake-658cc11cf19ed514f93afe3d837a0bd24377499d.zip
CMake-658cc11cf19ed514f93afe3d837a0bd24377499d.tar.gz
CMake-658cc11cf19ed514f93afe3d837a0bd24377499d.tar.bz2
Merge topic 'fix-wix-cpack-crash'
cb59f5da CPackWIX: Delay creation of cmWIXPatch until CPack has initialized Logger
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx19
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.h3
2 files changed, 16 insertions, 6 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index a385e40..ec59715 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -33,14 +33,23 @@
cmCPackWIXGenerator::cmCPackWIXGenerator():
HasDesktopShortcuts(false),
- Patch(Logger)
+ Patch(0)
{
}
+cmCPackWIXGenerator::~cmCPackWIXGenerator()
+{
+ if(this->Patch)
+ {
+ delete this->Patch;
+ }
+}
+
int cmCPackWIXGenerator::InitializeInternal()
{
componentPackageMethod = ONE_PACKAGE;
+ this->Patch = new cmWIXPatch(this->Logger);
return this->Superclass::InitializeInternal();
}
@@ -232,7 +241,7 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
const char* patchFilePath = GetOption("CPACK_WIX_PATCH_FILE");
if(patchFilePath)
{
- this->Patch.LoadFragments(patchFilePath);
+ this->Patch->LoadFragments(patchFilePath);
}
return true;
@@ -525,7 +534,7 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
return false;
}
- return this->Patch.CheckForUnappliedFragments();
+ return this->Patch->CheckForUnappliedFragments();
}
std::string cmCPackWIXGenerator::GetProgramFilesFolderId() const
@@ -857,13 +866,13 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
desktopExecutables,
shortcutMap);
- this->Patch.ApplyFragment(subDirectoryId, directoryDefinitions);
+ this->Patch->ApplyFragment(subDirectoryId, directoryDefinitions);
directoryDefinitions.EndElement("Directory");
}
else
{
std::string componentId = fileDefinitions.EmitComponentFile(
- directoryId, id, fullPath, this->Patch);
+ directoryId, id, fullPath, *(this->Patch));
featureDefinitions.EmitComponentRef(componentId);
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h
index 4c9f8c7..8705d40 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.h
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.h
@@ -35,6 +35,7 @@ public:
cmCPackTypeMacro(cmCPackWIXGenerator, cmCPackGenerator);
cmCPackWIXGenerator();
+ ~cmCPackWIXGenerator();
protected:
virtual int InitializeInternal();
@@ -166,7 +167,7 @@ private:
std::string CPackTopLevel;
- cmWIXPatch Patch;
+ cmWIXPatch* Patch;
};
#endif