Module: Flak::TargetFile
- Defined in:
- lib/flak/thor/target_file.rb
Class Method Summary collapse
-
.project(name, options = {}) ⇒ Object
Generate a project.yml target file according to options given by the user, usually through a wizard.
- .raia_package(name, options = {}) ⇒ Object
-
.tool(name, options = {}) ⇒ Object
Generate a tool.yml target file according to options given by the user, usually through a wizard.
Class Method Details
.project(name, options = {}) ⇒ Object
Generate a project.yml target file according to options given by the user, usually through a wizard.
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 97 |
# File 'lib/flak/thor/target_file.rb', line 68 def self.project(name,={}) h = Hash.new h['name'] = "#{name.camelize}Project" h['templates'] = ["release", "doc"] h['os_darwin64'] = {} h['os_linux64'] = {} h['os_win64'] = {} h['os_darwin64']['release_script_copy_files'] = ["resource/config/*.sh"] h['os_linux64']['release_script_copy_files'] = ["resource/config/*.sh"] h['os_win64']['release_script_copy_files'] = ["resource/config/*.BAT"] if [:maya_module] h['maya_script_copy_files'] = ["script/maya/*.mel","script/maya/*.py","script/maya/*.pyc"] h['maya_script_erb_files'] = ["script/maya/erb/*.mel.erb","script/maya/erb/*.py.erb"] h['templates'] << "maya" h['os_darwin64']['maya_modules_erb_files'] = ["resource/config/*.sh"] h['os_linux64']['maya_modules_erb_files'] = ["resource/config/*.sh"] end h['default_copy_files'] = ["LICENSE.*", "README.*"] h['package_erb_files'] = ["resource/raia/*"] YAML::dump(h) end |
.raia_package(name, options = {}) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/flak/thor/target_file.rb', line 99 def self.raia_package(name,={}) h = Hash.new h['name'] = name h['description'] = "Description goes here" h['version'] = "<%= settings[:product_revision] %>" h['documentation'] = {"html" => "<%= settings[:revision_directory] %>/doc/index.html"} h['platform'] = {"id" => "<%= settings[:platform_id] %>"} h['software_location'] = "<%= settings[:revision_directory] %>" h['requirements'] = [] if [:maya_module] h['requirements'] << {"name" => "maya", "version" => '==2012'} h['requirements'] << {"name" => "jlib", "version" => '>=0.0.7'} end h['runtimes'] = [] h['env'] ={} h['env']["#{name.upcase}_PROJECT_PATH"] = "$software_location" h['env']["MAYA_MODULE_PATH"] = "$env.MAYA_MODULE_PATH:$software_location/modules" if [:maya_module] h['env']["NUKE_PATH"] = "$env.NUKE_PATH:$software_location/nuke/scripts" if [:nuke] if [:delight] h['env']["DL_SHADERS_PATH"] = "$env.DL_SHADERS_PATH:$software_location/delight/shader" h['env']["DL_PROCEDURALS_PATH"] = "$env.DL_PROCEDURALS_PATH:$software_location/delight/procedural" end JSON.pretty_generate(h) end |
.tool(name, options = {}) ⇒ Object
Generate a tool.yml target file according to options given by the user, usually through a wizard.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/flak/thor/target_file.rb', line 28 def self.tool(name,={}) h = Hash.new maya_c_compile = true if [:maya_plugin_target] || [:maya_app_target] c_compile = true if (maya_c_compile || [:standalone_target] ) h['name'] = name.camelize h['maya_script_copy_files'] = ["maya/script/**/*.mel","maya/script/**/*.py","maya/script/**/*.pyc"] if [:maya_scripts] h['maya_scripted_plugin_copy_files'] = ["maya/script/plugin/**/*.py","maya/script/plugin/**/*.pyc"] if [:maya_scripts] h['maya_node_icon_files'] = ["maya/icons/node/*"] if [:maya_scripts] h['maya_icon_files'] = ["maya/icons/*.jpg"] if [:maya_scripts] h['maya_icon_copy_files'] = ["maya/icons/*.png","maya/icons/*.xbm","maya/icons/*.xpm"] if [:maya_scripts] h['nuke_script_copy_files'] = ["nuke/python/*.py", "nuke/gizmo/*.gizmo", "nuke/scenes/*.nk"] if [:nuke_scripts] h['include_paths'] = ["../../shared/src"] if c_compile h['include_paths'] << "../../shared/src/maya" if maya_c_compile h['libs'] = ["OpenMayaAnim","OpenMayaUI","OpenMayaRender","OpenMayaFX"] if maya_c_compile h['templates'] = [] h['templates'] << "cpp" if c_compile h['templates'] << "maya" if [:maya_scripts] h['templates'] << "maya_plugin" if [:maya_plugin_target] h['templates'] << "maya_app" if [:maya_app_target] h['templates'] << "gl" if maya_c_compile h['templates'] << "delight" if [:delight_target] h['templates'] << "nuke" if [:nuke_scripts] h['templates'] << "shell" if [:shell_scripts] h['source_files'] = [] h['source_files'] << "src/*.cpp" if c_compile h['shell_script_copy_files'] = ["shell/script/*"] if [:shell_scripts] YAML::dump(h) end |