Class: PEBuild::Cap::DetectInstaller::Windows Abstract
- Defined in:
- lib/pe_build/cap/detect_installer/windows.rb
Overview
This class is abstract.
detect_installer implementation for Windows guests
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from PEBuild::Cap::DetectInstaller::Base
Instance Method Details
#arch ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pe_build/cap/detect_installer/windows.rb', line 19 def arch results = execute_command('if ([System.IntPtr]::Size -eq 4) { "x86" } else { "x64" }') unless results[:retval] == 0 raise PEBuild::Cap::DetectInstaller::DetectFailed, :name => @machine.name, :error => "Could not determine Windows architecture on #{@machine.name}: got #{results[:stderr]}" end results[:stdout] end |
#detect ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/pe_build/cap/detect_installer/windows.rb', line 9 def detect # Starting with PE 3.7.0, separate 64-bit packages are shipped for Windows. if (PEBuild::Util::VersionString.compare(@version, '3.7.0') >= 0) && (arch == 'x64') "puppet-enterprise-#{@version}-x64.msi" else "puppet-enterprise-#{@version}.msi" end end |