xqcoretools 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/xqcoretools +29 -19
- metadata +1 -1
data/bin/xqcoretools
CHANGED
@@ -293,6 +293,25 @@ class XQCoreTools < Thor
|
|
293
293
|
end
|
294
294
|
end
|
295
295
|
|
296
|
+
def self.setChildNode(document, sibling, name, value)
|
297
|
+
children = sibling.parent.css(name)
|
298
|
+
|
299
|
+
if children.length == 0
|
300
|
+
created = Nokogiri::XML::Node.new(name, document)
|
301
|
+
created.inner_html = value
|
302
|
+
|
303
|
+
sibling.add_next_sibling(created)
|
304
|
+
|
305
|
+
return created
|
306
|
+
else
|
307
|
+
children.each do |child|
|
308
|
+
child.inner_html = value
|
309
|
+
end
|
310
|
+
|
311
|
+
return children[0]
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
296
315
|
def self.setBuildOutput(platform)
|
297
316
|
currentPath = Dir.pwd
|
298
317
|
|
@@ -311,37 +330,26 @@ class XQCoreTools < Thor
|
|
311
330
|
if parent.has_attribute?('Condition')
|
312
331
|
condition = parent.get_attribute('Condition')
|
313
332
|
|
314
|
-
|
333
|
+
regex = /\'\$\(Configuration\)\|\$\(Platform\).*\'\s\=\=\s\'(.*)\|(.*)\'/
|
334
|
+
|
335
|
+
config = condition[regex, 1]
|
336
|
+
target = condition[regex, 2]
|
315
337
|
|
316
338
|
if config != nil
|
317
|
-
binFolder = "
|
318
|
-
objFolder = "
|
339
|
+
binFolder = "..\\Binaries\\#{target}\\#{platform}\\bin\\#{config}"
|
340
|
+
objFolder = "..\\Binaries\\#{target}\\#{platform}\\obj\\#{config}"
|
319
341
|
|
320
342
|
node.inner_html = binFolder;
|
321
343
|
|
322
344
|
attachNode = node
|
323
|
-
sibling = node.next_sibling();
|
324
345
|
|
325
|
-
|
326
|
-
|
327
|
-
intermediateOutput.inner_html = objFolder
|
328
|
-
attachNode.add_next_sibling(intermediateOutput)
|
329
|
-
attachNode = intermediateOutput
|
330
|
-
end
|
331
|
-
|
332
|
-
if sibling.name != "IntermediateOutputPath"
|
333
|
-
intermediateOutput = Nokogiri::XML::Node.new('IntermediateOutputPath', document)
|
334
|
-
intermediateOutput.inner_html = objFolder
|
335
|
-
attachNode.add_next_sibling(intermediateOutput)
|
336
|
-
attachNode = intermediateOutput
|
337
|
-
end
|
346
|
+
attachNode = XQCoreTools::setChildNode(document, attachNode, 'BaseIntermediateOutputPath', objFolder)
|
347
|
+
attachNode = XQCoreTools::setChildNode(document, attachNode, 'IntermediateOutputPath', objFolder)
|
338
348
|
end
|
339
349
|
end
|
340
350
|
end
|
341
351
|
|
342
352
|
CrossPlatformCSProj::saveDocument(document, file)
|
343
|
-
|
344
|
-
puts Updated Project Files!
|
345
353
|
end
|
346
354
|
end
|
347
355
|
|
@@ -350,6 +358,8 @@ class XQCoreTools < Thor
|
|
350
358
|
XQCoreTools::setBuildOutput('Android')
|
351
359
|
XQCoreTools::setBuildOutput('iOS')
|
352
360
|
XQCoreTools::setBuildOutput('Windows')
|
361
|
+
|
362
|
+
puts 'Updated Project Files!'
|
353
363
|
end
|
354
364
|
end
|
355
365
|
|