From 2e15caa2bb158a7a2f93d99e39b14481840157ce Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 18 Jan 2011 22:55:39 +0000 Subject: [PATCH] fix bug #2770 - mingwm10.dll missing from 1.4.2 and 1.5.0 installer --- build/commands.py | 15 +++++++++++---- cmake/CMakeLists_cpack.txt | 7 ++++++- hm.py | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/build/commands.py b/build/commands.py index 082ae102..64843c02 100644 --- a/build/commands.py +++ b/build/commands.py @@ -439,7 +439,7 @@ class InternalCommands: if err != 0: raise Exception('doxygen failed with error code: ' + str(err)) - def dist(self, type, vcRedistDir): + def dist(self, type, vcRedistDir, qtDir): # Package is supported by default. package_unsupported = False @@ -453,8 +453,8 @@ class InternalCommands: raise Exception( 'VC++ redist dir path not specified (--vcredist-dir).') - # escape path separators for cmake - vcRedistDir = vcRedistDir.replace('\\', '\\\\') + # forward slashes are easier in cmake + vcRedistDir = vcRedistDir.replace('\\', '/') vcRedistArch = 'x86' if generator.endswith('Win64'): @@ -465,6 +465,10 @@ class InternalCommands: confArgs += (' -DVCREDIST_DIR:STRING=' + vcRedistDir + ' -DVCREDIST_FILE:STRING=' + vcRedistFile) + if (qtDir != ''): + # forward slashes are easier in cmake + confArgs += ' -DQT_DIR:STRING=' + qtDir.replace('\\', '/') + self.configure_internal('', confArgs) else: self.configure_internal(unixTarget, confArgs) @@ -878,6 +882,7 @@ class CommandHandler: ic = InternalCommands() build_targets = [] vcRedistDir = '' + qtDir = '' def __init__(self, argv, opts, args, verbose): @@ -899,6 +904,8 @@ class CommandHandler: self.build_targets += ['release',] elif o == '--vcredist-dir': self.vcRedistDir = a + elif o == '--qt-dir': + self.qtDir = a def about(self): self.ic.about() @@ -933,7 +940,7 @@ class CommandHandler: if len(self.args) > 0: type = self.args[0] - self.ic.dist(type, self.vcRedistDir) + self.ic.dist(type, self.vcRedistDir, self.qtDir) def distftp(self): type = None diff --git a/cmake/CMakeLists_cpack.txt b/cmake/CMakeLists_cpack.txt index 5bbdbb10..65cca8c8 100644 --- a/cmake/CMakeLists_cpack.txt +++ b/cmake/CMakeLists_cpack.txt @@ -32,12 +32,17 @@ IF(WIN32) INSTALL( FILES bin/Release/qsynergy.exe + ${QT_DIR}/qt/bin/libgcc_s_dw2-1.dll + ${QT_DIR}/qt/bin/mingwm10.dll + ${QT_DIR}/qt/bin/QtGui4.dll + ${QT_DIR}/qt/bin/QtCore4.dll + ${QT_DIR}/qt/bin/QtNetwork4.dll COMPONENT qsynergy DESTINATION bin) set(CPACK_COMPONENT_QSYNERGY_DISPLAY_NAME "Graphical User Interface") - set(VCREDIST_PATH "${VCREDIST_DIR}\\\\${VCREDIST_FILE}") + set(VCREDIST_PATH "${VCREDIST_DIR}/${VCREDIST_FILE}") install( PROGRAMS diff --git a/hm.py b/hm.py index 495036fc..b266c169 100644 --- a/hm.py +++ b/hm.py @@ -52,7 +52,7 @@ cmd_opt_dict = { 'update' : ['', []], 'install' : ['', []], 'doxygen' : ['', []], - 'dist' : ['', ['vcredist-dir=',]], + 'dist' : ['', ['vcredist-dir=', 'qt-dir=']], 'distftp' : ['', ['host=', 'user=', 'pass=', 'dir=']], 'kill' : ['', []], 'usage' : ['', []],