wixgem 0.0.15 → 0.1.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/README +30 -0
- data/lib/templates/Install.wxs +26 -0
- data/lib/templates/mergemodule.wxs +15 -0
- data/lib/wixgem.rb +113 -159
- metadata +60 -15
- data/README.md +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 963e15dc4a45496d28b0d1b5c49888f72c223032
|
4
|
+
data.tar.gz: a0d31bbbb16f4b0d6faceb41fef2a7cd51b53a4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eeb320697b2ffbee764276876548b40c8255255fda0c66b2cc57d163199dd826ea36ff2292e2d83d4cbff87bf05ea5480d88751d00ec27abd54717aa905c36b
|
7
|
+
data.tar.gz: 546368eee8259967974369523ed8ef36942cdee1d07cbbb03d44b1f276055b661e83b63bef68d7786170bee1284521ee27a80578942aadc73e02d32d0bc66d4e
|
data/README
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
=wixgem
|
2
|
+
Simple Ruby interface to facilitate creating and compiling windows installation files with the Wix Toolset.
|
3
|
+
|
4
|
+
==Installation
|
5
|
+
wixgem can be installed by the single command
|
6
|
+
gem install wixgem
|
7
|
+
|
8
|
+
==Usage
|
9
|
+
wixgem can be included in a ruby script with
|
10
|
+
require 'wixgem'
|
11
|
+
|
12
|
+
==License
|
13
|
+
Copyright 2013-2014 Kevin Marshall
|
14
|
+
|
15
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
16
|
+
you may not use this file except in compliance with the License.
|
17
|
+
You may obtain a copy of the License at
|
18
|
+
|
19
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
20
|
+
|
21
|
+
Unless required by applicable law or agreed to in writing, software
|
22
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
23
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
24
|
+
See the License for the specific language governing permissions and
|
25
|
+
limitations under the License.
|
26
|
+
|
27
|
+
===Simplest usage
|
28
|
+
|
29
|
+
==Reference
|
30
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
3
|
+
<Product Id="PRODUCT_CODE" Name="PRODUCT_NAME" Language="1033" Version="VERSION" Manufacturer="MANUFACTURER" UpgradeCode="UPGRADE_CODE">
|
4
|
+
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
|
5
|
+
|
6
|
+
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
7
|
+
<Media Id="1" Cabinet="WixgemTest.cab" EmbedCab="yes" />
|
8
|
+
|
9
|
+
<!-- Step 1: Define the directory structure -->
|
10
|
+
<Directory Id="TARGETDIR" Name="SourceDir">
|
11
|
+
<Directory Id="ProgramFilesFolder">
|
12
|
+
INSTALL_DIR
|
13
|
+
</Directory>
|
14
|
+
</Directory>
|
15
|
+
|
16
|
+
<!-- Step 2: Add files to installer package -->
|
17
|
+
<DirectoryRef Id="INSTALLFOLDER">
|
18
|
+
FILES
|
19
|
+
</DirectoryRef>
|
20
|
+
|
21
|
+
<!-- Step 3: Tell Wix to install the files-->
|
22
|
+
<Feature Id="ProductFeature" Title="PRODUCT_NAME Installation" Level="1">
|
23
|
+
COMPONENT_REFS
|
24
|
+
</Feature>
|
25
|
+
</Product>
|
26
|
+
</Wix>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
3
|
+
<Module Id="MODULE_NAME" Language="1033" Version="VERSION">
|
4
|
+
<Package Id="PRODUCT_CODE" InstallerVersion="200" Manufacturer="MANUFACTURER" />
|
5
|
+
COMPONENT_REFS
|
6
|
+
<Directory Id="TARGETDIR" Name="SourceDir">
|
7
|
+
<Directory Id="MergeRedirectFolder" />
|
8
|
+
</Directory>
|
9
|
+
</Module>
|
10
|
+
<Fragment>
|
11
|
+
<DirectoryRef Id="MergeRedirectFolder">
|
12
|
+
FILES
|
13
|
+
</DirectoryRef>
|
14
|
+
</Fragment>
|
15
|
+
</Wix>
|
data/lib/wixgem.rb
CHANGED
@@ -1,22 +1,17 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'SecureRandom'
|
3
|
-
require 'tmpdir.rb'
|
4
3
|
|
5
4
|
class Wix
|
6
|
-
def self.install_path=(
|
7
|
-
|
8
|
-
|
9
|
-
def self.install_path
|
10
|
-
return @install_path
|
5
|
+
def self.install_path=(value)
|
6
|
+
raise "WIX path '#{value}' does not exist" unless(Dir.exists?(value))
|
7
|
+
@install_path = value
|
11
8
|
end
|
12
9
|
|
13
|
-
def self.
|
14
|
-
@
|
15
|
-
|
16
|
-
def self.debug
|
17
|
-
return @debug
|
10
|
+
def self.install_path
|
11
|
+
@install_path = ENV['WIX'] if(@install_path.nil?)
|
12
|
+
return @install_path
|
18
13
|
end
|
19
|
-
|
14
|
+
|
20
15
|
def self.make_mergemodule(output, input)
|
21
16
|
gem_dir = File.dirname(__FILE__)
|
22
17
|
apply_wix_template(output, input, "#{gem_dir}/templates/mergemodule.wxs")
|
@@ -27,174 +22,133 @@ class Wix
|
|
27
22
|
apply_wix_template(output, input, "#{gem_dir}/templates/Install.wxs")
|
28
23
|
end
|
29
24
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
input[:remove_existing_products])
|
35
|
-
|
36
|
-
raise 'Hash must have a version key if the hash has a :remove_existing_products key' unless(input.has_key?(:version))
|
37
|
-
raise 'Hash must have an upgrade_code key if the hash has a :remove_existing_products key' unless(input.has_key?(:upgrade_code))
|
38
|
-
|
39
|
-
upgrade = "
|
40
|
-
<Upgrade Id=\"#{input[:upgrade_code]}\">
|
41
|
-
<UpgradeVersion Minimum=\"#{input[:version]}\"
|
42
|
-
OnlyDetect='yes'
|
43
|
-
Property='NEWPRODUCTFOUND' />
|
44
|
-
<UpgradeVersion Minimum='1.0.0'
|
45
|
-
IncludeMinimum='yes'
|
46
|
-
Maximum=\"#{input[:version]}\"
|
47
|
-
IncludeMaximum='no'
|
48
|
-
Property='UPGRADEFOUND' />
|
49
|
-
</Upgrade>
|
50
|
-
<CustomAction"
|
51
|
-
wxs_text = wxs_text.gsub(/<CustomAction/, upgrade)
|
25
|
+
def self.apply_wix_template(output, input, template)
|
26
|
+
ext = File.extname(output)
|
27
|
+
wix_basename = File.basename(output, ext)
|
28
|
+
Dir.glob("#{wix_basename}#{ext}") { |file| FileUtils.rm(file) }
|
52
29
|
|
53
|
-
|
54
|
-
</InstallExecuteSequence>"
|
55
|
-
wxs_text = wxs_text.gsub(/<\/InstallExecuteSequence>/, remove_existing_products)
|
56
|
-
end
|
57
|
-
|
58
|
-
return wxs_text
|
59
|
-
end
|
60
|
-
|
61
|
-
def self.manage_msm_files(wxs_text)
|
62
|
-
indent_merge = ' '
|
63
|
-
indent_directory = ' '
|
64
|
-
|
65
|
-
merge_ids = ''
|
66
|
-
merge_refs = ''
|
67
|
-
remove_components = []
|
68
|
-
|
69
|
-
component = 0
|
70
|
-
id = 1
|
71
|
-
file = 2
|
72
|
-
wxs_text.scan(/(?<component><Component Id=\"(?<id>[^\"]+)\".+Source=\"(?<file>.+\.msm)\".+Component>)/m) { |match|
|
73
|
-
merge_id = match[id].gsub('cmp','merge')
|
74
|
-
merge_ids = "#{merge_ids}#{indent_merge}<Merge Id='#{merge_id}' Language='1033' SourceFile='#{match[file]}' DiskId='1' />\n"
|
75
|
-
merge_refs = "#{indent_merge}#{merge_refs}<MergeRef Id='#{merge_id}' />\n#{indent_merge}"
|
30
|
+
wix_file = "#{wix_basename}.wxs"
|
76
31
|
|
77
|
-
|
78
|
-
}
|
79
|
-
|
80
|
-
remove_components.each { |cmp| wxs_text = wxs_text.gsub(cmp, '') }
|
81
|
-
|
82
|
-
directory_element = "<Directory Id='TARGETDIR' Name='SourceDir'>\n#{merge_ids}#{indent_directory}</Directory>"
|
83
|
-
wxs_text = wxs_text.gsub('<Directory Id="TARGETDIR" Name="SourceDir" />', directory_element)
|
84
|
-
|
85
|
-
wxs_text = wxs_text.gsub(/\s+<\/Feature>/, "\n#{merge_refs} </Feature>")
|
32
|
+
wxs_text = File.read(template)
|
86
33
|
|
87
|
-
return wxs_text
|
88
|
-
end
|
89
|
-
|
90
|
-
def self.copy_install_files(directory, input)
|
91
34
|
files = input
|
92
|
-
|
93
|
-
|
94
|
-
files.each do |file|
|
95
|
-
if(File.file?(file))
|
96
|
-
install_path = file
|
97
|
-
if(input.kind_of?(Hash) && input.has_key?(:modify_file_paths))
|
98
|
-
input[:modify_file_paths].each { |regex, replacement_string| install_path = install_path.gsub(regex, replacement_string) }
|
99
|
-
end
|
100
|
-
|
101
|
-
install_path = "#{directory}/#{install_path}"
|
102
|
-
FileUtils.mkpath(File.dirname(install_path)) unless(Dir.exists?(File.dirname(install_path)))
|
103
|
-
FileUtils.cp(file, install_path)
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
def self.create_wxs_file(wxs_file, input, ext)
|
109
|
-
@debug = input[:debug] if(input.kind_of?(Hash) && input.has_key?(:debug))
|
35
|
+
files = input[:files] if(input.kind_of?(Hash))
|
110
36
|
|
111
|
-
|
112
|
-
template_option = "-template module" unless(ext == ".msi")
|
113
|
-
|
114
|
-
stdout = %x[\"#{install_path}/bin/heat.exe\" dir . #{template_option} -cg InstallionFiles -gg -nologo -srd -o \"#{wxs_file}\"]
|
115
|
-
raise "#{stdout}\nFailed to generate .wxs file" unless(File.exists?(wxs_file))
|
116
|
-
|
117
|
-
product_name = File.basename(wxs_file, '.wxs')
|
118
|
-
product_name = input[:product_name] if(input.kind_of?(Hash) && input.has_key?(:product_name))
|
119
|
-
|
120
|
-
manufacturer = 'Not Set'
|
121
|
-
manufacturer = input[:manufacturer] if(input.kind_of?(Hash) && input.has_key?(:manufacturer))
|
37
|
+
wxs_text = manage_files(wxs_text, files)
|
122
38
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
product_code =
|
39
|
+
wxs_text = wxs_text.gsub(/PRODUCT_NAME/) { |s| s = wix_basename }
|
40
|
+
wxs_text = wxs_text.gsub(/MODULE_NAME/) { |s| s = wix_basename }
|
41
|
+
|
42
|
+
product_code = "{#{SecureRandom.uuid}}"
|
127
43
|
product_code = input[:product_code] if(input.kind_of?(Hash) && input.has_key?(:product_code))
|
44
|
+
wxs_text = wxs_text.gsub(/PRODUCT_CODE/) { |s| s = product_code }
|
128
45
|
|
129
|
-
upgrade_code =
|
46
|
+
upgrade_code = "{#{SecureRandom.uuid}}"
|
130
47
|
upgrade_code = input[:upgrade_code] if(input.kind_of?(Hash) && input.has_key?(:upgrade_code))
|
48
|
+
wxs_text = wxs_text.gsub(/UPGRADE_CODE/) { |s| s = upgrade_code }
|
131
49
|
|
132
|
-
|
133
|
-
|
134
|
-
wxs_text = wxs_text.gsub(/
|
135
|
-
wxs_text = wxs_text.gsub(/PUT-PRODUCT-NAME-HERE/) { |s| s = product_name }
|
136
|
-
wxs_text = wxs_text.gsub(/PUT-MODULE-NAME-HERE/) { |s| s = product_name }
|
137
|
-
wxs_text = wxs_text.gsub(/PUT-COMPANY-NAME-HERE/) { |s| s = manufacturer }
|
138
|
-
wxs_text = wxs_text.gsub(/PUT-FEATURE-TITLE-HERE/) { |s| s = 'Files to Install' }
|
139
|
-
|
140
|
-
wxs_text = wxs_text.gsub(/Version=\"1.0.0.0\"/) { |s| s = "Version=\"#{product_version}\"" } unless(product_version.empty?)
|
141
|
-
wxs_text = wxs_text.gsub(/Product Id=\"[^\"]+\"/) { |s| s = "Product Id=\"#{product_code}\"" } unless(product_code.empty?)
|
142
|
-
wxs_text = wxs_text.gsub(/UpgradeCode=\"[^\"]+\"/) { |s| s = "UpgradeCode=\"#{upgrade_code}\"" } unless(upgrade_code.empty?)
|
50
|
+
product_version = '0.0.0.0'
|
51
|
+
product_version = input[:version] if(input.kind_of?(Hash) && input.has_key?(:version))
|
52
|
+
wxs_text = wxs_text.gsub(/VERSION/) { |s| s = product_version }
|
143
53
|
|
144
|
-
|
145
|
-
|
54
|
+
manufacturer = ''
|
55
|
+
manufacturer = input[:manufacturer] if(input.kind_of?(Hash) && input.has_key?(:manufacturer))
|
56
|
+
dir_xml = "<Directory Id=\"INSTALLFOLDER\" Name=\"#{wix_basename}\" />"
|
57
|
+
dir_xml = "<Directory Id=\"MUSCOFOLDER\" Name=\"#{manufacturer}\">#{dir_xml}</Directory>" if(manufacturer.length > 0)
|
58
|
+
wxs_text = wxs_text.gsub(/MANUFACTURER/) { |s| s = manufacturer } unless(manufacturer.empty?)
|
59
|
+
wxs_text = wxs_text.gsub(/INSTALL_DIR/) { |s| s = dir_xml }
|
146
60
|
|
147
|
-
|
148
|
-
|
61
|
+
#puts wxs_text
|
62
|
+
File.open(wix_file, 'w') { |f| f.puts(wxs_text) }
|
149
63
|
|
150
|
-
|
151
|
-
<!-- Set TARGETDIR if it wasn't set on the command line -->
|
152
|
-
<Custom Action='SetTARGETDIR' Before='CostFinalize'>TARGETDIR=\"\"</Custom>
|
153
|
-
</InstallUISequence>
|
64
|
+
raise 'WIX path is not set!' if(install_path.nil?)
|
154
65
|
|
155
|
-
|
156
|
-
|
157
|
-
<Custom Action='SetTARGETDIR' Before='CostFinalize'>TARGETDIR=\"\"</Custom>
|
158
|
-
</InstallExecuteSequence>
|
159
|
-
</Product>"
|
160
|
-
wxs_text = wxs_text.gsub(/<\/Product>/) { |s| s = custom_action }
|
66
|
+
stdout = %x[\"#{install_path}\\bin\\candle.exe\" #{wix_file}]
|
67
|
+
raise "#{stdout}\nFailed to generate .wixobj file" unless(File.exists?("#{wix_basename}.wixobj"))
|
161
68
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
File.
|
69
|
+
stdout = %x[\"#{install_path}\\bin\\light.exe\" -nologo -out #{output} #{wix_basename}.wixobj]
|
70
|
+
raise "#{stdout}\nFailed to generate #{output} file" unless(File.exists?(output))
|
71
|
+
|
72
|
+
Dir.glob("#{File.dirname(output)}/#{wix_basename}.{wxs,wixobj,wixpdb}") { |file| FileUtils.rm(file) }
|
166
73
|
end
|
167
74
|
|
168
|
-
def self.
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
75
|
+
def self.wix_id(file)
|
76
|
+
id="id_#{file}"
|
77
|
+
id=id.gsub(/[ -\.\\\/]/) { |s| s = '_' }
|
78
|
+
return id
|
79
|
+
end
|
80
|
+
|
81
|
+
def self.files_to_xml(files)
|
82
|
+
xml = ''
|
83
|
+
files.each do |file|
|
84
|
+
if(File.extname(file) == ".msm")
|
85
|
+
file_xml = "<Merge Id=\"#{wix_id(file)}\" Language=\"1033\" SourceFile=\"#{file}\" DiskId='1' />"
|
86
|
+
else
|
87
|
+
file_xml = "<Component Id=\"#{wix_id(file)}\" Guid=\"{#{SecureRandom.uuid}}\"><File Id=\"#{wix_id(file)}\" Source=\"#{file}\" /></Component>\n"
|
88
|
+
end
|
89
|
+
xml = "#{xml}#{file_xml}"
|
90
|
+
end
|
91
|
+
return xml
|
176
92
|
end
|
177
93
|
|
178
|
-
def self.
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
94
|
+
def self.files_xml(dir_files_hash)
|
95
|
+
xml = ''
|
96
|
+
dir_files_hash.each do |directory, value|
|
97
|
+
if(value.is_a?(Hash))
|
98
|
+
xml = "#{xml}<Directory Id=\"#{wix_id(value[:full_path])}\" Name=\"#{directory}\">\n" unless(directory == '.')
|
99
|
+
xml = "#{xml}#{files_to_xml(value[:files])}" if(value.has_key?(:files))
|
100
|
+
xml = "#{xml}#{files_xml(value)}"
|
101
|
+
xml = "#{xml}</Directory>\n" unless(directory == '.')
|
102
|
+
end
|
103
|
+
end
|
104
|
+
return xml
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.component_refs_xml(dir_files_hash)
|
108
|
+
xml = ''
|
109
|
+
dir_files_hash.each do |directory, value|
|
110
|
+
if(value.is_a?(Hash))
|
111
|
+
if(value.has_key?(:files))
|
112
|
+
value[:files].each do |file|
|
113
|
+
if(File.extname(file) == ".msm")
|
114
|
+
xml = "#{xml}<MergeRef Id=\"#{wix_id(file)}\" />\n"
|
115
|
+
else
|
116
|
+
xml = "#{xml}<ComponentRef Id=\"#{wix_id(file)}\" />\n"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
xml = "#{xml}#{component_refs_xml(value)}"
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
return xml
|
125
|
+
end
|
186
126
|
|
187
|
-
|
188
|
-
|
127
|
+
def self.manage_files(wxs_text, files)
|
128
|
+
dir_files = {}
|
129
|
+
files.each do |file|
|
130
|
+
if(File.file?(file))
|
131
|
+
dir_path = File.dirname(file)
|
132
|
+
dir_hash = dir_files
|
133
|
+
dir_path.split('/').each do |d|
|
134
|
+
if(!dir_hash.has_key?(d))
|
135
|
+
dir_hash[d] = Hash.new unless(dir_hash.has_key?(d))
|
136
|
+
if(dir_hash.has_key?(:full_path))
|
137
|
+
dir_hash[d][:full_path] = "#{dir_hash[:full_path]}/#{d}"
|
138
|
+
else
|
139
|
+
dir_hash[d][:full_path] = d
|
140
|
+
end
|
141
|
+
end
|
142
|
+
dir_hash = dir_hash[d]
|
143
|
+
end
|
189
144
|
|
190
|
-
|
191
|
-
|
192
|
-
create_wxs_file(wxs_file, input, ext)
|
193
|
-
create_output(wxs_file, output_absolute_path)
|
145
|
+
dir_hash[:files] = Array.new unless(dir_hash.has_key?(:files))
|
146
|
+
dir_hash[:files].insert(dir_hash[:files].length, file)
|
194
147
|
end
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
148
|
+
end
|
149
|
+
|
150
|
+
wxs_text = wxs_text.gsub(/COMPONENT_REFS/) { |s| s = component_refs_xml(dir_files) }
|
151
|
+
wxs_text = wxs_text.gsub(/FILES/) { |s| s = files_xml(dir_files) }
|
152
|
+
return wxs_text
|
199
153
|
end
|
200
154
|
end
|
metadata
CHANGED
@@ -1,71 +1,115 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wixgem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.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: 2014-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: semver
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.0
|
20
|
+
- - '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.0.1
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.1.0
|
30
|
+
- - '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.1
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: bundler
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
16
36
|
requirements:
|
17
37
|
- - ~>
|
18
38
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
39
|
+
version: 0.1.0
|
40
|
+
- - '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.5.1
|
20
43
|
type: :development
|
21
44
|
prerelease: false
|
22
45
|
version_requirements: !ruby/object:Gem::Requirement
|
23
46
|
requirements:
|
24
47
|
- - ~>
|
25
48
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
49
|
+
version: 0.1.0
|
50
|
+
- - '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.5.1
|
27
53
|
- !ruby/object:Gem::Dependency
|
28
54
|
name: rake
|
29
55
|
requirement: !ruby/object:Gem::Requirement
|
30
56
|
requirements:
|
31
57
|
- - ~>
|
32
58
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
59
|
+
version: 0.1.0
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.9.6
|
34
63
|
type: :development
|
35
64
|
prerelease: false
|
36
65
|
version_requirements: !ruby/object:Gem::Requirement
|
37
66
|
requirements:
|
38
67
|
- - ~>
|
39
68
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
69
|
+
version: 0.1.0
|
70
|
+
- - '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.9.6
|
41
73
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
74
|
+
name: dev
|
43
75
|
requirement: !ruby/object:Gem::Requirement
|
44
76
|
requirements:
|
45
77
|
- - ~>
|
46
78
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
79
|
+
version: 0.1.0
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.0.214
|
48
83
|
type: :development
|
49
84
|
prerelease: false
|
50
85
|
version_requirements: !ruby/object:Gem::Requirement
|
51
86
|
requirements:
|
52
87
|
- - ~>
|
53
88
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
89
|
+
version: 0.1.0
|
90
|
+
- - '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 1.0.214
|
55
93
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
94
|
+
name: systemu
|
57
95
|
requirement: !ruby/object:Gem::Requirement
|
58
96
|
requirements:
|
59
97
|
- - ~>
|
60
98
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
99
|
+
version: 0.1.0
|
100
|
+
- - '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 2.5.2
|
62
103
|
type: :development
|
63
104
|
prerelease: false
|
64
105
|
version_requirements: !ruby/object:Gem::Requirement
|
65
106
|
requirements:
|
66
107
|
- - ~>
|
67
108
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
109
|
+
version: 0.1.0
|
110
|
+
- - '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 2.5.2
|
69
113
|
description: 'Simple Ruby interface to facilitate creating and compiling windows installation
|
70
114
|
files with the Wix Toolset.\n\nNote: This gem currently does not handle registration
|
71
115
|
of COM objects or registry entries.'
|
@@ -75,7 +119,9 @@ extensions: []
|
|
75
119
|
extra_rdoc_files: []
|
76
120
|
files:
|
77
121
|
- LICENSE
|
78
|
-
- README
|
122
|
+
- README
|
123
|
+
- lib/templates/Install.wxs
|
124
|
+
- lib/templates/mergemodule.wxs
|
79
125
|
- lib/wixgem.rb
|
80
126
|
homepage: http://rubygems.org/gems/wixgem
|
81
127
|
licenses:
|
@@ -89,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
135
|
requirements:
|
90
136
|
- - '>='
|
91
137
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
138
|
+
version: 2.0.0
|
93
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
140
|
requirements:
|
95
141
|
- - '>='
|
@@ -102,4 +148,3 @@ signing_key:
|
|
102
148
|
specification_version: 4
|
103
149
|
summary: Simple Ruby interface to facilitate working with Wix Toolset
|
104
150
|
test_files: []
|
105
|
-
has_rdoc:
|
data/README.md
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
# wixgem
|
2
|
-
Simple Ruby interface to facilitate creating and compiling simple windows installation files
|
3
|
-
with the Wix Toolset.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
wixgem can be installed by the single command
|
7
|
-
gem install wixgem
|
8
|
-
|
9
|
-
## Usage
|
10
|
-
The wix toolset must be installed.
|
11
|
-
|
12
|
-
## Simple usage
|
13
|
-
|
14
|
-
``
|
15
|
-
require 'wixgem'
|
16
|
-
|
17
|
-
WIX_TOOLSET_ROOT='path to root of Wix toolset'
|
18
|
-
Wix.install_path = WIX_TOOLSET_ROOT
|
19
|
-
|
20
|
-
# Installation example
|
21
|
-
Wix.make_installation('wixgem_install_test1.msi', ['rakefile.rb']])
|
22
|
-
|
23
|
-
# Mergemodule example
|
24
|
-
Wix.make_mergemodule('wixgem_install_test1.msi', ['rakefile.rb']])
|
25
|
-
```
|
26
|
-
|
27
|
-
|
28
|
-
In a rakefile define an installation task:
|
29
|
-
|
30
|
-
```
|
31
|
-
require 'wixgem'
|
32
|
-
|
33
|
-
WIX_TOOLSET_ROOT='path to root of Wix toolset'
|
34
|
-
|
35
|
-
task :create_installation_files do
|
36
|
-
FileUtils.mkpath('./install_files/directory')
|
37
|
-
sleep(1)
|
38
|
-
File.open('./install_files/file1.txt', 'w') { |f| f.write('Hello World') }
|
39
|
-
File.open('./install_files/directory/file2.txt', 'w') { |f| f.write('Hello World') }
|
40
|
-
end
|
41
|
-
|
42
|
-
desc "Generate an installation msi file"
|
43
|
-
task :installation => [:create_installation_files] do
|
44
|
-
Wix.install_path = WIX_TOOLSET_ROOT
|
45
|
-
|
46
|
-
installation_files = Dir.glob('./install_files/**/*')
|
47
|
-
Wix.make_installation("./example.msi",
|
48
|
-
{
|
49
|
-
manufacturer: 'Company', version: "1.0.0",
|
50
|
-
product_code: '{69d12c6c-63be-43e4-92ff-e31ec3c86dc0}',
|
51
|
-
upgrade_code: '{a62c35a7-6a6d-4392-822b-f6aca7eef88b}',
|
52
|
-
files: installation_files
|
53
|
-
}
|
54
|
-
)
|
55
|
-
end
|
56
|
-
|
57
|
-
task :mergemodule => [:create_installation_files] do
|
58
|
-
installation_files = Dir.glob('./install_files/**/*')
|
59
|
-
|
60
|
-
Wix.install_path = WIX_TOOLSET_ROOT
|
61
|
-
Wix.make_mergemodule('./example.msm', installation_files)
|
62
|
-
end
|
63
|
-
|
64
|
-
task :default => [:installation]
|
65
|
-
```
|
66
|
-
|
67
|
-
## License
|
68
|
-
Copyright 2013-2014 Kevin Marshall
|
69
|
-
|
70
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
71
|
-
you may not use this file except in compliance with the License.
|
72
|
-
You may obtain a copy of the License at
|
73
|
-
|
74
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
75
|
-
|
76
|
-
Unless required by applicable law or agreed to in writing, software
|
77
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
78
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
79
|
-
See the License for the specific language governing permissions and
|
80
|
-
limitations under the License.
|
81
|
-
|