bake-toolkit 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/bin/bake CHANGED
@@ -5,7 +5,7 @@ $timeStart = Time.now
5
5
  $:.unshift(File.dirname(__FILE__)+"/../lib")
6
6
  require 'bake/version'
7
7
 
8
- $:.unshift(File.dirname(__FILE__)+"/../../cxxproject_master.git/lib")
8
+ $:.unshift(File.dirname(__FILE__)+"/../../cxxproject.git/lib")
9
9
 
10
10
  require "cxxproject/version"
11
11
 
data/bin/createVSProjects CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
- puts "Initializing..."
3
-
4
2
  $:.unshift(File.dirname(__FILE__)+"/../lib")
5
3
 
6
4
  require "securerandom"
7
5
  require "vs/options"
6
+ require 'bake/version'
7
+
8
+ puts "-- bake #{Cxxproject::Version.bake}, ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}, platform #{RUBY_PLATFORM} --"
8
9
 
9
10
  module Cxxproject
10
11
 
@@ -28,15 +29,13 @@ end
28
29
  @options = VsOptions.new(ARGV)
29
30
  @options.parse_options
30
31
 
31
- version = "error"
32
- toolset = "error"
32
+ version = "12.00"
33
+ toolset = "v110"
33
34
  if @options.version == "2010"
34
35
  version = "11.00"
35
36
  toolset = "v100"
36
- elsif @options.version == "2012"
37
- version = "12.00"
38
- toolset = "v110"
39
37
  end
38
+
40
39
 
41
40
  slnFilename = @options.roots[0] + "/" + File.basename(@options.roots[0]) + ".sln"
42
41
  appendProjects = (File.exist?(slnFilename) and @options.rewriteSolution)
@@ -141,11 +140,15 @@ projects.each do |k,v|
141
140
  f.puts " <ConfigurationType>Makefile</ConfigurationType>"
142
141
  f.puts " <PlatformToolset>" + toolset + "</PlatformToolset>"
143
142
  f.puts " </PropertyGroup>"
143
+ f.puts " <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='bake|Win32'\">"
144
+ f.puts " <ExecutablePath>$(PATH)</ExecutablePath>"
145
+ f.puts " </PropertyGroup>"
144
146
  f.puts " <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />"
145
147
  f.puts " <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='bake|Win32'\">"
146
148
  f.puts " <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />"
147
149
  f.puts " </ImportGroup>"
148
150
 
151
+
149
152
  f.puts " <ItemGroup>"
150
153
  Dir.chdir(v[PATH]) do
151
154
  files = Dir.glob("**/*")
data/lib/bake/options.rb CHANGED
@@ -49,7 +49,7 @@ module Cxxproject
49
49
  add_option(Option.new("--rebuild",false) { set_rebuild })
50
50
  add_option(Option.new("--prepro",false) { set_prepro })
51
51
  add_option(Option.new("--link_only",false) { set_linkOnly })
52
- add_option(Option.new("--print_less",false) { set_printLess })
52
+ add_option(Option.new("--print_less",false) { set_printLess })
53
53
  add_option(Option.new("--ignore_cache",false) { set_nocache })
54
54
  add_option(Option.new("--threads",true) { |x| set_threads(x) })
55
55
  add_option(Option.new("--socket",true) { |x| set_socket(x) })
@@ -58,6 +58,7 @@ module Cxxproject
58
58
  add_option(Option.new("--include_filter",true) { |x| set_include_filter(x) })
59
59
  add_option(Option.new("--exclude_filter",true) { |x| set_exclude_filter(x) })
60
60
  add_option(Option.new("--show_abs_paths",false) { set_show_fullnames })
61
+ add_option(Option.new("--visualStudio",false) { set_visualStudio })
61
62
  add_option(Option.new("-h",false) { usage; ExitHelper.exit(0) })
62
63
  add_option(Option.new("--help",false) { usage; ExitHelper.exit(0) })
63
64
  add_option(Option.new("--show_include_paths",false) { set_show_inc })
@@ -213,6 +214,10 @@ module Cxxproject
213
214
  Rake::application.consoleOutput_fullnames = true
214
215
  end
215
216
 
217
+ def set_visualStudio
218
+ Rake::application.consoleOutput_visualStudio = true
219
+ end
220
+
216
221
  def set_root(dir)
217
222
  check_valid_dir(dir)
218
223
  r = File.expand_path(dir.gsub(/[\\]/,'/'))
data/lib/bake/version.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  module Cxxproject
2
2
  class Version
3
3
  def self.bake
4
- "1.0.5"
4
+ "1.0.6"
5
5
  end
6
6
  end
7
7
 
8
- expectedCxx = "0.5.60"
8
+ expectedCxx = "0.5.61"
9
9
  expectedRGen = "0.6.0"
10
10
  expectedRText = "0.2.0"
11
11
 
data/lib/vs/options.rb CHANGED
@@ -14,16 +14,16 @@ module Cxxproject
14
14
 
15
15
  add_option(Option.new("--version",true) { |x| set_version(x) })
16
16
  add_option(Option.new("--rewrite_solution",false) { set_rewrite_solution })
17
- add_option(Option.new("-w",true) { |x| set_root(x) })
17
+ add_option(Option.new("-w",true) { |x| set_root(x) })
18
18
  add_option(Option.new("-h",false) { usage; ExitHelper.exit(0) })
19
19
  end
20
20
 
21
21
  def usage
22
22
  puts "\nUsage: createVSProjects [options]"
23
23
  puts " -w <root> Add a workspace root. Default is current directory."
24
- puts " This Options can be used at multiple times."
25
- puts " Solution files will be created in the first root directory."
26
- puts " --version <year> Visual Studio version. Currently supported: 2010 and 2012 (default)."
24
+ puts " This option can be used at multiple times."
25
+ puts " Solution files will be created in the first root directory."
26
+ puts " --version <year> Visual Studio version. Currently supported: 2010 and 2012 (default)."
27
27
  puts " --rewrite_solution Rewrites existing solution files instead of appending new projects."
28
28
  puts " -h Print this help."
29
29
  end
@@ -46,9 +46,9 @@ module Cxxproject
46
46
 
47
47
  def set_version(v)
48
48
  if v != "2010" and v != "2012"
49
- puts "Error: version mut be '2010' or '2012'"
50
- end
49
+ puts "Error: version must be '2010' or '2012'"
51
50
  ExitHelper.exit(1)
51
+ end
52
52
  @version = v
53
53
  end
54
54
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: bake-toolkit
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.5
5
+ version: 1.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alexander Schaal
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-01-15 00:00:00 Z
13
+ date: 2013-01-21 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cxxproject
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.5.60
23
+ version: 0.5.61
24
24
  type: :runtime
25
25
  version_requirements: *id001
26
26
  - !ruby/object:Gem::Dependency