Skip to content

Commit

Permalink
cookbook for installing/configuring WiX, a toolset that builds Window…
Browse files Browse the repository at this point in the history
…s installation packages from XML source code
  • Loading branch information
schisamo committed Sep 27, 2011
1 parent 3bf1c8c commit 2799802
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 0 deletions.
63 changes: 63 additions & 0 deletions wix/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Description
===========

The [Windows Installer XML](http://wix.sourceforge.net/) (WiX) is a toolset that builds Windows installation packages from XML source code. The toolset supports a command line environment that developers may integrate into their build processes to build MSI and MSM setup packages. This cookbook installs the full WiX suite of tools.

Requirements
============

Platform
--------

* Windows Server 2003 R2
* Windows 7
* Windows Server 2008 (R1, R2)

Cookbooks
---------

* windows

Attributes
==========

* `node['wix']['home']` - location to install WiX files to. default is `%SYSTEMDRIVE%\wix`

Usage
=====

default
-------

Downloads and installs WiX to the location specified by `node['wix']['home']`. Also ensures `node['wix']['home']` is in the system path.

Changes/Roadmap
===============

## Future

* Resource/Provider for creating individual WiX projects.

## 1.0.0:

* initial release

License and Author
==================

Author:: Seth Chisamore (<[email protected]>)

Copyright:: 2011, 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.

24 changes: 24 additions & 0 deletions wix/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Author:: Seth Chisamore (<[email protected]>)
# Cookbook Name:: wix
# Attribute:: default
#
# Copyright:: Copyright (c) 2011 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.
#

default['wix']['url'] = 'http://wix.sourceforge.net/releases/3.6.2109.0/wix36-binaries.zip'
default['wix']['checksum'] = '14d1ba5b3f4e3377c6a0e768d5dacd0c5231f0cc233de41e4126b29582656f55'

default['wix']['home'] = "#{ENV['SYSTEMDRIVE']}\\wix"
9 changes: 9 additions & 0 deletions wix/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
maintainer "Opscode, Inc."
maintainer_email "[email protected]"
license "Apache 2.0"
description "Installs/Configures Windows Installer XML toolset (WiX)"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.0.0"
supports "windows"

depends "windows", ">= 1.2.2"
38 changes: 38 additions & 0 deletions wix/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# Author:: Seth Chisamore (<[email protected]>)
# Cookbook Name:: wix
# Recipe:: default
#
# Copyright 2011, 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.
#

file_name = ::File.basename(node['wix']['url'])

remote_file "#{Chef::Config[:file_cache_path]}/#{file_name}" do
source node['wix']['url']
checksum node['wix']['checksum']
notifies :unzip, "windows_zipfile[wix]", :immediately
end

windows_zipfile "wix" do
path node['wix']['home']
source "#{Chef::Config[:file_cache_path]}/#{file_name}"
action :nothing
end

# update path
windows_path node['wix']['home'] do
action :add
end

0 comments on commit 2799802

Please sign in to comment.