Skip to content

Commit

Permalink
Added ability to select different (older) versions of the vcruntime.
Browse files Browse the repository at this point in the history
Thanks to @jmauro.

Also, general cleanup and move top-level attributes to 'vcruntime'.
  • Loading branch information
Julian C. Dunn committed May 22, 2014
1 parent a6dbc25 commit ae58015
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 99 deletions.
5 changes: 0 additions & 5 deletions .gitreview

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file is used to list changes made in each version of vcruntime.

## 0.2.0:

* Refactor to allow the installation of older versions of the Visual C++ Runtime.
* Normalize top-level attribute namespace to 'vcruntime'

## 0.1.6:

* Added VS 2012 Runtime
Expand Down
60 changes: 12 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Microsoft Visual C++ Runtime Cookbook
=====================================

Installs Microsoft Visual C++ runtime version 9,10 or 12 on Windows.
Installs Microsoft Visual C++ runtime version 9, 10 or 12 on Windows.

Requirements
------------
Expand All @@ -19,61 +19,24 @@ Requirements
Attributes
----------

#### vcruntime::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['vc9']['x86']['tools']['pkg']['windows']['url']</tt></td>
<td>String</td>
<td>VC9 x86 source</td>
<td><tt>http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe</tt></td>
</tr>
<tr>
<td><tt>['vc10']['x86']['tools']['pkg']['windows']['url']</tt></td>
<td>String</td>
<td>VC10 x86 source</td>
<td><tt>http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe</tt></td>
</tr>
<tr>
<td><tt>['vc12']['x86']['tools']['pkg']['windows']['url']</tt></td>
<td>String</td>
<td>VC12 x86 source</td>
<td><tt>http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe</tt></td>
</tr>
<tr>
<td><tt>['vc9']['x64']['tools']['pkg']['windows']['url']</tt></td>
<td>String</td>
<td>VC9 x64 source</td>
<td><tt>http://download.microsoft.com/download/2/d/6/2d61c766-107b-409d-8fba-c39e61ca08e8/vcredist_x64.exe</tt></td>
</tr>
<tr>
<td><tt>['vc10']['x64']['tools']['pkg']['windows']['url']</tt></td>
<td>String</td>
<td>VC10 x64 source</td>
<td><tt>http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe</tt></td>
</tr>
<tr>
<td><tt>['vc12']['x64']['tools']['pkg']['windows']['url']</tt></td>
<td>String</td>
<td>VC12 x64 source</td>
<td><tt>http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe</tt></td>
</tr>
</table>
There are individual attributes within the attributes files for the URL, checksum and package name of each Visual C++ runtime major and minor version.

If you wish to install anything except the latest packages, you may set one of

* ```node['vcruntime']['vc9']['version']```
* ```node['vcruntime']['vc10']['version']```
* ```node['vcruntime']['vc12']['version']```

to the appropriate version.

Usage
-----
#### vcruntime::vc9, vcruntime::vc10 or vcruntime::vc12

Just include `vcruntime::vc9`, `vcruntime::vc10`, or vcruntime::vc12 in your node's `run_list`:

```json
{
"name":"my_node",
"name": "my_node",
"run_list": [
"recipe[vcruntime::vc9]"
]
Expand All @@ -85,6 +48,7 @@ License and Authors

* Author:: Yvo Van Doorn (<yvo@getchef.com>)
* Author:: Dan Robinson (<drobinson@getchef.com>)
* Author:: Julian Dunn (<jdunn@getchef.com>)

* Copyright (C) 2013 Opscode, Inc.
* Copyright (C) 2014 Chef Software, Inc.
Expand Down
31 changes: 18 additions & 13 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Defines the three VCs

default['vc9']['x86']['tools']['pkg']['windows']['url'] = 'http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe'
default['vc10']['x86']['tools']['pkg']['windows']['url'] = 'http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe'
default['vc12']['x86']['tools']['pkg']['windows']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe'

default['vc9']['x64']['tools']['pkg']['windows']['url'] = 'http://download.microsoft.com/download/2/d/6/2d61c766-107b-409d-8fba-c39e61ca08e8/vcredist_x64.exe'
default['vc10']['x64']['tools']['pkg']['windows']['url'] = 'http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe'
default['vc12']['x64']['tools']['pkg']['windows']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe'




#
# Author:: Yvo van Doorn (<yvo@getchef.com>)
# Cookbook Name:: vcruntime
# Attributes:: default
# Copyright:: Copyright (c) 2014, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
34 changes: 34 additions & 0 deletions attributes/vc10.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Author:: Julian C. Dunn (<jdunn@getchef.com>)
# Cookbook Name:: vcruntime
# Attributes:: vc9
# Copyright:: Copyright (c) 2014, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

default['vcruntime']['vc10']['x86']['10.0.30319']['url'] = 'http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe'
default['vcruntime']['vc10']['x86']['10.0.30319']['sha256sum'] = '8162b2d665ca52884507ede19549e99939ce4ea4a638c537fa653539819138c8'
default['vcruntime']['vc10']['x86']['10.0.30319']['name'] = 'Microsoft Visual C++ 2010 Redistributable - x86 10.0.30319'
default['vcruntime']['vc10']['x64']['10.0.30319']['url'] = 'http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe'
default['vcruntime']['vc10']['x64']['10.0.30319']['sha256sum'] = 'b06546ddc8ca1e3d532f3f2593e88a6f49e81b66a9c2051d58508cc97b6a2023'
default['vcruntime']['vc10']['x64']['10.0.30319']['name'] = 'Microsoft Visual C++ 2010 Redistributable - x64 10.0.30319'

default['vcruntime']['vc10']['x86']['10.0.40219']['url'] = 'http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe'
default['vcruntime']['vc10']['x86']['10.0.40219']['sha256sum'] = '66b797b3b4f99488f53c2b676610dfe9868984c779536891a8d8f73ee214bc4b'
default['vcruntime']['vc10']['x86']['10.0.40219']['name'] = 'Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219'
default['vcruntime']['vc10']['x64']['10.0.40219']['url'] = 'http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe'
default['vcruntime']['vc10']['x64']['10.0.40219']['sha256sum'] = 'c6cd2d3f0b11dc2a604ffdc4dd97861a83b77e21709ba71b962a47759c93f4c8'
default['vcruntime']['vc10']['x64']['10.0.40219']['name'] = 'Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219'

default['vcruntime']['vc10']['version'] = '10.0.40219'
48 changes: 48 additions & 0 deletions attributes/vc12.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Author:: Julian C. Dunn (<jdunn@getchef.com>)
# Cookbook Name:: vcruntime
# Attributes:: vc12
# Copyright:: Copyright (c) 2014, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

default['vcruntime']['vc12']['x86']['11.0.50727.1']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/vcredist_x86.exe'
default['vcruntime']['vc12']['x86']['11.0.50727.1']['sha256sum'] = 'c493561785ab2a970d4560b5f5e3b38bc10a08c30c38399a5e230ee0a7bcc81f'
default['vcruntime']['vc12']['x86']['11.0.50727.1']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.50727'
default['vcruntime']['vc12']['x64']['11.0.50727.1']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/vcredist_x64.exe'
default['vcruntime']['vc12']['x64']['11.0.50727.1']['sha256sum'] = 'aa065e8498ac2b8483a5398f847aa26feb72d99f24474c00e6b6d784bb6379c2'
default['vcruntime']['vc12']['x64']['11.0.50727.1']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.50727'

default['vcruntime']['vc12']['x86']['11.0.51106.1']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU1/vcredist_x86.exe'
default['vcruntime']['vc12']['x86']['11.0.51106.1']['sha256sum'] = '1cf499658295622956a0dedbb70a414c1a6157e1b7ee606fd9f7afccccea60db'
default['vcruntime']['vc12']['x86']['11.0.51106.1']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.51106'
default['vcruntime']['vc12']['x64']['11.0.51106.1']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU1/vcredist_x64.exe'
default['vcruntime']['vc12']['x64']['11.0.51106.1']['sha256sum'] = 'aa78fef82d386f709cc36dbe5bc5a67f34887d8a37c61e67b06543d1d82c9e2a'
default['vcruntime']['vc12']['x64']['11.0.51106.1']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.51106'

default['vcruntime']['vc12']['x86']['11.0.60610.1']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU3/vcredist_x86.exe'
default['vcruntime']['vc12']['x86']['11.0.60610.1']['sha256sum'] = 'db68929b556bf742ce2646687979176f09acdd5f1f1334a0d403c39228305316'
default['vcruntime']['vc12']['x86']['11.0.60610.1']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.60610'
default['vcruntime']['vc12']['x64']['11.0.60610.1']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU3/vcredist_x64.exe'
default['vcruntime']['vc12']['x64']['11.0.60610.1']['sha256sum'] = '9045134dc85230ee2d3d1d6be0ad3489019af643128d73ff67f95371ceb9b963'
default['vcruntime']['vc12']['x64']['11.0.60610.1']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.60610'

default['vcruntime']['vc12']['x86']['11.0.61030']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe'
default['vcruntime']['vc12']['x86']['11.0.61030']['sha256sum'] = 'b924ad8062eaf4e70437c8be50fa612162795ff0839479546ce907ffa8d6e386'
default['vcruntime']['vc12']['x86']['11.0.61030']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.61030'
default['vcruntime']['vc12']['x64']['11.0.61030']['url'] = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe'
default['vcruntime']['vc12']['x64']['11.0.61030']['sha256sum'] = '681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064'
default['vcruntime']['vc12']['x64']['11.0.61030']['name'] = 'Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.61030'

default['vcruntime']['vc12']['version'] = '11.0.61030'
34 changes: 34 additions & 0 deletions attributes/vc9.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Author:: Julian C. Dunn (<jdunn@getchef.com>)
# Cookbook Name:: vcruntime
# Attributes:: vc9
# Copyright:: Copyright (c) 2014, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

default['vcruntime']['vc9']['x86']['9.0.21022.8']['url'] = 'http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe'
default['vcruntime']['vc9']['x86']['9.0.21022.8']['sha256sum'] = 'c6a7e484f4d84883bc1205bccea3114c0521025712922298ede9b2a1cd632357'
default['vcruntime']['vc9']['x86']['9.0.21022.8']['name'] = 'Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022'
default['vcruntime']['vc9']['x64']['9.0.21022.8']['url'] = 'http://download.microsoft.com/download/d/2/4/d242c3fb-da5a-4542-ad66-f9661d0a8d19/vcredist_x64.exe'
default['vcruntime']['vc9']['x64']['9.0.21022.8']['sha256sum'] = 'baaaeddc17bcda8d20c0a82a9eb1247be06b509a820d65dda1342f4010bdb4a0'
default['vcruntime']['vc9']['x64']['9.0.21022.8']['name'] = 'Microsoft Visual C++ 2008 Redistributable - x64 9.0.21022'

default['vcruntime']['vc9']['x86']['9.0.30729.17']['url'] = 'http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe'
default['vcruntime']['vc9']['x86']['9.0.30729.17']['sha256sum'] = '41f45a46ee56626ff2699d525bb56a3bb4718c5ca5f4fb5b3b38add64584026b'
default['vcruntime']['vc9']['x86']['9.0.30729.17']['name'] = 'Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17'
default['vcruntime']['vc9']['x64']['9.0.30729.17']['url'] = 'http://download.microsoft.com/download/2/d/6/2d61c766-107b-409d-8fba-c39e61ca08e8/vcredist_x64.exe'
default['vcruntime']['vc9']['x64']['9.0.30729.17']['sha256sum'] = '55bf99ad3f063165c3ee1626787b5d4c2b65b5001fef79dd58c3490369ed282f'
default['vcruntime']['vc9']['x64']['9.0.30729.17']['name'] = 'Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.17'

default['vcruntime']['vc9']['version'] = '9.0.30729.17'
10 changes: 5 additions & 5 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
maintainer 'Yvo van Doorn'
maintainer_email 'yvo@opscode.com'
license 'All rights reserved'
description 'Installs/Configures vcruntime'
description 'Installs Microsoft Visual C++ Runtimes'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.1.7"
version '0.2.0'

%w{ windows }.each do |os|
supports os
end

depends "windows"

provides "vcruntime::vc9"
provides "vcruntime::vc10"
provides "vcruntime::vc12"
provides 'vcruntime::vc9'
provides 'vcruntime::vc10'
provides 'vcruntime::vc12'

recipe "vcruntime::vc9", "Visual C++ 2008 runtimes"
recipe "vcruntime::vc10", "Visual C++ 2010 runtimes"
Expand Down
15 changes: 7 additions & 8 deletions recipes/vc10.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@
# limitations under the License.
#

include_recipe "windows"

case node['kernel']['machine']
when "x86_64"
windows_package 'Microsoft Visual C++ 2010 x64 Redistributable - 10.0.30319' do
source node['vc10']['x64']['tools']['pkg']['windows']['url']
when 'x86_64'
windows_package node['vcruntime']['vc10']['x64'][node['vcruntime']['vc10']['version']]['name'] do
checksum node['vcruntime']['vc10']['x64'][node['vcruntime']['vc10']['version']]['sha256sum']
source node['vcruntime']['vc10']['x64'][node['vcruntime']['vc10']['version']]['url']
installer_type :custom
options '/q'
end
when /i[3-6]86/
windows_package 'Microsoft Visual C++ 2010 x86 Redistributable - 10.0.30319' do
source node['vc10']['x86']['tools']['pkg']['windows']['url']
windows_package node['vcruntime']['vc10']['x86'][node['vcruntime']['vc10']['version']]['name'] do
checksum node['vcruntime']['vc10']['x86'][node['vcruntime']['vc10']['version']]['sha256sum']
source node['vcruntime']['vc10']['x86'][node['vcruntime']['vc10']['version']]['url']
installer_type :custom
options '/q'
end
end

32 changes: 23 additions & 9 deletions recipes/vc12.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
#
# Author:: Yvo van Doorn (<yvo@opscode.com>)
# Cookbook Name:: vcruntime
# Recipe:: vc12
# Installs runtime for VS 2012

include_recipe "windows"
#
# Copyright:: 2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

case node['kernel']['machine']
when "x86_64"
windows_package 'Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.61030' do
source node['vc12']['x64']['tools']['pkg']['windows']['url']
when 'x86_64'
windows_package node['vcruntime']['vc12']['x64'][node['vcruntime']['vc12']['version']]['name'] do
checksum node['vcruntime']['vc12']['x64'][node['vcruntime']['vc12']['version']]['sha256sum']
source node['vcruntime']['vc12']['x64'][node['vcruntime']['vc12']['version']]['url']
installer_type :custom
options '/q'
end
when /i[3-6]86/
windows_package 'Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.61030' do
source node['vc12']['x86']['tools']['pkg']['windows']['url']
windows_package node['vcruntime']['vc12']['x86'][node['vcruntime']['vc12']['version']]['name'] do
checksum node['vcruntime']['vc12']['x86'][node['vcruntime']['vc12']['version']]['sha256sum']
source node['vcruntime']['vc12']['x86'][node['vcruntime']['vc12']['version']]['url']
installer_type :custom
options '/q'
end
end

Loading

0 comments on commit ae58015

Please sign in to comment.