Sha256: fa98b0fd059fe42cf34b957b01a2242f8e8cfa3a206e6b47b48221f5c8eee437

Contents?: true

Size: 1.13 KB

Versions: 33

Compression:

Stored size: 1.13 KB

Contents

require_relative './color.rb'

# Visual Studio 2008 version 9.0,  solution format version 10.00
# Visual Studio 2010 version 10.0, solution format version 11.00
# Visual Studio 2012 version 11.0, solution format version 12.00
# Visual Studio 2013 version 12.0, solution format version 12.00
class MSBuild < Hash

  def initialize
    self[:vs9]="C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe"
	self[:vs12]="C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe"
  end

  def self.get_vs_version(sln_filename)
    sln_text=File.read(sln_filename)
    sln_text.scan(/Format Version 10.00/).each{|m|
	  return :vs9
	}
    return :vs12
  end

  def self.get_configurations(sln_filename)
    configs=Array.new
	sln_text=File.read(sln_filename)
    sln_text.scan(/= ([\w]+)\|/).each{|m|
	  c=m.first.to_s
	  configs << c if !configs.include?(c)
	}
	return configs
  end

  def self.get_platforms(sln_filename)
    platforms=Array.new
	sln_text=File.read(sln_filename)
    sln_text.scan(/= [\w]+\|([\w]+)/).each{|m|
	  p=m.first.to_s
	  platforms << p if !platforms.include?(p)
	}
	return platforms
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
dev_tasks-0.0.141 lib/msbuild.rb
dev_tasks-0.0.140 lib/msbuild.rb
dev_tasks-0.0.139 lib/msbuild.rb
dev_tasks-0.0.138 lib/msbuild.rb
dev_tasks-0.0.137 lib/msbuild.rb
dev_tasks-0.0.136 lib/msbuild.rb
dev_tasks-0.0.135 lib/msbuild.rb
dev_tasks-0.0.134 lib/msbuild.rb
dev_tasks-0.0.133 lib/msbuild.rb
dev_tasks-0.0.132 lib/msbuild.rb
dev_tasks-0.0.131 lib/msbuild.rb
dev_tasks-0.0.130 lib/msbuild.rb
dev_tasks-0.0.129 lib/msbuild.rb
dev_tasks-0.0.128 lib/msbuild.rb
dev_tasks-0.0.127 lib/msbuild.rb
dev_tasks-0.0.126 lib/msbuild.rb
dev_tasks-0.0.125 lib/msbuild.rb
dev_tasks-0.0.124 lib/msbuild.rb
dev_tasks-0.0.123 lib/msbuild.rb
dev_tasks-0.0.122 lib/msbuild.rb