wixgem 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/command.rb +8 -5
- data/lib/wixgem.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c29e3714b5b5184d848685126bb069df52fee6d8
|
4
|
+
data.tar.gz: 76ed5a633256dab3b533f45f88d404515b7f4b0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2c61fd4da7e83d8395296c10154420546e02632549d611a973b0d4e58603aa78815eec97cda99454407f98e25bc9807cff9790327aad19c8e50ddd74b24fd13
|
7
|
+
data.tar.gz: 0ee6a7f653f8adf8fd00e071daa362eeb2ead844fe1cf0c8a5695120bbc653138570ed958c4792f130f0165a0cd88826ef54a7b35815fe528cc4c30a8944b9fe
|
data/lib/command.rb
CHANGED
@@ -4,23 +4,26 @@ require 'hash'
|
|
4
4
|
module Wixgem
|
5
5
|
|
6
6
|
class Command < Hash
|
7
|
-
def initialize(cmd)
|
8
|
-
self[:command]=cmd
|
7
|
+
def initialize(cmd, options=nil)
|
9
8
|
self[:output] = ''
|
10
9
|
self[:error] = ''
|
11
10
|
self[:exit_code] = ''
|
12
11
|
self[:ignore_exit_code] = false
|
13
12
|
self[:debug] = false
|
13
|
+
self[:quiet] = false
|
14
|
+
|
15
|
+
self[:command]=cmd
|
16
|
+
options.each { |key, value| self[key] = value} unless(options.nil?)
|
14
17
|
end
|
15
18
|
|
16
19
|
def execute
|
17
20
|
begin
|
18
|
-
puts
|
21
|
+
puts self[:command] unless(self[:quiet])
|
19
22
|
self[:output],self[:error], self[:exit_code] = Open3.capture3(self[:command])
|
20
23
|
self[:exit_code]=self[:exit_code].to_i
|
21
24
|
|
25
|
+
puts self[:output] unless(self[:quiet])
|
22
26
|
if(self[:debug])
|
23
|
-
puts "output: #{self[:output]}"
|
24
27
|
puts "error: #{self[:error]}"
|
25
28
|
puts "exit_code: #{self[:exit_code]}"
|
26
29
|
end
|
@@ -32,7 +35,7 @@ class Command < Hash
|
|
32
35
|
if((self[:exit_code] != 0) && !self[:ignore_exit_code])
|
33
36
|
exception_text = self[:error]
|
34
37
|
exception_text = self[:output] if(self[:error].empty?)
|
35
|
-
raise
|
38
|
+
raise exception_text
|
36
39
|
end
|
37
40
|
end
|
38
41
|
end
|
data/lib/wixgem.rb
CHANGED
@@ -138,8 +138,9 @@ class Wix
|
|
138
138
|
if(input.has_key?(:modify_file_paths))
|
139
139
|
input[:modify_file_paths].each { |regex, replacement_string| install_path = install_path.gsub(regex, replacement_string) }
|
140
140
|
end
|
141
|
+
raise "Invalid relative installation path: #{install_path}" if(install_path.include?(':'))
|
141
142
|
|
142
|
-
install_path = "#{directory}/#{install_path}"
|
143
|
+
install_path = "#{directory}/#{install_path}"
|
143
144
|
FileUtils.mkpath(File.dirname(install_path)) unless(Dir.exists?(File.dirname(install_path)))
|
144
145
|
FileUtils.cp(file, install_path)
|
145
146
|
elsif(!File.exists?(file))
|
@@ -187,7 +188,7 @@ class Wix
|
|
187
188
|
cmd = cmd.gsub(/-srd/, '-sreg -srd') if(input.has_key?(:suppress_registry_harvesting) && input[:suppress_registry_harvesting])
|
188
189
|
cmd = cmd.gsub(/-srd/, '-scom -srd') if(input.has_key?(:suppress_COM_elements) && input[:suppress_COM_elements])
|
189
190
|
|
190
|
-
heat_cmd = Command.new(cmd)
|
191
|
+
heat_cmd = Command.new(cmd, { quiet: true })
|
191
192
|
@logger << "command: #{heat_cmd[:command]}" if(@debug && !@logger.nil?)
|
192
193
|
|
193
194
|
heat_cmd.execute
|
@@ -246,7 +247,7 @@ class Wix
|
|
246
247
|
def self.create_output(wxs_file, output)
|
247
248
|
wixobj_file = "#{File.basename(wxs_file,'.wxs')}.wixobj"
|
248
249
|
|
249
|
-
candle_cmd = Command.new("\"#{install_path}/bin/candle.exe\" -out \"#{wixobj_file}\" \"#{wxs_file}\"")
|
250
|
+
candle_cmd = Command.new("\"#{install_path}/bin/candle.exe\" -out \"#{wixobj_file}\" \"#{wxs_file}\"", { quiet: true })
|
250
251
|
@logger << "command: #{candle_cmd[:command]}" if(@debug && !@logger.nil?)
|
251
252
|
|
252
253
|
candle_cmd.execute
|
@@ -255,7 +256,7 @@ class Wix
|
|
255
256
|
@logger << candle_cmd[:output] unless(@logger.nil?)
|
256
257
|
end
|
257
258
|
|
258
|
-
light_cmd = Command.new("\"#{install_path}/bin/light.exe\" -nologo -out \"#{output}\" \"#{wixobj_file}\"")
|
259
|
+
light_cmd = Command.new("\"#{install_path}/bin/light.exe\" -nologo -out \"#{output}\" \"#{wixobj_file}\"", { quiet: true })
|
259
260
|
@logger << "command: #{light_cmd[:command]}" if(@debug && !@logger.nil?)
|
260
261
|
|
261
262
|
light_cmd.execute
|
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.
|
4
|
+
version: 0.46.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: 2015-01-
|
11
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|