wixgem 0.90.0 → 0.93.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/example/example.msm +0 -0
- data/lib/shortcut.rb +24 -24
- data/lib/wixgem.rb +8 -8
- metadata +8 -10
- data/example/example.msi +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ddea153e8cc07cae015c0042909635ccd7038d9841effe63e50f96dab50e913a
|
4
|
+
data.tar.gz: bf0053b8b8eed64985cceb49c276a665c2c89ab73407bc296e04ff6c42d43235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47f45661aaac13b772197ad8106fdf4117e0d610deda357b4f3803c31eb55aafa266f1d8bef8501e7e43ad325e0cb43ee74fe65b6f9f0d3d2bec59d22ee28aa9
|
7
|
+
data.tar.gz: f0a71b27bd0e182c492c5d3c92febae5b04803cb7862623b4719b1f8fc049f06689f970d06d5ba8948488703e0446ba64dfa4ac50fadd930548249d098676e49
|
data/example/example.msm
CHANGED
Binary file
|
data/lib/shortcut.rb
CHANGED
@@ -7,50 +7,50 @@ class Shortcut
|
|
7
7
|
|
8
8
|
def initialize(file, hash)
|
9
9
|
@file = file
|
10
|
-
|
10
|
+
@hash = hash
|
11
11
|
end
|
12
12
|
|
13
13
|
def create(xml_doc)
|
14
|
-
|
14
|
+
raise "Shortcut #{@file} does not exist" unless(File.exists?(@file))
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
file_elements = REXML::XPath.match(xml_doc, "//File[@Source='.\\#{@file.gsub(/\//,'\\')}']")
|
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)
|
18
|
+
create_shortcut_element(file_elements[0])
|
19
|
+
create_directory(xml_doc, @hash[:directory]) if(@hash.has_key?(:directory))
|
20
20
|
|
21
|
-
|
21
|
+
return xml_doc
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
25
25
|
def create_shortcut_element(file_element)
|
26
26
|
shortcut_element = file_element.add_element 'Shortcut'
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
shortcut_element.attributes['Id'] = "Shortcut_#{SecureRandom.uuid.gsub(/-/,'')}"
|
29
|
+
shortcut_element.attributes['Arguments'] = @hash[:arguments] if(@hash.has_key?(:arguments))
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
shortcut_name = File.basename(@file)
|
32
|
+
if(@hash.has_key?(:name))
|
33
|
+
shortcut_name = @hash[:name]
|
34
|
+
else
|
35
|
+
@hash[:name] = shortcut_name
|
36
|
+
end
|
37
|
+
shortcut_element.attributes['Name'] = shortcut_name
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
shortcut_element.attributes['Description'] = @hash[:description] if(@hash.has_key?(:description))
|
40
|
+
shortcut_element.attributes['Directory'] = 'DesktopFolder'
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
shortcut_element.attributes['Advertise']="yes"
|
43
|
+
shortcut_element.attributes['Advertise'] = "no" if(@hash.has_key?(:advertise) && !@hash[:advertise])
|
44
|
+
create_icon_element(shortcut_element) if(@hash.has_key?(:icon))
|
45
45
|
|
46
|
-
|
46
|
+
return shortcut_element
|
47
47
|
end
|
48
48
|
|
49
49
|
def create_icon_element(shortcut_element)
|
50
50
|
icon_element = shortcut_element.add_element 'Icon'
|
51
|
-
|
51
|
+
icon_element.attributes['Id'] = File.basename(@hash[:icon])
|
52
52
|
icon_element.attributes['SourceFile'] = ".\\#{@hash[:icon].gsub(/\//, '\\')}"
|
53
|
-
|
53
|
+
return icon_element
|
54
54
|
end
|
55
55
|
|
56
56
|
def create_directory(xml_doc, directory)
|
data/lib/wixgem.rb
CHANGED
@@ -200,19 +200,19 @@ class Wix
|
|
200
200
|
end
|
201
201
|
|
202
202
|
def self.manage_shortcuts(xml_doc,input)
|
203
|
-
|
203
|
+
return xml_doc unless(input.has_key?(:shortcuts))
|
204
204
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
205
|
+
input[:shortcuts].each do |file, shortcut_hash|
|
206
|
+
shortcut = Shortcut.new(file, shortcut_hash)
|
207
|
+
xml_doc = shortcut.create(xml_doc)
|
208
|
+
end
|
209
209
|
|
210
|
-
|
210
|
+
return xml_doc
|
211
211
|
end
|
212
212
|
|
213
213
|
def self.manage_self_register(xml_doc, input)
|
214
|
-
|
215
|
-
|
214
|
+
return xml_doc unless(input.has_key?(:com_self_register))
|
215
|
+
input[:com_self_register].each do |file|
|
216
216
|
file_elements = REXML::XPath.match(xml_doc, "//File[@Source='.\\#{file.gsub(/\//,'\\')}']")
|
217
217
|
raise "Unable to find file '#{file}' for self registering" unless (file_elements.length == 1)
|
218
218
|
file_elements[0].attributes['SelfRegCost'] = '0'
|
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.93.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:
|
11
|
+
date: 2019-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execute
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.76
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.76
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.1.
|
89
|
+
version: 0.1.25
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.1.
|
96
|
+
version: 0.1.25
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: ocra
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,14 +110,13 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
description: Simple Ruby interface to facilitate creating and compiling windows installation
|
112
112
|
files with the Wix Toolset.
|
113
|
-
email:
|
113
|
+
email:
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- LICENSE
|
119
119
|
- README.md
|
120
|
-
- example/example.msi
|
121
120
|
- example/example.msm
|
122
121
|
- example/install_files/directory/file2.txt
|
123
122
|
- example/install_files/file1.txt
|
@@ -148,8 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
147
|
- !ruby/object:Gem::Version
|
149
148
|
version: '0'
|
150
149
|
requirements: []
|
151
|
-
|
152
|
-
rubygems_version: 2.4.5.1
|
150
|
+
rubygems_version: 3.0.1
|
153
151
|
signing_key:
|
154
152
|
specification_version: 4
|
155
153
|
summary: Simple Ruby interface to facilitate working with Wix Toolset
|
data/example/example.msi
DELETED
Binary file
|