Sha256: 89b12c46c1e3429e9babac0f72ab4ff8a334b6141db8839a9a17ea60bbb9f7cc

Contents?: true

Size: 1.31 KB

Versions: 19

Compression:

Stored size: 1.31 KB

Contents

module Dev
class Paths < Hash
  def initialize
    ["v4.0.30319","v3.5","v3.0","v2.0.50727"].each { |v|
	  f="C:/WINDOWS/Microsoft.NET/Framework/#{v}/MSBuild.exe"
	  self[:msbuild]=f if File.exists?(f) && self[:msbuild].nil?
	  f="C:/WINDOWS/Microsoft.NET/Framework/#{v}/RegAsm.exe"
	  self[:regasm]=f if File.exists?(f) && self[:regasm].nil?
	}

	initialize_nunit
	
  end

  def initialize_nunit
    nunit=""
    nunit_bin=""
    Dir.glob("#{Rake.original_dir()}/**/*.csproj").each { |f|
	  text=File.read(f)
	  text.scan(/dep\\([\w\d.\-\\]+)\\bin\\[\w\d.\-\\]+\\nunit.framework.dll/).each{ | nunit_bin_match |
	    nunit_bin="#{Dev::Environment::dev_root}/dep/#{nunit_bin_match[0].to_s.gsub('\\','/')}"
	  }
	}

    nunit="#{nunit_bin}/bin/nunit-console-x86.exe" if nunit_bin.length > 3

	if nunit.length==0
	  ["2.6.0.12051","2.5.10.11092"].each{ |v|
	    Dir.glob("#{Dev::Environment.dev_root}/dep/*/NUnit/#{v}/bin/nunit-console-x86.exe").each{|f|
	      nunit=f if File.exists?(f) && self[:nunit].nil?
	    }
	    if( !self.has_key?(:nunit) )
	      Dir.glob("#{Dev::Environment.dev_root}/dep/*/NUnit/#{v}/bin/*/nunit-console-x86.exe").each{|f|
	        self[:nunit]=f if File.exists?(f) && self[:nunit].nil?
	      }
	    end
	  }
	end

	self[:nunit]=nunit
  end
end # class Paths
end # module Dev

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
dev-1.0.172 lib/dev/Paths.rb
dev-1.0.171 lib/dev/Paths.rb
dev-1.0.170 lib/dev/Paths.rb
dev-1.0.169 lib/dev/Paths.rb
dev-1.0.168 lib/dev/Paths.rb
dev-1.0.167 lib/dev/Paths.rb
dev-1.0.166 lib/dev/Paths.rb
dev-1.0.165 lib/dev/Paths.rb
dev-1.0.164 lib/dev/Paths.rb
dev-1.0.163 lib/dev/Paths.rb
dev-1.0.162 lib/dev/Paths.rb
dev-1.0.161 lib/dev/Paths.rb
dev-1.0.160 lib/dev/Paths.rb
dev-1.0.159 lib/dev/Paths.rb
dev-1.0.158 lib/dev/Paths.rb
dev-1.0.157 lib/dev/Paths.rb
dev-1.0.156 lib/dev/Paths.rb
dev-1.0.155 lib/dev/Paths.rb
dev-1.0.154 lib/dev/Paths.rb