Class: Rake::Delphi::PAClientTask
- Defined in:
- lib/rake/delphi/paclient.rb
Instance Attribute Summary collapse
-
#dccTask ⇒ Object
readonly
Returns the value of attribute dccTask.
-
#deploymentfiles ⇒ Object
readonly
Returns the value of attribute deploymentfiles.
-
#noclean ⇒ Object
for debugging.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
Attributes inherited from Task
Instance Method Summary collapse
- #execute(args = nil) ⇒ Object
-
#initialize(name, application) ⇒ PAClientTask
constructor
A new instance of PAClientTask.
- #needed=(value) ⇒ Object
Methods inherited from Task
#execute_base, #initialize_base, #needed?, #out, #reenable_chain, #shortname, #trace?
Constructor Details
#initialize(name, application) ⇒ PAClientTask
Returns a new instance of PAClientTask.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rake/delphi/paclient.rb', line 23 def initialize(name, application) super @last_put_arg_index = 0 @suffix = 'AndroidPackage' @manifest = application.define_task(AndroidManifestTask, shortname + ':manifest') enhance([@manifest]) self.needed = false dccTaskName = name.gsub(/:post$/, '') @dccTask = application[dccTaskName] @deploymentfiles = nil end |
Instance Attribute Details
#dccTask ⇒ Object (readonly)
Returns the value of attribute dccTask.
18 19 20 |
# File 'lib/rake/delphi/paclient.rb', line 18 def dccTask @dccTask end |
#deploymentfiles ⇒ Object (readonly)
Returns the value of attribute deploymentfiles.
20 21 22 |
# File 'lib/rake/delphi/paclient.rb', line 20 def deploymentfiles @deploymentfiles end |
#noclean ⇒ Object
for debugging
21 22 23 |
# File 'lib/rake/delphi/paclient.rb', line 21 def noclean @noclean end |
#suffix ⇒ Object
Returns the value of attribute suffix.
19 20 21 |
# File 'lib/rake/delphi/paclient.rb', line 19 def suffix @suffix end |
Instance Method Details
#execute(args = nil) ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/rake/delphi/paclient.rb', line 230 def execute(args = nil) super paclientTool = PAClientTool.new paclientTool.class.checkToolFailure(paclientTool.toolpath) exe_cmd = Rake.quotepath('', paclientTool.toolpath) _source = @dccTask.dpr ChDir.new(self, File.dirname(_source)) do |dir| RakeFileUtils.verbose(Logger.debug?) do @last_put_arg_index = 0 steps.each do |step| args = build_args(paclientTool, step) args.compact! sh exe_cmd + args.join(' ') end output_platform = File.(@dccTask.exeoutput, '-u') mv output_platform.pathmap('%p%s') + @suffix + _source.pathmap('%s%n.apk'), output_platform end end # reset files (for reusage, mainly in tests) @deploymentfiles = nil end |
#needed=(value) ⇒ Object
35 36 37 38 |
# File 'lib/rake/delphi/paclient.rb', line 35 def needed=(value) super @manifest.needed = value end |