Class: CSC
- Inherits:
-
Object
- Object
- CSC
- Defined in:
- lib/albacore/csc.rb
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#delaysign ⇒ Object
Returns the value of attribute delaysign.
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#keycontainer ⇒ Object
Returns the value of attribute keycontainer.
-
#keyfile ⇒ Object
Returns the value of attribute keyfile.
-
#main ⇒ Object
Returns the value of attribute main.
-
#optimize ⇒ Object
Returns the value of attribute optimize.
-
#output ⇒ Object
Returns the value of attribute output.
-
#target ⇒ Object
Returns the value of attribute target.
Attributes included from SupportsLinuxEnvironment
Attributes included from Logging
Attributes included from Albacore::RunCommand
Instance Method Summary collapse
- #execute ⇒ Object
- #format_resource(resource) ⇒ Object
- #get_debug_param ⇒ Object
- #get_define_params ⇒ Object
-
#initialize ⇒ CSC
constructor
A new instance of CSC.
- #main_entry ⇒ Object
Methods included from SupportsLinuxEnvironment
#format_path, #format_reference, #to_OS_format
Methods included from Configuration::CSC
#csc, cscconfig, included, #use
Methods included from Albacore::Configuration
Methods included from Configuration::NetVersion
Methods included from Failure
Methods included from Logging
#create_logger, #log_device=, #log_level, #log_level=
Methods included from Albacore::RunCommand
Methods included from AttrMethods
Methods included from Albacore::Task
clean_dirname, create_rake_task, include_config, included
Methods included from UpdateAttributes
Methods included from YAMLConfig
#configure, #load_config_by_task_name
Constructor Details
#initialize ⇒ CSC
Returns a new instance of CSC.
16 17 18 19 20 |
# File 'lib/albacore/csc.rb', line 16 def initialize @optimize = false super() update_attributes csc.to_hash end |
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def debug @debug end |
#delaysign ⇒ Object
Returns the value of attribute delaysign.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def delaysign @delaysign end |
#doc ⇒ Object
Returns the value of attribute doc.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def doc @doc end |
#keycontainer ⇒ Object
Returns the value of attribute keycontainer.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def keycontainer @keycontainer end |
#keyfile ⇒ Object
Returns the value of attribute keyfile.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def keyfile @keyfile end |
#main ⇒ Object
Returns the value of attribute main.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def main @main end |
#optimize ⇒ Object
Returns the value of attribute optimize.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def optimize @optimize end |
#output ⇒ Object
Returns the value of attribute output.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def output @output end |
#target ⇒ Object
Returns the value of attribute target.
11 12 13 |
# File 'lib/albacore/csc.rb', line 11 def target @target end |
Instance Method Details
#execute ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/albacore/csc.rb', line 22 def execute params = [] params << @references.map{|r| format_reference(r)} unless @references.nil? params << @resources.map{|r| format_resource(r)} unless @resources.nil? params << main_entry unless @main.nil? params << "\"/out:#{@output}\"" unless @output.nil? params << "/target:#{@target}" unless @target.nil? params << "/optimize+" if @optimize params << "\"/keyfile:#{@keyfile}\"" unless @keyfile.nil? params << "\"/keycontainer:#{@keycontainer}\"" unless @keycontainer.nil? params << "/delaysign+" if @delaysign params << get_debug_param unless @debug.nil? params << "/doc:#{@doc}" unless @doc.nil? params << get_define_params unless @define.nil? params << @compile.map{|f| format_path(f)} unless @compile.nil? result = run_command "CSC", params = 'CSC Failed. See Build Log For Detail' if !result end |
#format_resource(resource) ⇒ Object
64 65 66 |
# File 'lib/albacore/csc.rb', line 64 def format_resource(resource) "/res:#{resource}" end |
#get_debug_param ⇒ Object
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/albacore/csc.rb', line 49 def get_debug_param case @debug when true "/debug" when :full "/debug:full" when :pdbonly "/debug:pdbonly" end end |
#get_define_params ⇒ Object
44 45 46 47 |
# File 'lib/albacore/csc.rb', line 44 def get_define_params symbols = @define.join(";") "/define:#{symbols}" end |
#main_entry ⇒ Object
60 61 62 |
# File 'lib/albacore/csc.rb', line 60 def main_entry "/main:#{@main}" end |