dev 1.0.61 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dev/Environment.rb +1 -0
- data/lib/dev/Project.rb +29 -6
- metadata +1 -1
data/lib/dev/Environment.rb
CHANGED
data/lib/dev/Project.rb
CHANGED
@@ -366,12 +366,28 @@ class Project < Hash
|
|
366
366
|
array << "{ :cmd=> 'gem build #{gs}', :capture_output=> false}"
|
367
367
|
} if self[:type]=="gem"
|
368
368
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
369
|
+
Dir.glob("*.csproj").each{|cs|
|
370
|
+
extract_platforms(cs).each{ |platform|
|
371
|
+
if(platform=="AnyCPU")
|
372
|
+
if(!has_key?(:any_release_compile_flags))
|
373
|
+
self[:any_release_compile_flags]="/property:Configuration=Release /property:Platform=\"Any CPU\" /p:OutputPath=./bin/x86/Release"
|
374
|
+
end
|
375
|
+
array<<"<paths,msbuild> #{cs} <any_release_compile_flags>"
|
376
|
+
end
|
377
|
+
if(platform="x86")
|
378
|
+
if(!has_key?(:x86_release_compile_flags))
|
379
|
+
self[:x86_release_compile_flags]="/property:Configuration=Release /property:Platform=\"x86\" /p:OutputPath=./bin/x86/Release"
|
380
|
+
end
|
381
|
+
array<<"<paths,msbuild> #{cs} <x86_release_compile_flags>"
|
382
|
+
end
|
383
|
+
if(platform="x64")
|
384
|
+
if(!has_key?(:x64_release_compile_flags))
|
385
|
+
self[:x64_release_compile_flags]="/property:Configuration=Release /property:Platform=\"x64\" /p:OutputPath=./bin/x86/Release"
|
386
|
+
end
|
387
|
+
array<<"<paths,msbuild> #{cs} <x64_release_compile_flags>"
|
388
|
+
end
|
389
|
+
}
|
390
|
+
}
|
375
391
|
|
376
392
|
if self[:type]=="c++"
|
377
393
|
if(!has_key?(:win32_release_compile_flags))
|
@@ -438,5 +454,12 @@ class Project < Hash
|
|
438
454
|
|
439
455
|
generate_tasks(self)
|
440
456
|
end
|
457
|
+
|
458
|
+
def self.extract_platforms(filename)
|
459
|
+
results = Array::new
|
460
|
+
text=File.read("ognet.csproj")
|
461
|
+
text.scan(/(\w+)<\/Platform/).each{ | var_match | results << var_match[0].to_s if !results.include?(var_match[0].to_s)}
|
462
|
+
results
|
463
|
+
end
|
441
464
|
end
|
442
465
|
end # module Dev
|