wixgem 0.26.0 → 0.27.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6213215965dd51d55d60f45edfe01f68508c189
4
- data.tar.gz: dbb87b119d337ff8e771aa253cdf3f44fe66ac70
3
+ metadata.gz: 8f3a4489747c42dbd44afc6cbe25742033492124
4
+ data.tar.gz: d7d530793e42c36ccce9e407a0314acdd55c7829
5
5
  SHA512:
6
- metadata.gz: 1414da1543689ca0af807997460592600ac662d2e6f090dfe36eb331b95213187f169848ba199c5bbd33f7ecb3a3e59cb7fc42ec4caf22f313b1cff96a25288b
7
- data.tar.gz: 4faab46486457fc3064d6154c1879e2eef74a35a9a6aa5785ef188358859f8cab3138c527dc646f4e1f1bc179c5783f308b182dccb6db24eddbb9bd9bf97f8f6
6
+ metadata.gz: a2542ec6030624a69eece1e7d9a0e921ea90319098ea7b0e8dc2d35c4f235a8a16337da915a4b418d57041686aebab08061ce3cbbab50a1274d424d408afae16
7
+ data.tar.gz: 227d20f4c5597854ea68e6b87ecfcfb8f7c40e2fe25c04bbafa2e7fd6a0686ad71019f362b37ba4c3ea52479fa7759c6f7e6a47e3d9390525cb891bf878588e5
data/lib/wixgem.rb CHANGED
@@ -153,7 +153,7 @@ class Wix
153
153
 
154
154
  wix_cmd = "\"#{install_path}/bin/heat.exe\" dir . #{template_option} -cg InstallionFiles -gg -nologo -srd -o \"#{wxs_file}\""
155
155
  wix_cmd = wix_cmd.gsub(/-srd/, '-svb6 -srd') if(input.kind_of?(Hash) && input.has_key?(:has_vb6_files))
156
- File.open("#{File.basename(wxs_file,'.wxs')}.wix_cmds", 'w') { |f| f.puts wix_cmd } if(@debug)
156
+ File.open("#{File.basename(wxs_file,'.wxs')}.wix_cmds.txt", 'w') { |f| f.puts wix_cmd } if(@debug)
157
157
 
158
158
  stdout = %x[#{wix_cmd}]
159
159
  raise "#{stdout}\nFailed to generate .wxs file" unless(File.exists?(wxs_file))
@@ -202,12 +202,12 @@ class Wix
202
202
  wixobj_file = "#{File.basename(wxs_file,'.wxs')}.wixobj"
203
203
 
204
204
  wix_cmd = "\"#{install_path}\\bin\\candle.exe\" -out \"#{wixobj_file}\" \"#{wxs_file}\""
205
- File.open("#{File.basename(wxs_file,'.wxs')}.wix_cmds", 'a') { |f| f.puts wix_cmd } if(@debug)
205
+ File.open("#{File.basename(wxs_file,'.wxs')}.wix_cmds.txt", 'a') { |f| f.puts wix_cmd } if(@debug)
206
206
  stdout = %x[#{wix_cmd}]
207
207
  raise "#{stdout}\nFailed to generate .wixobj file" unless(File.exists?(wixobj_file))
208
208
 
209
209
  wix_cmd = "\"#{install_path}\\bin\\light.exe\" -nologo -out \"#{output}\" \"#{wixobj_file}\""
210
- File.open("#{File.basename(wxs_file,'.wxs')}.wix_cmds", 'a') { |f| f.puts wix_cmd } if(@debug)
210
+ File.open("#{File.basename(wxs_file,'.wxs')}.wix_cmds.txt", 'a') { |f| f.puts wix_cmd } if(@debug)
211
211
  stdout = %x[#{wix_cmd}]
212
212
  raise "#{stdout}\nFailed to generate #{output} file" unless(File.exists?(output))
213
213
  end
@@ -234,14 +234,14 @@ class Wix
234
234
  create_output(wxs_file, output_absolute_path)
235
235
  ensure
236
236
  if(@debug)
237
- FileUtils.cp("#{wxs_file}", "#{output_absolute_path}.wxs") if(File.exists?(wxs_file))
238
- wix_cmds_file = "#{File.basename(wxs_file,'.wxs')}.wix_cmds"
239
- FileUtils.cp(wix_cmds_file, "#{File.dirname(output_absolute_path)}/#{wix_cmds_file}") if(File.exists?(wix_cmds_file))
237
+ FileUtils.cp(wxs_file, "#{output_absolute_path}.wxs") if(File.exists?(wxs_file))
238
+ wix_cmds_file = "#{File.basename(wxs_file,'.wxs')}.wix_cmds.txt"
239
+ FileUtils.cp(wix_cmds_file, "#{output_absolute_path}.wix_cmds.txt") if(File.exists?(wix_cmds_file))
240
240
  end
241
241
  end
242
242
  end
243
243
 
244
- FileUtils.mv('installation_files.txt', "#{File.dirname(output_absolute_path)}/#{File.basename(wxs_file,'.wxs')}_paths.txt") if(File.exists?('installation_files.txt'))
244
+ FileUtils.mv('installation_files.txt', "#{output_absolute_path}_paths.txt") if(File.exists?('installation_files.txt'))
245
245
  end
246
246
  pdb_file = output_absolute_path.gsub(ext,'.wixpdb')
247
247
  FileUtils.rm(pdb_file) if(File.exists?(pdb_file))
@@ -49,10 +49,10 @@ describe 'Wixgem' do
49
49
  }
50
50
  end
51
51
 
52
- describe 'includding vb6 files' do
52
+ describe 'including vb6 files' do
53
53
  it "the wix's heat command should contain the -svb6 flag" do
54
54
  Wix.make_installation('test/wixgem_install_vb6_files.msi', {manufacturer: 'musco', has_vb6_files: true, files: ['rakefile.rb'], debug: true})
55
- wix_cmd_text = File.read('test/wixgem_install_vb6_files.wix_cmds')
55
+ wix_cmd_text = File.read('test/wixgem_install_vb6_files.msi.wix_cmds.txt')
56
56
  expect(wix_cmd_text.include?('-svb6')).to eq(true)
57
57
  end
58
58
  end
@@ -13,7 +13,8 @@ describe 'Wixgem' do
13
13
  test1: ['test/wixgem_merge_test1.msm', ['rakefile.rb']],
14
14
  test2: ['test/wixgem_merge_test2.msm', {files: ['Gemfile']}],
15
15
  test3: ['test/wixgem_merge_test3.msm', ['rakefile.rb', 'Gemfile']],
16
- test4: ['test/wixgem_merge_test4.msm', Dir.glob("test_files/**/*")]
16
+ test4: ['test/wixgem_merge_test4.msm', Dir.glob("test_files/**/*")],
17
+ test5: ['test/wixgem_merge_test5.msm', {debug: true, files: Dir.glob("test_files/**/*")}]
17
18
  }
18
19
 
19
20
  test_arguments.each { |key, value|
@@ -32,6 +33,14 @@ describe 'Wixgem' do
32
33
  it "should install and uninstall: #{install_file}" do
33
34
  test_install(key, install_file, value[1])
34
35
  end
36
+
37
+ it "should produce the debug files" do
38
+ if(key == :test5)
39
+ expect(File.exists?("#{value[0]}.wxs")).to be(true)
40
+ expect(File.exists?("#{value[0]}.wix_cmds.txt")).to be(true)
41
+ expect(File.exists?("#{value[0]}_paths.txt")).to be(true)
42
+ end
43
+ end
35
44
  }
36
45
  end
37
46
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wixgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Marshall