bake-toolkit 1.0.24 → 1.0.25

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.
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
+ <html>
3
+ <head>
4
+ <title>Documentation of the bake-tookit</title>
5
+ </head>
6
+ <body>
7
+ <h1>How to create a solution / projects in Visual Studio</h1>
8
+
9
+ bake projects are Makefile projects (NMake). When creating a new project, you can just create a new Makefile project and add a Project.meta.<br>
10
+ The recommended way is to use a script which comes with bake-toolkit:<br>
11
+ <img src="create/cvsp.png"/><p>
12
+ Example: <i>createVSProjects --version 2012 --rewrite_solution</i>
13
+
14
+ </body>
15
+
16
+ </html>
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
+ <html>
3
+ <head>
4
+ <title>Documentation of the bake-tookit</title>
5
+ </head>
6
+ <body>
7
+ <h1>How to install bake Visual Studio integration</h1>
8
+ <h2>VS 2012</h2>
9
+ The plugin is available on a E.S.R.Labs update site. Please follow the steps below to install the plugin.<br>
10
+ <p>
11
+ Configure the update site:<br>
12
+ <img src="install/site.png"/><br>
13
+ URL: <i>http://www.esrlabs.com/vs-plugins/bake/atom.xml</i>
14
+ <p>
15
+ Now it's available via Tools->Extensions and Updates:<br>
16
+ <img src="install/install1.png"/><p>
17
+ Check if it's installed correctly:<br>
18
+ <img src="install/installed.png"/><p>
19
+ If an update is available, it will look like this:<br>
20
+ <img src="install/update.png"/><p>
21
+
22
+ <h2>VS 2010</h2>
23
+ The plugin is available on a E.S.R.Labs server.<br>
24
+ Download <a href="http://www.esrlabs.com/vs-plugins/bake/bake Visual Studio Extension 2010.vsix">Visual Studio 2010 bake plugin</a>, double click the file and install it:<br>
25
+ <img src="install/install2010.png"/><p>
26
+ </body>
27
+
28
+ </html>
data/doc/vs/use.html ADDED
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
+ <html>
3
+ <head>
4
+ <title>Documentation of the bake-tookit</title>
5
+ </head>
6
+ <body>
7
+ <h1>How to use bake in Visual Studio</h1>
8
+
9
+ <h2>Select a build configuration of the main project</h2>
10
+ Right click on the main project and select a bake build configuration. Note, that only configurations with a DefaultToolchain will be displayed.<br>
11
+ <img src="use/select.png"/><p>
12
+
13
+ You can see the selected config in the last line of the Build menu:<br>
14
+ <img src="use/show.png"/><br>
15
+ If you click on this menu item, you can deselect the build config, which disables bake as long as no other config will be selected.<p>
16
+
17
+ You can specify additional command line parameters via the Options menu:<br>
18
+ <img src="use/options.png"/><p>
19
+
20
+ The build result will be shown in the Output window, errors will be shown in the Error window and annotated in the sources:<br>
21
+ <img src="use/error.png"/>
22
+ </body>
23
+
24
+ </html>
@@ -0,0 +1,108 @@
1
+ module Cxxproject
2
+
3
+ class MergeConfig
4
+
5
+ def initialize(child, parent)
6
+ @child = child
7
+ @parent = parent
8
+ end
9
+
10
+ def mergeToolchain(pt,ct)
11
+ pt.compiler.each do |pc|
12
+ if ct.compiler.none?{|cc| cc.ctype == pc.ctype}
13
+ ct.addCompiler(pc)
14
+ end
15
+ end
16
+ if ct.archiver.nil? and not pt.archiver.nil?
17
+ ct.setArchiver(pt.archiver)
18
+ end
19
+ if ct.linker.nil? and not pt.linker.nil?
20
+ ct.setLinker(pt.linker)
21
+ end
22
+ end
23
+
24
+ def manipulateLineNumbers(ar)
25
+ ar.each { |l| l.line_number -= 1000000 if l.line_number > 0 }
26
+ end
27
+
28
+ def merge()
29
+
30
+ # Valid for all config types
31
+
32
+ @child.setDependency(@parent.dependency + @child.dependency)
33
+
34
+ manipulateLineNumbers(@parent.exLib)
35
+ manipulateLineNumbers(@parent.exLibSearchPath)
36
+ manipulateLineNumbers(@parent.userLibrary)
37
+
38
+ @child.setExLib(@parent.exLib + @child.exLib)
39
+ @child.setExLibSearchPath(@parent.exLibSearchPath + @child.exLibSearchPath)
40
+ @child.setUserLibrary(@parent.userLibrary + @child.userLibrary)
41
+
42
+ if not @parent.preSteps.nil?
43
+ if (@child.preSteps.nil?)
44
+ @child.setPreSteps(@parent.preSteps)
45
+ else
46
+ @child.preSteps.setStep(@parent.preSteps.step + @child.preSteps.step)
47
+ end
48
+ end
49
+
50
+ if not @parent.postSteps.nil?
51
+ if (@child.postSteps.nil?)
52
+ @child.setPostSteps(@parent.postSteps)
53
+ else
54
+ @child.postSteps.setStep(@parent.postSteps.step + @child.postSteps.step)
55
+ end
56
+ end
57
+
58
+ pt = @parent.defaultToolchain
59
+ ct = @child.defaultToolchain
60
+
61
+ if not pt.nil?
62
+ if (ct.nil?)
63
+ @child.setDefaultToolchain(pt)
64
+ else
65
+ mergeToolchain(pt,ct)
66
+ end
67
+ end
68
+
69
+ # Valid for custom config
70
+
71
+ if (Metamodel::CustomConfig === @child && Metamodel::CustomConfig === @parent)
72
+ @child.setStep(@parent.step) if @child.step.nil? and not @parent.step.nil?
73
+ end
74
+
75
+ # Valid for library and exe config
76
+
77
+ if ((Metamodel::LibraryConfig === @child || Metamodel::ExecutableConfig === @child) && (Metamodel::LibraryConfig === @parent || Metamodel::ExecutableConfig === @parent))
78
+
79
+ @child.setFiles(@parent.files + @child.files)
80
+ @child.setExcludeFiles(@parent.excludeFiles + @child.excludeFiles)
81
+ @child.setIncludeDir(@parent.includeDir + @child.includeDir)
82
+
83
+ pt = @parent.toolchain
84
+ ct = @child.toolchain
85
+
86
+ if not pt.nil?
87
+ if (ct.nil?)
88
+ @child.setToolchain(pt)
89
+ else
90
+ mergeToolchain(pt,ct)
91
+ end
92
+ end
93
+
94
+ end
95
+
96
+ # Valid for exe config
97
+
98
+ if (Metamodel::ExecutableConfig === @child && Metamodel::ExecutableConfig === @parent)
99
+ @child.setLinkerScript(@parent.linkerScript) if @child.linkerScript.nil? and not @parent.linkerScript.nil?
100
+ @child.setArtifactName(@parent.artifactName) if @child.artifactName.nil? and not @parent.artifactName.nil?
101
+ @child.setMapFile(@parent.mapFile) if @child.mapFile.nil? and not @parent.mapFile.nil?
102
+ end
103
+
104
+ end
105
+
106
+ end
107
+
108
+ end
@@ -153,6 +153,7 @@ module Cxxproject
153
153
 
154
154
  class BaseConfig_INTERNAL < ModelElement
155
155
  has_attr 'name', String, :defaultValueLiteral => ""
156
+ has_attr 'extends', String, :defaultValueLiteral => ""
156
157
  contains_one 'preSteps', PreSteps, 'parent'
157
158
  contains_one 'postSteps', PostSteps, 'parent'
158
159
  contains_many 'userLibrary', UserLibrary, 'parent'
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.24"
4
+ "1.0.25"
5
5
  end
6
6
  end
7
7
 
8
- expectedCxx = "0.5.69"
8
+ expectedCxx = "0.5.70"
9
9
  expectedRGen = "0.6.0"
10
10
  expectedRText = "0.2.0"
11
11
 
data/lib/tocxx.rb CHANGED
@@ -9,6 +9,7 @@ require 'bake/model/metamodel_ext'
9
9
  require 'bake/util'
10
10
  require 'bake/cache'
11
11
  require 'bake/subst'
12
+ require 'bake/mergeConfig'
12
13
  require 'cxxproject/buildingblocks/module'
13
14
  require 'cxxproject/buildingblocks/makefile'
14
15
  require 'cxxproject/buildingblocks/executable'
@@ -189,6 +190,33 @@ module Cxxproject
189
190
  res
190
191
  end
191
192
 
193
+
194
+ def getFullProject(configs, configname, filename)
195
+ config = nil
196
+ configs.each do |c|
197
+ if c.name == configname
198
+ if config
199
+ Printer.printError "Error: Config '#{configname}' found more than once in '#{filename}'"
200
+ ExitHelper.exit(1)
201
+ end
202
+ config = c
203
+ end
204
+ end
205
+
206
+ if not config
207
+ Printer.printError "Error: Config '#{configname}' not found in '#{filename}'"
208
+ ExitHelper.exit(1)
209
+ end
210
+
211
+ if config.extends != ""
212
+ parent = getFullProject(configs, config.extends, filename)
213
+ MergeConfig.new(config, parent).merge()
214
+ end
215
+
216
+ config
217
+ end
218
+
219
+
192
220
  def loadProjMeta(loader, filename, configname)
193
221
  @project_files << filename
194
222
  f = loader.load(filename)
@@ -202,14 +230,10 @@ module Cxxproject
202
230
 
203
231
  f.root_elements.each do |e|
204
232
  x = e.getConfig
233
+ config = getFullProject(x,configname,filename)
234
+
205
235
  x.each do |y|
206
- if y.name == configname
207
- if config
208
- Printer.printError "Error: Config '#{configname}' found more than once in '#{filename}'"
209
- ExitHelper.exit(1)
210
- end
211
- config = y
212
- else
236
+ if y != config
213
237
  e.removeGeneric("Config", y)
214
238
  end
215
239
  end
@@ -237,7 +261,11 @@ module Cxxproject
237
261
 
238
262
  potentialProjs = []
239
263
  @options.roots.each do |r|
240
- potentialProjs.concat(Dir.glob(r+"/**{,/*/**}/Project.meta"))
264
+ if (r.length == 3 && r.include?(":/"))
265
+ r = r + @mainProjectName # glob would not work otherwise on windows (ruby bug?)
266
+ end
267
+ r = r+"/**{,/*/**}/Project.meta"
268
+ potentialProjs.concat(Dir.glob(r))
241
269
  end
242
270
 
243
271
  potentialProjs = potentialProjs.uniq.sort unless potentialProjs.empty?
@@ -355,9 +383,8 @@ module Cxxproject
355
383
  integrateToolchain(@defaultToolchain, @mainConfig.defaultToolchain)
356
384
 
357
385
  end
358
-
359
- def convert2bb
360
386
 
387
+ def convert2bb
361
388
  @project2config.each do |projName, config|
362
389
 
363
390
  projDir = config.parent.get_project_dir
@@ -481,7 +508,7 @@ module Cxxproject
481
508
 
482
509
  bbModule.main_content.set_source_patterns(srcs)
483
510
  bbModule.main_content.set_exclude_sources(ex_srcs)
484
-
511
+
485
512
  tcsMapConverted = {}
486
513
  srcs = config.files.each do |f|
487
514
  if (f.define.length > 0 or f.flags.length > 0)
@@ -637,7 +664,7 @@ module Cxxproject
637
664
 
638
665
  substVars
639
666
  convert2bb
640
-
667
+
641
668
  #################################################
642
669
 
643
670
  startBBName = "Project "+@options.project
metadata CHANGED
@@ -1,66 +1,74 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bake-toolkit
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.0.24
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.25
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - Alexander Schaal
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
-
13
- date: 2013-09-10 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
11
+ date: 2014-01-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
16
14
  name: cxxproject
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - "="
22
- - !ruby/object:Gem::Version
23
- version: 0.5.69
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.5.70
24
20
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: rtext
28
21
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - "="
33
- - !ruby/object:Gem::Version
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.5.70
27
+ - !ruby/object:Gem::Dependency
28
+ name: rtext
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
34
33
  version: 0.2.0
35
34
  type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: rgen
39
35
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - "="
44
- - !ruby/object:Gem::Version
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rgen
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
45
47
  version: 0.6.0
46
48
  type: :runtime
47
- version_requirements: *id003
48
- description: " This build tool is used to compile projects fast and easy.\n"
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.6.0
55
+ description: |2
56
+ This build tool is used to compile projects fast and easy.
49
57
  email: alexander.schaal@esrlabs.com
50
- executables:
58
+ executables:
51
59
  - bake
52
60
  - bakery
53
61
  - createVSProjects
62
+ - bake-doc
54
63
  extensions: []
55
-
56
64
  extra_rdoc_files: []
57
-
58
- files:
65
+ files:
59
66
  - lib/alias/loader.rb
60
67
  - lib/alias/model/language.rb
61
68
  - lib/alias/model/metamodel.rb
62
69
  - lib/bake/cache.rb
63
70
  - lib/bake/loader.rb
71
+ - lib/bake/mergeConfig.rb
64
72
  - lib/bake/model/language.rb
65
73
  - lib/bake/model/metamodel.rb
66
74
  - lib/bake/model/metamodel_ext.rb
@@ -78,37 +86,66 @@ files:
78
86
  - lib/tocxx.rb
79
87
  - lib/vs/options.rb
80
88
  - Rakefile.rb
89
+ - doc/cmd/install.html
90
+ - doc/cmd/mount.png
91
+ - doc/cmd/ruby.png
92
+ - doc/cmd/tty.png
93
+ - doc/cmd/usecmd.html
94
+ - doc/cmd/usecygwin.html
95
+ - doc/concepts/buildhierarchy.html
96
+ - doc/concepts/configfile.html
97
+ - doc/concepts/hier.png
98
+ - doc/concepts/mainproject.html
99
+ - doc/dyk/keys.png
100
+ - doc/dyk/tipps.html
101
+ - doc/eclipse/export.html
102
+ - doc/eclipse/import.html
103
+ - doc/eclipse/install.html
104
+ - doc/eclipse/new.html
105
+ - doc/eclipse/use.html
106
+ - doc/further/change.html
107
+ - doc/further/collections.html
108
+ - doc/further/internal.html
109
+ - doc/further/issues.html
110
+ - doc/further/perf.html
111
+ - doc/further/wish.html
112
+ - doc/src/ok.png
113
+ - doc/syntax/derive.html
114
+ - doc/syntax/subst.html
115
+ - doc/syntax/syntax.html
116
+ - doc/vs/create.html
117
+ - doc/vs/install.html
118
+ - doc/vs/use.html
119
+ - doc/index.html
81
120
  - license.txt
82
121
  - bin/bake
83
122
  - bin/bakery
84
123
  - bin/createVSProjects
124
+ - bin/bake-doc
85
125
  homepage: http://www.esrlabs.com
86
- licenses: []
87
-
126
+ licenses:
127
+ - MIT
128
+ metadata: {}
88
129
  post_install_message:
89
- rdoc_options:
130
+ rdoc_options:
90
131
  - -x
91
132
  - doc
92
- require_paths:
133
+ require_paths:
93
134
  - lib
94
- required_ruby_version: !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "0"
100
- required_rubygems_version: !ruby/object:Gem::Requirement
101
- none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: "0"
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ required_rubygems_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - '>='
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
106
145
  requirements: []
107
-
108
146
  rubyforge_project:
109
- rubygems_version: 1.8.24
147
+ rubygems_version: 2.0.14
110
148
  signing_key:
111
- specification_version: 3
149
+ specification_version: 4
112
150
  summary: Frontend for cxxproject.
113
151
  test_files: []
114
-