Class: Dev::Cmd::Compile

Inherits:
Array
  • Object
show all
Defined in:
lib/dev/cmd/Compile.rb

Instance Method Summary collapse

Methods inherited from Array

#strip_auto_entries

Instance Method Details

#refreshObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/dev/cmd/Compile.rb', line 4

def refresh

  puts_debug "Dev::Cmd::Compile.refresh"
  strip_auto_entries
  windows=RUBY_PLATFORM.include?("w32")

  # jamfiles


  # vcxproj

  Dir.glob('**/*.vcxproj').each { |vcxproj| self << "{:cmd=> '<paths,msbuild> #{vcxproj} /property:Configuration=Release /property:Platform=Win32', :auto=>true}" } if windows

  # csproj

  csbuild="<paths,msbuild>"
  csbuild="xbuild" if !RUBY_PLATFORM.include?("w32")
  Dir.glob('**/*.csproj').each { |csproj| 
 platforms=Dev::MsBuild.extract_platforms(csproj)
 platforms.each { |platform|
   skip=(!RUBY_PLATFORM.include?("w32") && platform=="x64")
   self << "{:cmd=> '#{csbuild} #{csproj} /property:Configuration=Release /property:Platform=\"#{platform}\" /p:OutputPath=./bin/#{platform}/Release', :auto=>true}" if !skip
 }
  }

  # gemspec

  Dir.glob("*.gemspec").each { |gs| self << "{:cmd=> 'gem build #{gs}', :capture_output=> false, :auto=> true}" }
end