wixgem 0.111.0 → 0.112.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/example/example.msi +0 -0
- data/example/example.msm +0 -0
- data/lib/file.rb +1 -1
- data/lib/service.rb +1 -1
- data/lib/shortcut.rb +1 -1
- data/lib/wixgem.rb +12 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4723f8b26548ee609b1bfaee5351907307088a980711b19f303de6d022e2492
|
4
|
+
data.tar.gz: 71863140ca3dccf4e34edc6c19ce262cd2c3d20f1ed5076f9c3fc07c9f5281d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6b4f238ed0b62c2548f4bf8b8e91510aa5dd940c15555f516026a5b0f48fdf9da89ae67a3749cca041b922f872fdcb9295454ef3a65dd69c1cafde1c2d44f9a
|
7
|
+
data.tar.gz: 6799fa78437b6ff969bef1685045984884ba1564ca5f056c798cd92eee595e75c31cec3674dd96571611ca4e1f7316e18d5a8e4706cfe8ce4ac88dcefeda7138
|
data/example/example.msi
CHANGED
Binary file
|
data/example/example.msm
CHANGED
Binary file
|
data/lib/file.rb
CHANGED
@@ -2,7 +2,7 @@ require 'win32ole'
|
|
2
2
|
|
3
3
|
class File
|
4
4
|
def self.read_only?(path)
|
5
|
-
raise "'#{path}' does not exist" unless(File.
|
5
|
+
raise "'#{path}' does not exist" unless(File.exist?(path))
|
6
6
|
|
7
7
|
fso = WIN32OLE.new('Scripting.FileSystemObject')
|
8
8
|
raise 'Failed to create Scripting.FileSystemObject' if(fso.nil?)
|
data/lib/service.rb
CHANGED
@@ -14,7 +14,7 @@ class Service
|
|
14
14
|
raise "Service hash is required to have a :name key" unless(@hash[:service].has_key?(:name))
|
15
15
|
|
16
16
|
service_exe = @hash[:service_exe]
|
17
|
-
raise "Service #{file} does not exist" unless(File.
|
17
|
+
raise "Service #{file} does not exist" unless(File.exist?(service_exe))
|
18
18
|
|
19
19
|
file_elements = REXML::XPath.match(xml_doc, "//File[@Source='.\\#{service_exe.gsub(/\//,'\\')}']")
|
20
20
|
raise "Service #{@file} does not match a 'File' element with a 'Source' attribute in the wix generated wix file" if(file_elements.length == 0)
|
data/lib/shortcut.rb
CHANGED
@@ -11,7 +11,7 @@ class Shortcut
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def create(xml_doc)
|
14
|
-
raise "Shortcut #{@file} does not exist" unless(File.
|
14
|
+
raise "Shortcut #{@file} does not exist" unless(File.exist?(@file))
|
15
15
|
|
16
16
|
file_elements = REXML::XPath.match(xml_doc, "//File[@Source='.\\#{@file.gsub(/\//,'\\')}']")
|
17
17
|
raise "Shortcut #{@file} does not match a 'File' element with a 'Source' attribute in the wix generated wix file" if(file_elements.length == 0)
|
data/lib/wixgem.rb
CHANGED
@@ -197,7 +197,7 @@ class Wix
|
|
197
197
|
|
198
198
|
install_files.each do |file|
|
199
199
|
absolute_path = file
|
200
|
-
absolute_path = "#{input[:original_pwd]}/#{file}" unless(File.
|
200
|
+
absolute_path = "#{input[:original_pwd]}/#{file}" unless(File.exist?(file))
|
201
201
|
|
202
202
|
if(File.read_only?(absolute_path))
|
203
203
|
install_path = ".\\#{self.modify_file_path(input, file).gsub(/\//,'\\')}"
|
@@ -295,7 +295,7 @@ class Wix
|
|
295
295
|
|
296
296
|
missing_files = []
|
297
297
|
files.each do |file|
|
298
|
-
if(File.
|
298
|
+
if(File.exist?(file))
|
299
299
|
install_path = file
|
300
300
|
if(input.has_key?(:modify_file_paths))
|
301
301
|
input[:modify_file_paths].each { |regex, replacement_string| install_path = install_path.gsub(regex, replacement_string) }
|
@@ -303,9 +303,9 @@ class Wix
|
|
303
303
|
raise "Invalid relative installation path: #{install_path}" if(install_path.include?(':'))
|
304
304
|
|
305
305
|
install_path = "#{directory}/#{install_path}"
|
306
|
-
FileUtils.mkpath(File.dirname(install_path)) unless(Dir.
|
306
|
+
FileUtils.mkpath(File.dirname(install_path)) unless(Dir.exist?(File.dirname(install_path)))
|
307
307
|
FileUtils.cp(file, install_path, preserve: true)
|
308
|
-
elsif(!File.
|
308
|
+
elsif(!File.exist?(file))
|
309
309
|
missing_files.insert(missing_files.length, file)
|
310
310
|
end
|
311
311
|
end
|
@@ -327,7 +327,7 @@ class Wix
|
|
327
327
|
files.reject! { |f| ingore_files.include?(f) }
|
328
328
|
|
329
329
|
files.each do |file|
|
330
|
-
if(File.
|
330
|
+
if(File.exist?(file))
|
331
331
|
install_path = file
|
332
332
|
if(input.has_key?(:modify_file_paths))
|
333
333
|
input[:modify_file_paths].each { |regex, replacement_string| install_path = install_path.gsub(regex, replacement_string) }
|
@@ -390,7 +390,7 @@ class Wix
|
|
390
390
|
def self.execute_heat(input, cmd_line_options)
|
391
391
|
wix_install_path=install_path.gsub(/\\/,'/');
|
392
392
|
wix_bin_dir = "#{wix_install_path}/bin"
|
393
|
-
wix_bin_dir = "#{wix_install_path}/tools" unless(Dir.
|
393
|
+
wix_bin_dir = "#{wix_install_path}/tools" unless(Dir.exist?(wix_bin_dir))
|
394
394
|
|
395
395
|
heat_cmd = Execute.new("\"#{wix_bin_dir}/heat.exe\" #{modify_heat_commandline(input, cmd_line_options)}", { quiet: true })
|
396
396
|
heat_cmd.execute
|
@@ -561,8 +561,8 @@ class Wix
|
|
561
561
|
|
562
562
|
wix_install_path=install_path.gsub(/\\/,'/');
|
563
563
|
wix_bin_dir = "#{wix_install_path}/bin"
|
564
|
-
wix_bin_dir = "#{wix_install_path}/tools" unless(Dir.
|
565
|
-
raise "Unable to locate candle.exe. Expecting to have a sub directory bin or tools in the wix installtion directory: #{wix_install_path}" unless(Dir.
|
564
|
+
wix_bin_dir = "#{wix_install_path}/tools" unless(Dir.exist?(wix_bin_dir))
|
565
|
+
raise "Unable to locate candle.exe. Expecting to have a sub directory bin or tools in the wix installtion directory: #{wix_install_path}" unless(Dir.exist?(wix_bin_dir))
|
566
566
|
|
567
567
|
ext_args = "-ext WixUtilExtension -ext WixNetfxExtension -ext WixUIExtension"
|
568
568
|
candle_cmd = Execute.new("\"#{wix_bin_dir}/candle.exe\" #{ext_args} -out \"#{wixobj_file}\" \"#{wxs_file}\"", { quiet: true })
|
@@ -590,11 +590,11 @@ class Wix
|
|
590
590
|
@debug = input[:debug] if(!@debug && input.has_key?(:debug))
|
591
591
|
start_logger if(@debug)
|
592
592
|
|
593
|
-
FileUtils.mkpath(File.dirname(output)) unless(Dir.
|
593
|
+
FileUtils.mkpath(File.dirname(output)) unless(Dir.exist?(File.dirname(output)))
|
594
594
|
|
595
595
|
ext = File.extname(output)
|
596
596
|
basename = File.basename(output, ext)
|
597
|
-
FileUtils.rm(output) if(File.
|
597
|
+
FileUtils.rm(output) if(File.exist?(output))
|
598
598
|
|
599
599
|
output_absolute_path = File.absolute_path(output)
|
600
600
|
input[:original_pwd] = Dir.pwd
|
@@ -615,13 +615,13 @@ class Wix
|
|
615
615
|
raise e
|
616
616
|
ensure
|
617
617
|
puts "debug path: #{output_absolute_path}" if(@debug)
|
618
|
-
FileUtils.cp("#{dir}/#{wxs_file}", "#{output_absolute_path}.wxs") if(File.
|
618
|
+
FileUtils.cp("#{dir}/#{wxs_file}", "#{output_absolute_path}.wxs") if(File.exist?("#{dir}/#{wxs_file}") && @debug)
|
619
619
|
File.open("#{output_absolute_path}.log", 'w') { |f| f.puts(@logger) } if(@debug &!@logger.nil?)
|
620
620
|
end
|
621
621
|
end
|
622
622
|
|
623
623
|
pdb_file = output_absolute_path.gsub(ext,'.wixpdb')
|
624
|
-
FileUtils.rm(pdb_file) if(File.
|
624
|
+
FileUtils.rm(pdb_file) if(File.exist?(pdb_file))
|
625
625
|
|
626
626
|
end_logger if(@debug)
|
627
627
|
end
|
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.112.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: 2023-
|
11
|
+
date: 2023-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execute
|
@@ -147,7 +147,7 @@ files:
|
|
147
147
|
- lib/wixgem.rb
|
148
148
|
homepage: http://rubygems.org/gems/wixgem
|
149
149
|
licenses:
|
150
|
-
-
|
150
|
+
- MIT
|
151
151
|
metadata: {}
|
152
152
|
post_install_message:
|
153
153
|
rdoc_options: []
|