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 +4 -4
- data/lib/common/cleanup.rb +2 -0
- data/lib/common/ext/file.rb +115 -96
- data/lib/common/version.rb +1 -1
- data/lib/tocxx.rb +3 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 196c55cc08919bff9381fc2c148d1cd4ec295667eb6fa90f4af8ae3080c3b9cc
|
4
|
+
data.tar.gz: 271409c11aeb347eaf6a3d6110a9e3d4aca6ce9f45cc144324f7bbaf63e3162f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3902c531628b8cdaf2ce297b9be23b5bd1daaa7009e451797f28df16ff074624ff9c78a2599ae66590ca5fcff7d992e06ffe3e52daa4e937650134c33c2fb3dc
|
7
|
+
data.tar.gz: efb3178b80e2c48a164f1b5d8f6d16661ccffb3a795bb451afe3c64956b5f08315a38798dc7267575cda11633779875ae8f353c741bcee73e0c3234341ba0dcf
|
data/lib/common/cleanup.rb
CHANGED
@@ -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
|
data/lib/common/ext/file.rb
CHANGED
@@ -1,96 +1,115 @@
|
|
1
|
-
require_relative '../utils'
|
2
|
-
|
3
|
-
class File
|
4
|
-
|
5
|
-
SLASH = '/'
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
return
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
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
|
data/lib/common/version.rb
CHANGED
data/lib/tocxx.rb
CHANGED
@@ -326,16 +326,11 @@ module Bake
|
|
326
326
|
|
327
327
|
block.bes.each do |dep|
|
328
328
|
next unless Metamodel::Dependency === dep
|
329
|
-
|
330
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2020-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|