lib/build.rb in dev_tasks-0.0.108 vs lib/build.rb in dev_tasks-0.0.109

- old
+ new

@@ -1,24 +1,33 @@ require_relative './color.rb' +require_relative './msbuild.rb' class Build < Array def initialize # Gem builds, `gem build dev_tasks.spec` Dir.glob('*.gemspec') {|f| self.add "gem build #{f}" } # .sln builds, `"C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" "MySolution.sln" + msbuild=MSBuild.new Dir.glob('*.sln'){|f| - if File.exist? Build.msbuild - self.add "\"#{Build.msbuild}\" \"#{f}\" /nologo /p:Configuration=Release /p:Platform=\"Any CPU\"" + vs_version=MSBuild.get_vs_version(f) + if File.exist? msbuild[vs_version] + MSBuild.get_configurations(f).each{ |configuration| + MSBuild.get_platforms(f).each{|platform| + self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\"" + } + #self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"Any CPU\"" + } + #self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=Release /p:Platform=\"Any CPU\"" end } end - def self.msbuild - "C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe" - end + #def self.msbuild + # "C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe" + #end def add command self << command if(!include?(command)) end end \ No newline at end of file