wixgem 0.111.0 → 0.113.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
  SHA256:
3
- metadata.gz: acbf145ad790fe0b0faabf479d25e3837f65700d477e93a910d6efcd9f77e04d
4
- data.tar.gz: cbc834eebb2e65b249f157edf7ebe065548d3cbd26d0968b2bc0ca672e14494e
3
+ metadata.gz: 61691800908ea58cafe48e3d64dd94792c57313ece6b300aec171a9a3e99e2bc
4
+ data.tar.gz: 17927fee159af1eac9a74c0cde74251e671c99ddde31239e773393f3e9899826
5
5
  SHA512:
6
- metadata.gz: 69a025c6eef3598dbf2dba9f68265aa05c04f75af7f92c6af48929860781b9519e65b1bcad5d1824785428b3796a92fd8287f99be637758252234b9f984394e2
7
- data.tar.gz: c27dba3df585bc4b46de25be5dd988eeb07c3f73f18537ce40e65d84b30131550d80a1de9864272f29754b5a7336d0bbc746a4511cb0ef36efb43725cfd389f6
6
+ metadata.gz: 84b6754b8743ed00ff0fed0c25e2675d9c35b48746deb1b851732234646baa7961accce9a362610849fe89c6815079654be12c1cf673477c53616156d6efc023
7
+ data.tar.gz: 0eddcdf7dabaf88114d0ea472c96364dc56500e84827becccbef9e7ce87d3eb528660b39c14e65ed977aff531991ab8351221d62f100dff88b835125fefe4973
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.exists?(path))
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/registry_key.rb CHANGED
@@ -19,8 +19,8 @@ class RegistryKey
19
19
  raise 'Registry value must have name, value, and type elements'
20
20
  end
21
21
 
22
- registry_keys_component = REXML::XPath.match(@xml_doc, "//Component[@Id='RegistryKeys']")
23
- if(registry_keys_component.size == 0)
22
+ #registry_keys_component = REXML::XPath.match(@xml_doc, "//Component[@Id='RegistryKeys']")
23
+ #if(registry_keys_component.size == 0)
24
24
  wix_element = REXML::XPath.match(@xml_doc, "/Wix")[0]
25
25
  fragment = wix_element.add_element 'Fragment'
26
26
  component_group = fragment.add_element 'ComponentGroup'
@@ -30,12 +30,13 @@ class RegistryKey
30
30
  component_ref = default_feature[0].add_element 'ComponentGroupRef', 'Id' => component_group.attributes['Id']
31
31
 
32
32
  component = component_group.add_element 'Component'
33
- component.attributes['Id'] = 'RegistryKeys'
33
+ component.attributes['Id'] = "RegistryKey_#{SecureRandom.uuid.gsub(/-/,'')}"
34
34
  component.attributes['Directory'] = 'INSTALLDIR'
35
- else
36
- puts "component: #{registry_keys_component.to_s}"
37
- end
38
-
35
+ #else
36
+ #puts "component: #{registry_keys_component.to_s}"
37
+ # component = registry_keys_component[0]
38
+ #end
39
+
39
40
  registry_key_element = component.add_element 'RegistryKey', { 'Root' => registry_key[:root], 'Key' => registry_key[:key] }
40
41
  value_element = registry_key_element.add_element 'RegistryValue', { 'Action' => 'write', 'Name' => key_value[:name], 'Value' => key_value[:value], 'Type' => key_value[:type] }
41
42
  end
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.exists?(service_exe))
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.exists?(@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.exists?(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.exists?(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.exists?(File.dirname(install_path)))
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.exists?(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.exists?(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.exists?(wix_bin_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.exists?(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.exists?(wix_bin_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.exists?(File.dirname(output)))
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.exists?(output))
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.exists?("#{dir}/#{wxs_file}") && @debug)
619
- File.open("#{output_absolute_path}.log", 'w') { |f| f.puts(@logger) } if(@debug &!@logger.nil?)
618
+ FileUtils.cp("#{dir}/#{wxs_file}", "#{output_absolute_path}.wxs") if(File.exist?("#{dir}/#{wxs_file}") && @debug)
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.exists?(pdb_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.111.0
4
+ version: 0.113.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-04-13 00:00:00.000000000 Z
11
+ date: 2024-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execute
@@ -131,8 +131,6 @@ extra_rdoc_files: []
131
131
  files:
132
132
  - LICENSE
133
133
  - README.md
134
- - example/example.msi
135
- - example/example.msm
136
134
  - example/install_files/directory/file2.txt
137
135
  - example/install_files/file1.txt
138
136
  - example/rakefile.rb
@@ -147,7 +145,7 @@ files:
147
145
  - lib/wixgem.rb
148
146
  homepage: http://rubygems.org/gems/wixgem
149
147
  licenses:
150
- - Apache 2.0
148
+ - MIT
151
149
  metadata: {}
152
150
  post_install_message:
153
151
  rdoc_options: []
@@ -164,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
162
  - !ruby/object:Gem::Version
165
163
  version: '0'
166
164
  requirements: []
167
- rubygems_version: 3.2.15
165
+ rubygems_version: 3.4.15
168
166
  signing_key:
169
167
  specification_version: 4
170
168
  summary: Simple Ruby interface to facilitate working with Wix Toolset
data/example/example.msi DELETED
Binary file
data/example/example.msm DELETED
Binary file