aboutsummaryrefslogtreecommitdiff
path: root/msi
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-10-03 22:48:38 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-10-07 18:01:19 +0300
commita3e655d20d31090ad56d2423b16523a9dbc1c0e7 (patch)
treefc6514acd1aa89d1e5bc22c7930fe47be94b6eec /msi
parente8df59cc5f5c8ca6f700f62a2408ba873c1a3b5d (diff)
downloadmeson-a3e655d20d31090ad56d2423b16523a9dbc1c0e7.zip
meson-a3e655d20d31090ad56d2423b16523a9dbc1c0e7.tar.gz
meson-a3e655d20d31090ad56d2423b16523a9dbc1c0e7.tar.bz2
Package the Visual C runtime. Closes #2417.
Diffstat (limited to 'msi')
-rwxr-xr-xmsi/createmsi.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/msi/createmsi.py b/msi/createmsi.py
index dd92e50..c045a3e 100755
--- a/msi/createmsi.py
+++ b/msi/createmsi.py
@@ -47,8 +47,10 @@ class PackageGenerator:
self.staging_dirs = ['dist', 'dist2']
if self.bytesize == 64:
self.progfile_dir = 'ProgramFiles64Folder'
+ self.redist_path = 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Redist\\MSVC\\14.11.25325\\MergeModules\\Microsoft_VC141_CRT_x64.msm'
else:
self.progfile_dir = 'ProgramFilesFolder'
+ self.redist_path = 'c:\\Program Files\\Microsoft Visual Studio\\2017\\Community\\VC\\Redist\\MSVC\\14.11.25325\\MergeModules\\Microsoft_VC141_CRT_x86.msm'
self.component_num = 0
self.feature_properties = {
self.staging_dirs[0]: {
@@ -141,6 +143,12 @@ class PackageGenerator:
'Id': 'INSTALLDIR',
'Name': 'Meson',
})
+ ET.SubElement(installdir, 'Merge', {
+ 'Id': 'VCRedist',
+ 'SourceFile': self.redist_path,
+ 'DiskId': '1',
+ 'Language': '0',
+ })
ET.SubElement(product, 'Property', {
'Id': 'WIXUI_INSTALLDIR',
@@ -166,6 +174,14 @@ class PackageGenerator:
nodes[root] = cur_node
self.create_xml(nodes, sd, installdir, sd)
self.build_features(nodes, top_feature, sd)
+ vcredist_feature = ET.SubElement(top_feature, 'Feature', {
+ 'Id': 'VCRedist',
+ 'Title': 'Visual C++ runtime',
+ 'AllowAdvertise': 'no',
+ 'Display': 'hidden',
+ 'Level': '1',
+ })
+ ET.SubElement(vcredist_feature, 'MergeRef', {'Id': 'VCRedist'})
ET.ElementTree(self.root).write(self.main_xml, encoding='utf-8', xml_declaration=True)
# ElementTree can not do prettyprinting so do it manually
import xml.dom.minidom