bake-toolkit 2.60.0 → 2.60.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a05f5baab5566671c4deff626aceaea52a9b0d4274c03f9737823b3809039bb2
4
- data.tar.gz: d407fbc0d01b0fded6b7453ac41446494725cfc575bfd472a77c2d4096738a82
3
+ metadata.gz: 196c55cc08919bff9381fc2c148d1cd4ec295667eb6fa90f4af8ae3080c3b9cc
4
+ data.tar.gz: 271409c11aeb347eaf6a3d6110a9e3d4aca6ce9f45cc144324f7bbaf63e3162f
5
5
  SHA512:
6
- metadata.gz: 7dc782d118b9fefd102ad6948dc4bfeb38ac7ac0cffcca4581719e994ad69927271523bd1a46472ed92573769754ca44af9c655c139e3ae4fa96a1887bd18862
7
- data.tar.gz: e89c99ee42fd0602c6cdcc443ae3924b12af3a7e84ffe308486137ba1a77921bedd991d33a41fcf5e18681c932cda416a5388a9537a1bcae20785cbcc33351ff
6
+ metadata.gz: 3902c531628b8cdaf2ce297b9be23b5bd1daaa7009e451797f28df16ff074624ff9c78a2599ae66590ca5fcff7d992e06ffe3e52daa4e937650134c33c2fb3dc
7
+ data.tar.gz: efb3178b80e2c48a164f1b5d8f6d16661ccffb3a795bb451afe3c64956b5f08315a38798dc7267575cda11633779875ae8f353c741bcee73e0c3234341ba0dcf
@@ -1,4 +1,5 @@
1
1
  require_relative "../blocks/block"
2
+ require_relative "ext/file"
2
3
 
3
4
  module Bake
4
5
 
@@ -9,6 +10,7 @@ module Bake
9
10
  Bake::IDEInterface.instance.set_abort(false)
10
11
  Blocks::Block.reset_block_counter
11
12
  Blocks::Block.reset_delayed_result
13
+ File.cleanupWarnings
12
14
  end
13
15
 
14
16
  end
@@ -1,96 +1,115 @@
1
- require_relative '../utils'
2
-
3
- class File
4
-
5
- SLASH = '/'
6
-
7
- def self.is_absolute?(filename)
8
- filename[0] == SLASH or filename[1] == ':'
9
- end
10
-
11
- def self.normalize(filename)
12
- if filename.length > 1
13
- toIsWindowsAbs = filename[1] == ':'
14
- return filename[0].downcase + filename[1..-1] if toIsWindowsAbs
15
- end
16
- return filename
17
- end
18
-
19
- # seems both are rel or both are abs in all cases
20
- def self.rel_from_to_project(from,to,endWithSlash = true)
21
-
22
- return nil if from.nil? or to.nil?
23
-
24
- toSplitted = to.split('/')
25
- fromSplitted = from.split('/')
26
-
27
- max = [toSplitted.length, fromSplitted.length].min
28
-
29
-
30
- return nil if max < 1
31
-
32
- i = 0
33
-
34
- # path letter in windows may be case different
35
- toIsWindowsAbs = false
36
- if toSplitted[0].length > 1 and fromSplitted[0].length > 1
37
- toIsWindowsAbs = toSplitted[0][1] == ':'
38
- i = 1 if toIsWindowsAbs and fromSplitted[0][1] == ':' and toSplitted[0][0].downcase == fromSplitted[0][0].downcase
39
- end
40
-
41
- if (toIsWindowsAbs and i==0)
42
- res = to
43
- res += "/" if endWithSlash
44
- return res
45
- end
46
-
47
- while i < max
48
- break if toSplitted[i] != fromSplitted[i]
49
- i += 1
50
- end
51
- j = i
52
-
53
- res = []
54
- while i < fromSplitted.length
55
- res << ".."
56
- i += 1
57
- end
58
-
59
- while j < toSplitted.length
60
- res << toSplitted[j]
61
- j += 1
62
- end
63
-
64
- if res.length == 0
65
- return ""
66
- end
67
-
68
- res = res.join('/')
69
- res += "/" if endWithSlash
70
- res
71
- end
72
-
73
-
74
- def self.add_prefix(prefix, file)
75
- if not prefix or is_absolute?(file)
76
- file
77
- else
78
- prefix + file
79
- end
80
- end
81
-
82
- def self.which(cmd)
83
- return "" if not cmd
84
- exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
85
- ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
86
- exts.each { |ext|
87
- exe = File.join(path, "#{cmd}#{ext}")
88
- if File.executable?(exe) && !File.directory?(exe)
89
- return File.dirname(exe.gsub(/[\\]/,'/'))
90
- end
91
- }
92
- end
93
- return ""
94
- end
95
-
96
- end
1
+ require_relative '../utils'
2
+
3
+ class File
4
+
5
+ SLASH = '/'
6
+
7
+ @@warnedCase = []
8
+
9
+ def self.cleanupWarnings
10
+ @@warnedCase.clear
11
+ end
12
+
13
+ def self.is_absolute?(filename)
14
+ filename[0] == SLASH or filename[1] == ':'
15
+ end
16
+
17
+ def self.normalize(filename)
18
+ if filename.length > 1
19
+ toIsWindowsAbs = filename[1] == ':'
20
+ return filename[0].downcase + filename[1..-1] if toIsWindowsAbs
21
+ end
22
+ return filename
23
+ end
24
+
25
+ # seems both are rel or both are abs in all cases
26
+ def self.rel_from_to_project(from,to,endWithSlash = true)
27
+
28
+ return nil if from.nil? or to.nil?
29
+
30
+ toSplitted = to.split('/')
31
+ fromSplitted = from.split('/')
32
+
33
+ max = [toSplitted.length, fromSplitted.length].min
34
+
35
+
36
+ return nil if max < 1
37
+
38
+ i = 0
39
+
40
+ # path letter in windows may be case different
41
+ toIsWindowsAbs = false
42
+ if toSplitted[0].length > 1 and fromSplitted[0].length > 1
43
+ toIsWindowsAbs = toSplitted[0][1] == ':'
44
+ i = 1 if toIsWindowsAbs and fromSplitted[0][1] == ':' and toSplitted[0][0].downcase == fromSplitted[0][0].downcase
45
+ end
46
+
47
+ if (toIsWindowsAbs and i==0)
48
+ res = to
49
+ res += "/" if endWithSlash
50
+ return res
51
+ end
52
+
53
+ while i < max
54
+ if toSplitted[i] != fromSplitted[i]
55
+ if Bake.options.verbose >= 1
56
+ if toSplitted[i].casecmp(fromSplitted[i]) == 0
57
+ if !@@warnedCase.include?(fromSplitted[0..i].join("/"))
58
+ fromsj = fromSplitted[0..i].join("/")
59
+ tosj = toSplitted[0..i].join("/")
60
+ @@warnedCase << fromsj
61
+ @@warnedCase << tosj
62
+ Bake.formatter.printWarning("Warning: different cases for folders \"#{fromsj}\" and \"#{tosj}\" detected.")
63
+ end
64
+ end
65
+ end
66
+ break
67
+ end
68
+ i += 1
69
+ end
70
+ j = i
71
+
72
+ res = []
73
+ while i < fromSplitted.length
74
+ res << ".."
75
+ i += 1
76
+ end
77
+
78
+ while j < toSplitted.length
79
+ res << toSplitted[j]
80
+ j += 1
81
+ end
82
+
83
+ if res.length == 0
84
+ return ""
85
+ end
86
+
87
+ res = res.join('/')
88
+ res += "/" if endWithSlash
89
+ res
90
+ end
91
+
92
+
93
+ def self.add_prefix(prefix, file)
94
+ if not prefix or is_absolute?(file)
95
+ file
96
+ else
97
+ prefix + file
98
+ end
99
+ end
100
+
101
+ def self.which(cmd)
102
+ return "" if not cmd
103
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
104
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
105
+ exts.each { |ext|
106
+ exe = File.join(path, "#{cmd}#{ext}")
107
+ if File.executable?(exe) && !File.directory?(exe)
108
+ return File.dirname(exe.gsub(/[\\]/,'/'))
109
+ end
110
+ }
111
+ end
112
+ return ""
113
+ end
114
+
115
+ end
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.60.0"
4
+ "2.60.2"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
@@ -326,16 +326,11 @@ module Bake
326
326
 
327
327
  block.bes.each do |dep|
328
328
  next unless Metamodel::Dependency === dep
329
- if dep.injected?
330
- difr2 = difr.select{|d| Metamodel::IncludeDir === d }
331
- diba2 = diba.select{|d| Metamodel::IncludeDir === d }
332
- else
333
- difr2 = difr
334
- diba2 = diba
335
- end
329
+ difr2 = difr.select{|d| Metamodel::IncludeDir === d || d != dep}
330
+ diba2 = diba.select{|d| Metamodel::IncludeDir === d || d != dep}
336
331
  fde = Blocks::ALL_BLOCKS[dep.name+","+dep.config]
337
332
  l1 = fde.bes.length
338
- fde.bes = (difr2 + fde.bes + diba2).uniq # .select{|d| !(Metamodel::Dependency===d) || d.name != dep.name || d.config != dep.config }
333
+ fde.bes = (difr2 + fde.bes + diba2).uniq
339
334
  fde.besDirect = (difr2 + fde.besDirect + diba2).uniq
340
335
  l2 = fde.bes.length
341
336
  counter += 1 if (l2 != l1)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.60.0
4
+ version: 2.60.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Schaal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-17 00:00:00.000000000 Z
11
+ date: 2020-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext