wixgem 0.88.0 → 0.89.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 745cfacea3eddd72db3e6ca74dec7df632fe036a
4
- data.tar.gz: 9316c33e98cd047c9aff4838241bd874aea40049
3
+ metadata.gz: a0a90630daad942ac1209f4eb566081756c0c2a0
4
+ data.tar.gz: ae14956615634c1da38e9a6997740e823a761aba
5
5
  SHA512:
6
- metadata.gz: 46db6705df9609faf42f2f9bdb13b2946a18d1342d1b327959626b4eff60c3c8a70cf2633dd3517f8b6a24bbd9ff7c3fea065c61908219670cbda74eeb3f8b1e
7
- data.tar.gz: 450825fe9176938fa7a84412a841184580843e98267732c683a50ab3e57fd5358e4e026e79509b265d6179e9b4bfe7b5a078cdfb55f12b11493ad2267c6ffb73
6
+ metadata.gz: 2004c80f90e911386eb717834d7391190195daa3cbc2ed6c1ccba31668d24182a19097aa56a2f3e71d8af1c8fdbe952bea94c7e91448d2b70134a7edb21c750b
7
+ data.tar.gz: 73aae6bf95215251e3244fc0ed276cb8c75704cbd31716ebdde3473bd2693baabddc60cf8ade3e5e42d222037c786725f8bee1e5a9315f756799fb04a95b5d51
data/README.md CHANGED
@@ -54,10 +54,9 @@ small set of optional arguments allowing the developer to customize the generate
54
54
  installation of the product before installing the product.
55
55
  * **all_users**: String value perUser or perMachine. The default is perUser.
56
56
  * **suppress_registry_harvesting** Suppress's heat's registry harvesting. Can fix the Runtime Error E6034.
57
- * **suppress_COM_elements** Suppress COM elements.
57
+ * **suppress_COM_elements** Suppress COM elements, Heat's -scom
58
58
  * **installer_version** Represents the minimum version of the Windows installer required to install
59
- this package. The default version is 4.5. Other valid versions are 2.0,
60
- 3.0, 3.5, 4.0, 4.5.
59
+ this package. The default version is 4.5 i.e. NETFRAMEWORK45
61
60
  * **requires_netframework** Tests to see if the require netframework version is installed on the machine. The
62
61
  associated value specifies the netframework version. The net framework strings can
63
62
  be found at http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html
data/example/example.msi CHANGED
Binary file
data/example/example.msm CHANGED
Binary file
data/lib/shortcut.rb CHANGED
@@ -21,6 +21,7 @@ class Shortcut
21
21
  return xml_doc
22
22
  end
23
23
 
24
+ private
24
25
  def create_shortcut_element(file_element)
25
26
  shortcut_element = file_element.add_element 'Shortcut'
26
27
 
data/lib/wixgem.rb CHANGED
@@ -76,20 +76,33 @@ class Wix
76
76
  end
77
77
 
78
78
  def self.manage_netframework(xml_doc, input)
79
- wix = REXML::XPath.match(xml_doc, "/Wix")[0]
80
- add_netfx_namespace = false
81
79
  if(input.key?(:requires_netframework))
82
- add_netfx_namespace=true
83
- fragment = wix.add_element 'Fragment'
84
- fragment.add_element 'PropertyRef', { 'Id' => input[:requires_netframework] }
85
- condition = fragment.add_element 'Condition', { 'Message' => "This application requires .NET Framework #{input[:requires_netframework]}. Please install the .NET Framework then run this installer again." }
80
+ wix = REXML::XPath.match(xml_doc, "/Wix")[0]
81
+ wix.attributes['xmlns:netfx'] = 'https://schemas.microsoft.com/wix/NetFxExtension'
82
+
83
+ product = REXML::XPath.match(xml_doc, "/Wix/Product")[0]
84
+ product.add_element 'PropertyRef', { 'Id' => input[:requires_netframework] }
85
+ condition = product.add_element 'Condition', { 'Message' => "This application requires .NET Framework #{input[:requires_netframework]}. Please install the .NET Framework then run this installer again." }
86
86
  condition.text = "<![CDATA[Installed OR #{input[:requires_netframework]}]]>"
87
87
  end
88
88
 
89
- wix.attributes['xmlns:netfx'] = 'https://schemas.microsoft.com/wix/NetFxExtension' if(add_netfx_namespace)
90
89
  return xml_doc
91
90
  end
92
91
 
92
+ def self.manage_win10_crt(xml_doc, input)
93
+ if(input.key?(:requires_win10_crt))
94
+ product = REXML::XPath.match(xml_doc, "/Wix/Product")[0]
95
+
96
+ property = product.add_element 'Property', { 'Id' => 'WIN10_CRT_PRESENT' }
97
+ search = property.add_element 'DirectorySearch', { 'Id' => 'SystemFolderDriverVersion', 'Path' => '[SystemFolder]' }
98
+ search.add_element 'FileSearch', { 'Name' => 'ucrtbase.dll' }
99
+ condition = product.add_element 'Condition', { 'Message' => 'Requires Universal CRT see Windows Update KB2999226' }
100
+ condition.text = "<![CDATA[Installed OR WIN10_CRT_PRESENT]]>"
101
+ end
102
+
103
+ return xml_doc
104
+ end
105
+
93
106
  def self.manage_ui(xml_doc, input)
94
107
  product_elements = REXML::XPath.match(xml_doc, "/Wix/Product")
95
108
 
@@ -482,6 +495,7 @@ class Wix
482
495
 
483
496
  xml_doc = manage_installdir(xml_doc, input)
484
497
  xml_doc = manage_netframework(xml_doc, input)
498
+ xml_doc = manage_win10_crt(xml_doc, input)
485
499
  #xml_doc = manage_ui(xml_doc, input)
486
500
  xml_doc = manage_custom_actions(xml_doc, input)
487
501
  xml_doc = manage_upgrade(xml_doc,input)
@@ -495,6 +509,10 @@ class Wix
495
509
  formatter = REXML::Formatters::Pretty.new(2)
496
510
  formatter.compact = true
497
511
  File.open(wxs_file, 'w') { |f| formatter.write(xml_doc, f) }
512
+ str = File.read(wxs_file)
513
+ str = str.gsub(/&lt;/,'<')
514
+ str = str.gsub(/&gt;/,'>')
515
+ File.open(wxs_file, 'w') { |f| f.puts(str) }
498
516
  end
499
517
 
500
518
  def self.create_output(wxs_file, input, output)
@@ -505,7 +523,7 @@ class Wix
505
523
  log_wix_output(candle_cmd)
506
524
 
507
525
  cmd_args = "-nologo -out \"#{output}\" \"#{wixobj_file}\""
508
- cmd_args = "-ext WixUIExtension -ext WixUtilExtension -cultures:en-us #{cmd_args}"
526
+ cmd_args = "-ext WixNetfxExtension -ext WixUIExtension -ext WixUtilExtension -cultures:en-us #{cmd_args}"
509
527
  light_cmd = Execute.new("\"#{install_path.gsub(/\\/,'/')}/bin/light.exe\" #{cmd_args}", { quiet: true })
510
528
  light_cmd.execute
511
529
  log_wix_output(light_cmd)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wixgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.88.0
4
+ version: 0.89.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Marshall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-10 00:00:00.000000000 Z
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execute