7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/packaging/util/windows.rb', line 7
def add_msi_links(local_source_directory)
{
'windows' => ['x86', 'x64'],
'windowsfips' => ['x64']
}.each_pair do |platform, archs|
packages = Dir["#{local_source_directory}/#{platform}/*"]
archs.each do |arch|
package_version = Pkg::Util::Git.describe.tr('-', '.')
package_filename = File.join(
local_source_directory, platform,
"#{Pkg::Config.project}-#{package_version}-#{arch}.msi"
)
link_filename = File.join(
local_source_directory,
platform,
"#{Pkg::Config.project}-#{arch}.msi"
)
next unless !packages.include?(link_filename) && packages.include?(package_filename)
FileUtils.ln(package_filename, link_filename)
end
end
end
|