Sha256: f49f313b8380598c087aa25dea32619a7a1305fb013c0b755acc1713b69c9f30

Contents?: true

Size: 1.24 KB

Versions: 23

Compression:

Stored size: 1.24 KB

Contents

# encoding: utf-8

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,:encoding=>'UTF-8')
    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,:encoding=>'UTF-8')
    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,:encoding=>"UTF-8").gsub!( /\P{ASCII}/ , '')
    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

23 entries across 23 versions & 1 rubygems

Version Path
dev_tasks-1.0.20 lib/msbuild.rb
dev_tasks-1.0.19 lib/msbuild.rb
dev_tasks-1.0.18 lib/msbuild.rb
dev_tasks-1.0.17 lib/msbuild.rb
dev_tasks-1.0.16 lib/msbuild.rb
dev_tasks-1.0.15 lib/msbuild.rb
dev_tasks-1.0.14 lib/msbuild.rb
dev_tasks-1.0.13 lib/msbuild.rb
dev_tasks-1.0.12 lib/msbuild.rb
dev_tasks-1.0.11 lib/msbuild.rb
dev_tasks-1.0.10 lib/msbuild.rb
dev_tasks-1.0.9 lib/msbuild.rb
dev_tasks-1.0.8 lib/msbuild.rb
dev_tasks-1.0.7 lib/msbuild.rb
dev_tasks-1.0.6 lib/msbuild.rb
dev_tasks-1.0.5 lib/msbuild.rb
dev_tasks-1.0.4 lib/msbuild.rb
dev_tasks-1.0.3 lib/msbuild.rb
dev_tasks-1.0.2 lib/msbuild.rb
dev_tasks-1.0.1 lib/msbuild.rb