Sha256: 87b58f71e4488585959554f1aca03f428dc53eef68bc369e04e8e0d91588097a

Contents?: true

Size: 736 Bytes

Versions: 6

Compression:

Stored size: 736 Bytes

Contents

module Rake::Funnel::Tasks::MSBuildSupport
  class BuildTool
    class << self
      def find
        if Rake::Win32.windows?
          require 'win32/registry'

          %w{12.0 4.0 3.5 2.0}.collect { |version|
            msbuild = nil
            key = "SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\#{version}"

            begin
              Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg|
                candidate = "#{reg['MSBuildToolsPath']}\\msbuild.exe"
                msbuild = candidate if File.exists?(candidate)
              end
            rescue
            end

            msbuild
          }.compact.first
        else
          'xbuild'
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rake-funnel-0.0.6.pre lib/rake/funnel/tasks/msbuild_support/build_tool.rb
rake-funnel-0.0.5.pre lib/rake/funnel/tasks/msbuild_support/build_tool.rb
rake-funnel-0.0.4.pre lib/rake/funnel/tasks/msbuild_support/build_tool.rb
rake-funnel-0.0.3.pre lib/rake/funnel/tasks/msbuild_support/build_tool.rb
rake-funnel-0.0.2.pre lib/rake/funnel/tasks/msbuild_support/build_tool.rb
rake-funnel-0.0.1.pre lib/rake/funnel/tasks/msbuild_support/build_tool.rb