flak 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/.yardoc/checksums +28 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/.yardopts +1 -0
- data/Architecture.md +152 -0
- data/Documenting.md +2 -0
- data/MayaModules.md +2 -0
- data/README.md +173 -0
- data/flak.gemspec +6 -3
- data/lib/core_ext/hash.rb +82 -0
- data/lib/core_ext/string.rb +41 -0
- data/lib/flak.rb +20 -12
- data/lib/flak/rake/errors.rb +28 -0
- data/lib/flak/rake/file_actions.rb +70 -0
- data/lib/flak/rake/os.rb +18 -0
- data/lib/flak/rake/target.rb +47 -69
- data/lib/flak/rake/templates/cpp.rb +211 -0
- data/lib/flak/rake/templates/delight.rb +168 -0
- data/lib/flak/rake/templates/doc.rb +106 -0
- data/lib/flak/rake/templates/environment.rb +189 -0
- data/lib/flak/rake/templates/gl.rb +20 -0
- data/lib/flak/rake/templates/mac.rb +29 -0
- data/lib/flak/rake/templates/max.rb +22 -0
- data/lib/flak/rake/templates/maya.rb +172 -0
- data/lib/flak/rake/templates/maya_app.rb +97 -0
- data/lib/flak/rake/templates/maya_plugin.rb +93 -0
- data/lib/flak/rake/templates/merge_engine.rb +45 -0
- data/lib/flak/rake/templates/nuke.rb +60 -0
- data/lib/flak/rake/templates/release.rb +101 -0
- data/lib/flak/rake/templates/shell.rb +54 -0
- data/lib/flak/thor/cli.rb +5 -0
- data/lib/flak/thor/generate.rb +88 -144
- data/lib/flak/thor/target_file.rb +36 -17
- data/lib/flak/thor/templates/INSTALL.tt +3 -3
- data/lib/flak/thor/templates/Rakefile.tt +4 -2
- data/lib/flak/thor/templates/{cpp.tt → config/cpp.yml.tt} +6 -8
- data/lib/flak/thor/templates/{delight.tt → config/delight.yml.tt} +1 -1
- data/lib/flak/thor/templates/{doc.tt → config/doc.yml.tt} +0 -0
- data/lib/flak/thor/templates/{env.tt → config/environment.yml.tt} +6 -7
- data/lib/flak/thor/templates/{gl.tt → config/gl.yml.tt} +0 -0
- data/lib/flak/thor/templates/{mac.tt → config/mac.yml.tt} +0 -0
- data/lib/flak/thor/templates/{max.tt → config/max.yml.tt} +0 -0
- data/lib/flak/thor/templates/{maya.tt → config/maya.yml.tt} +9 -1
- data/lib/flak/thor/templates/{maya_app.tt → config/maya_app.yml.tt} +0 -2
- data/lib/flak/thor/templates/{maya_plugin.tt → config/maya_plugin.yml.tt} +0 -2
- data/lib/flak/thor/templates/config/nuke.yml.tt +3 -0
- data/lib/flak/thor/templates/config/release.yml.tt +3 -0
- data/lib/flak/thor/templates/config/shell.yml.tt +1 -0
- data/lib/flak/thor/templates/doc/content/install_guide.txt.tt +71 -25
- data/lib/flak/thor/templates/maya_plugin_cpp.tt +37 -0
- data/lib/flak/thor/templates/name_cpp.tt +6 -0
- data/lib/flak/thor/templates/name_h.tt +34 -0
- data/lib/flak/thor/templates/product.sh.tt +2 -2
- data/lib/flak/thor/wizard.rb +28 -15
- data/lib/flak/version.rb +1 -1
- data/target.jpg +0 -0
- metadata +127 -94
- data/README.textile +0 -59
- data/lib/flak/rake/base.rb +0 -316
- data/lib/flak/rake/cpp.rb +0 -139
- data/lib/flak/rake/delight.rb +0 -121
- data/lib/flak/rake/doc.rb +0 -69
- data/lib/flak/rake/gl.rb +0 -10
- data/lib/flak/rake/mac.rb +0 -23
- data/lib/flak/rake/max.rb +0 -29
- data/lib/flak/rake/maya.rb +0 -142
- data/lib/flak/rake/maya_app.rb +0 -45
- data/lib/flak/rake/maya_plugin.rb +0 -47
- data/lib/flak/rake/mod.rb +0 -46
- data/lib/flak/rake/nuke.rb +0 -29
- data/lib/flak/thor/templates/mod.tt +0 -0
- data/lib/flak/thor/templates/nuke.tt +0 -2
data/lib/flak/rake/cpp.rb
DELETED
@@ -1,139 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
module Flak
|
4
|
-
|
5
|
-
# module methods in this module set up defaults when doing c++ builds
|
6
|
-
# some instance methods are provided - they will be inherited by target objects
|
7
|
-
|
8
|
-
module Cpp
|
9
|
-
|
10
|
-
|
11
|
-
def self.resolve_settings( existing_settings )
|
12
|
-
|
13
|
-
f = existing_settings[:root] + '/config/cpp.yml'
|
14
|
-
h =Flak::Base.flatten_settings(f,existing_settings[:configuration], existing_settings[:os] )
|
15
|
-
|
16
|
-
#override the build dir
|
17
|
-
h[:build_dir] = File.join("build", existing_settings[:product_revision] , existing_settings[:os], existing_settings[:configuration])
|
18
|
-
|
19
|
-
h
|
20
|
-
end
|
21
|
-
|
22
|
-
# path to target build: e.g. /hq/dev/jtools/build/2009.3/darwin/debug/jAnimal.bundle
|
23
|
-
|
24
|
-
# generate path to object build from source: e.g. /hq/dev/jtools/build/2009.3/darwin/debug/animal/sensor.o"
|
25
|
-
def object_file(source)
|
26
|
-
File.join(@settings[:build_dir], source.gsub("/src/","/").ext( @settings[:object_extension] ))
|
27
|
-
end
|
28
|
-
|
29
|
-
# collect all object files for this target
|
30
|
-
def object_files
|
31
|
-
@settings[:source_files].collect { |s| object_file(s) }
|
32
|
-
end
|
33
|
-
|
34
|
-
def c_compile_cmd(source)
|
35
|
-
compiler = "\"#{@settings[:compiler]}\""
|
36
|
-
object = "#{@settings[:object_flag]}\"#{object_file(source)}\""
|
37
|
-
source = "\"#{source}\""
|
38
|
-
inc_path = (@settings[:source_files].collect {|f| f.pathmap('%d')}.uniq | ( @settings[:include_paths] || [] )).collect { |el| "#{@settings[:include_flag]}\"#{el.to_s}\"" }.join(" ")
|
39
|
-
includes = ( @settings[:includes] || [] ).collect { |el| "-include \"#{el.to_s}\"" }.join(" ")
|
40
|
-
compiler_options = (@settings[:compiler_options] || [] ).collect { |el| el.to_s }.join(" ")
|
41
|
-
"#{compiler} #{compiler_options} #{source} #{object} #{inc_path} #{includes}"
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
def c_link_cmd
|
46
|
-
#puts "c_link_cmd" + ("*" * 10)
|
47
|
-
# puts @settings[:linker_options]
|
48
|
-
|
49
|
-
linker = "\"#{@settings[:linker]}\""
|
50
|
-
objects = object_files.collect { |el| "\"#{el.to_s}\"" }
|
51
|
-
# libstr = ((@settings[:libs] || []).collect { |el| "-l#{el.to_s}" } | (@settings[:static_libs] || []).collect { |el| "#{@settings[:static_prefix_flag]} -l#{el.to_s}" }).join(" ")
|
52
|
-
libstr = (@settings[:libs] || []).collect { |el| "#{@settings[:lib_flag]}#{el.to_s}#{@settings[:lib_ext]}" }.join(" ")
|
53
|
-
libpathstr = (@settings[:lib_paths] || []).collect { |el| "#{@settings[:libpath_flag]}\"#{el.to_s}\"" }.join(" ")
|
54
|
-
linkflagstr = ( @settings[:linker_options] || [] ).collect { |el| el.to_s }.join(" ")
|
55
|
-
dso_flagstr = (@settings[:dso_options] || [] ).collect { |el| el.to_s }.join(" ")
|
56
|
-
fwrk = (@settings[:frameworks] || [] ).collect { |el| "#{@settings[:framework_flag]} #{el.to_s}" }.join(" ")
|
57
|
-
"#{linker} #{dso_flagstr} #{linkflagstr} #{libpathstr} #{libstr} #{fwrk} #{@settings[:outputfile_flag]}\"#{filename}\" #{objects}"
|
58
|
-
end
|
59
|
-
|
60
|
-
def c_clean_cmd
|
61
|
-
objects = object_files.collect { |el| "\"#{el.to_s}\"" }
|
62
|
-
"rm -f \"#{filename}\" #{objects}"
|
63
|
-
end
|
64
|
-
|
65
|
-
|
66
|
-
def target_release_path
|
67
|
-
File.join( @settings[:versioned_os_release_path], @settings[:target_release_prefix], self.filename.pathmap('%f'))
|
68
|
-
end
|
69
|
-
|
70
|
-
def cpp_instance_tasks
|
71
|
-
files = @settings[:source_files]
|
72
|
-
unless files.nil?
|
73
|
-
|
74
|
-
# file tasks to compile objects from sources
|
75
|
-
######################################################
|
76
|
-
files.each do |f|
|
77
|
-
object = object_file(f)
|
78
|
-
file object => f do |t|
|
79
|
-
Flak::Base.make_dir_for(object)
|
80
|
-
|
81
|
-
sh c_compile_cmd(f)
|
82
|
-
end
|
83
|
-
header = f.ext('h')
|
84
|
-
file object => header if File.exists?(header)
|
85
|
-
end
|
86
|
-
######################################################
|
87
|
-
|
88
|
-
# file tasks to link targets
|
89
|
-
######################################################
|
90
|
-
objects = object_files
|
91
|
-
file self.filename => objects do
|
92
|
-
Flak::Base.make_dir_for(self.filename)
|
93
|
-
sh c_link_cmd
|
94
|
-
end
|
95
|
-
|
96
|
-
namespace @settings[:name].to_sym do
|
97
|
-
desc "build the #{@settings[:name].to_sym} binary"
|
98
|
-
task :build => self.filename # add named target
|
99
|
-
end
|
100
|
-
task :build => "#{@settings[:name].to_sym}:build"
|
101
|
-
######################################################
|
102
|
-
|
103
|
-
# tasks to clean the build
|
104
|
-
######################################################
|
105
|
-
namespace @settings[:name].to_sym do
|
106
|
-
desc "clean the #{@settings[:name].to_sym} build files"
|
107
|
-
task :clean do
|
108
|
-
sh c_clean_cmd
|
109
|
-
end
|
110
|
-
end
|
111
|
-
task :clean => "#{@settings[:name].to_sym}:clean"
|
112
|
-
######################################################
|
113
|
-
|
114
|
-
# plugins and executables release tasks
|
115
|
-
######################################################
|
116
|
-
released_binary = self.target_release_path
|
117
|
-
file released_binary => self.filename do
|
118
|
-
Flak::Base.make_dir_for(released_binary)
|
119
|
-
rm_r released_binary if File.exists?(released_binary)
|
120
|
-
cp self.filename, released_binary
|
121
|
-
File.chmod 0755, released_binary
|
122
|
-
end
|
123
|
-
|
124
|
-
namespace @settings[:name].to_sym do
|
125
|
-
task :release => released_binary
|
126
|
-
end
|
127
|
-
task :release => "#{@settings[:name].to_sym}:release"
|
128
|
-
######################################################
|
129
|
-
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
|
139
|
-
|
data/lib/flak/rake/delight.rb
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
|
2
|
-
module Flak
|
3
|
-
|
4
|
-
module Delight
|
5
|
-
|
6
|
-
# to resolve settings for a template, we have access to the full hash of existing settings
|
7
|
-
# so that we may use, for example, some existing paths to build new paths for this object.
|
8
|
-
# in the first place, we call flatten_settings with the configuration and os, which
|
9
|
-
# definitely already exist.
|
10
|
-
def self.resolve_settings( existing_settings )
|
11
|
-
|
12
|
-
f = existing_settings[:root] + '/config/delight.yml'
|
13
|
-
h =Flak::Base.flatten_settings(f,existing_settings[:configuration], existing_settings[:os] )
|
14
|
-
|
15
|
-
versioned_location = File.join("#{h[:delight_location]}-#{h[:delight_version]}")
|
16
|
-
|
17
|
-
h[:lib_paths] = [ File.join(versioned_location, "lib" ) ]
|
18
|
-
h[:include_paths] = [ File.join(versioned_location, "include") ]
|
19
|
-
h[:shader_compiler] = File.join(versioned_location, "bin","shaderdl")
|
20
|
-
h[:shader_build_dir] = existing_settings[:build_dir]
|
21
|
-
h[:libs] = ["3delight"]
|
22
|
-
h[:shader_include_paths] = [File.join(versioned_location, "maya","rsl") ]
|
23
|
-
|
24
|
-
h
|
25
|
-
end
|
26
|
-
|
27
|
-
# all shader build files
|
28
|
-
def shader_files()
|
29
|
-
@settings[:sl_files].collect { |f| shader_file(f) }
|
30
|
-
end
|
31
|
-
|
32
|
-
|
33
|
-
# path to shader build: e.g. /hq/dev/jtools/build/2009.3/darwin/debug/goosebump.sdl
|
34
|
-
def shader_file(source)
|
35
|
-
File.join(@settings[:shader_build_dir], source.gsub("/src/","/").ext('sdl'))
|
36
|
-
end
|
37
|
-
|
38
|
-
def shader_release_path(file)
|
39
|
-
File.join(@settings[:versioned_os_release_path] , @settings[:shader_release_prefix], file.pathmap('%f'))
|
40
|
-
end
|
41
|
-
|
42
|
-
def delight_shader_compile_cmd(dest,src)
|
43
|
-
include_path_string = (@settings[:sl_files].collect {|f| f.pathmap('%d')}.uniq | ( @settings[:shader_include_paths] || [] )).collect { |el| "-I#{el.to_s}" }.join(" ")
|
44
|
-
shader_type_string = "-DSHADER_TYPE_#{src.pathmap('%d').pathmap('%f')}"
|
45
|
-
"#{@settings[:shader_compiler]} #{shader_type_string} #{include_path_string} -d #{dest} #{src}"
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
def delight_clean_cmd
|
50
|
-
"rm -f #{shader_files}"
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
def delight_instance_tasks
|
55
|
-
# delight shader build and release tasks
|
56
|
-
######################################################
|
57
|
-
files = @settings[:sl_files]
|
58
|
-
unless files.nil?
|
59
|
-
|
60
|
-
files.each do |f|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
# file tasks to build shader from sources
|
65
|
-
######################################################
|
66
|
-
target_shader = shader_file(f)
|
67
|
-
file target_shader => f do |t|
|
68
|
-
dest = Flak::Base.make_dir_for(target_shader)
|
69
|
-
sh delight_shader_compile_cmd(dest,f)
|
70
|
-
end
|
71
|
-
|
72
|
-
namespace @settings[:name].to_sym do
|
73
|
-
desc "build the #{@settings[:name].to_sym} delight shaader"
|
74
|
-
task :build => target_shader
|
75
|
-
end
|
76
|
-
task :build => "#{@settings[:name].to_sym}:build"
|
77
|
-
######################################################
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
# file tasks to release shaders
|
82
|
-
######################################################
|
83
|
-
released_shader = shader_release_path(target_shader)
|
84
|
-
file released_shader => target_shader do
|
85
|
-
Flak::Base.make_dir_for(released_shader)
|
86
|
-
cp target_shader, released_shader
|
87
|
-
end
|
88
|
-
|
89
|
-
namespace @settings[:name].to_sym do
|
90
|
-
task :release => released_shader
|
91
|
-
end
|
92
|
-
task :release => "#{@settings[:name].to_sym}:release"
|
93
|
-
######################################################
|
94
|
-
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
|
-
|
99
|
-
# task to clean the build files
|
100
|
-
######################################################
|
101
|
-
namespace @settings[:name].to_sym do
|
102
|
-
desc "clean the #{@settings[:name].to_sym} build files"
|
103
|
-
task :clean do
|
104
|
-
sh delight_clean_cmd
|
105
|
-
end
|
106
|
-
end
|
107
|
-
task :clean => "#{@settings[:name].to_sym}:clean"
|
108
|
-
######################################################
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
data/lib/flak/rake/doc.rb
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
module Flak
|
4
|
-
|
5
|
-
module Doc
|
6
|
-
|
7
|
-
def self.resolve_settings( existing_settings )
|
8
|
-
|
9
|
-
f = existing_settings[:root] + '/config/doc.yml'
|
10
|
-
h =Flak::Base.flatten_settings(f,existing_settings[:configuration], existing_settings[:os] )
|
11
|
-
|
12
|
-
h
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
def default_hash(item)
|
17
|
-
{
|
18
|
-
:title => "#{@settings[:product_name].capitalize} #{item[:type]}",
|
19
|
-
:description=> "#{@settings[:product_name].capitalize} #{@settings[:product_revision]} #{item[:type]}",
|
20
|
-
:author=> @settings[:author_name],
|
21
|
-
:email=> @settings[:author_email],
|
22
|
-
:created_at => Time.now.strftime("%d %B %Y")
|
23
|
-
}
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
|
-
def plug_metadata(site)
|
28
|
-
|
29
|
-
site.items.each do |item|
|
30
|
-
unless item.binary?
|
31
|
-
item[:type] = "Index" if item.identifier == "/"
|
32
|
-
item[:type] = "Release Notes" if item.identifier == "/release_notes/"
|
33
|
-
item.attributes= default_hash(item).merge(item.attributes)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
|
39
|
-
def doc_instance_tasks
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
desc "Release documentation"
|
45
|
-
task :doc do
|
46
|
-
docroot = File.join(@settings[:root],'doc')
|
47
|
-
Dir.chdir(docroot) do |d|
|
48
|
-
site = Nanoc::Site.new(YAML.load_file('config.yaml'))
|
49
|
-
site.config[:output_dir] = @settings[:doc_release_root]
|
50
|
-
plug_metadata(site)
|
51
|
-
puts "Compiling site..."
|
52
|
-
site.compile
|
53
|
-
puts "Done... ;)"
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
namespace :doc do
|
58
|
-
desc "Build and tar up documentation to tar.gz."
|
59
|
-
task :tar => :doc do
|
60
|
-
Dir.chdir( @settings[:target_release_path] ) do |d|
|
61
|
-
sh "tar cfz #{@settings[:product_name]}-#{@settings[:product_revision]}-doc.tar.gz #{@settings[:product_name]}/#{@settings[:product_revision]}-doc"
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
data/lib/flak/rake/gl.rb
DELETED
data/lib/flak/rake/mac.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
module Flak
|
5
|
-
|
6
|
-
module Mac
|
7
|
-
|
8
|
-
|
9
|
-
def self.resolve_settings( existing_settings )
|
10
|
-
|
11
|
-
f = existing_settings[:root] + '/config/mac.yml'
|
12
|
-
h =Flak::Base.flatten_settings(f,existing_settings[:configuration], existing_settings[:os] )
|
13
|
-
|
14
|
-
h
|
15
|
-
end
|
16
|
-
|
17
|
-
def mac_app_release_path(file)
|
18
|
-
File.join(@settings[:versioned_os_release_path], 'bin', "#{file.pathmap('%f').pathmap('%X')}-#{@settings[:product_revision]}#{file.pathmap('%x')}")
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
data/lib/flak/rake/max.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
module Flak
|
5
|
-
|
6
|
-
module Max
|
7
|
-
|
8
|
-
def self.resolve_settings( existing_settings )
|
9
|
-
|
10
|
-
f = existing_settings[:root] + '/config/max.yml'
|
11
|
-
h =Flak::Base.flatten_settings(f,existing_settings[:configuration], existing_settings[:os] )
|
12
|
-
|
13
|
-
case existing_settings[:os]
|
14
|
-
when /linux_64/
|
15
|
-
h[:nuke_location] = ""
|
16
|
-
when /darwin/
|
17
|
-
h[:nuke_location] = ""
|
18
|
-
when /win_64/
|
19
|
-
h[:nuke_location] = ""
|
20
|
-
end
|
21
|
-
h
|
22
|
-
end
|
23
|
-
|
24
|
-
def max_script_release_path(file)
|
25
|
-
File.join(@settings[:versioned_os_release_path], 'max', 'scripts', file.pathmap('%f'))
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
data/lib/flak/rake/maya.rb
DELETED
@@ -1,142 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
module Flak
|
5
|
-
|
6
|
-
module Maya
|
7
|
-
|
8
|
-
|
9
|
-
def self.resolve_settings( existing_settings )
|
10
|
-
|
11
|
-
f = existing_settings[:root] + '/config/maya.yml'
|
12
|
-
h =Flak::Base.flatten_settings(f,existing_settings[:configuration], existing_settings[:os] )
|
13
|
-
|
14
|
-
maya_string =''
|
15
|
-
case existing_settings[:os]
|
16
|
-
when /linux_64/
|
17
|
-
maya_string = "maya#{h[:maya_version]}-x64"
|
18
|
-
when /darwin/
|
19
|
-
maya_string = "maya#{h[:maya_version]}"
|
20
|
-
when /win_64/
|
21
|
-
maya_string = "Maya#{h[:maya_version]}"
|
22
|
-
end
|
23
|
-
|
24
|
-
h[:maya_location] = File.join(h[:autodesk_location],maya_string)
|
25
|
-
h[:maya_release_path] = File.join(existing_settings[:versioned_os_release_path],'maya' )
|
26
|
-
h
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
def maya_script_release_path(file)
|
31
|
-
File.join(@settings[:maya_release_path] , 'scripts', file.pathmap('%f'))
|
32
|
-
end
|
33
|
-
|
34
|
-
def maya_icon_release_path(file)
|
35
|
-
File.join(@settings[:maya_release_path] ,'icons', file.pathmap('%f'))
|
36
|
-
end
|
37
|
-
|
38
|
-
def maya_scripted_plugin_release_path(file)
|
39
|
-
File.join(@settings[:maya_release_path] , 'plug-ins' , file.pathmap('%f'))
|
40
|
-
end
|
41
|
-
|
42
|
-
def maya_precompiled_plugin_release_path(file)
|
43
|
-
File.join(@settings[:maya_release_path] , 'plug-ins' , file.pathmap('%f'))
|
44
|
-
end
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
# if a command exists to do the conversion - make a file task for each of icon and out_icon
|
49
|
-
# that is - one for the hypershade and one for the outliner
|
50
|
-
def maya_instance_tasks
|
51
|
-
namespace @settings[:name].to_sym do
|
52
|
-
|
53
|
-
|
54
|
-
if ( @settings.has_key?(:dg_convert_cmd ) && @settings.has_key?(:outliner_convert_cmd ) )
|
55
|
-
files = @settings[:maya_node_icon_files]
|
56
|
-
unless files.nil?
|
57
|
-
|
58
|
-
# file tasks to convert icons for outliner and hypershade
|
59
|
-
######################################################
|
60
|
-
files.each do |f|
|
61
|
-
|
62
|
-
icon_release = File.join(@settings[:maya_release_path] , 'icons', f.pathmap('%f').ext('xpm'))
|
63
|
-
out_icon_release = File.join(@settings[:maya_release_path] , 'icons', "out_#{f.pathmap('%f').ext('xpm')}" )
|
64
|
-
|
65
|
-
icon = File.join("build", @settings[:product_revision] , 'icons', f.pathmap('%f').ext('xpm'))
|
66
|
-
out_icon = File.join("build", @settings[:product_revision], 'icons', "out_#{f.pathmap('%f').ext('xpm')}" )
|
67
|
-
|
68
|
-
|
69
|
-
file icon => f do |t|
|
70
|
-
Flak::Base.make_dir_for(icon)
|
71
|
-
cmd = "#{@settings[:dg_convert_cmd]} #{f} #{icon}"
|
72
|
-
sh cmd
|
73
|
-
end
|
74
|
-
|
75
|
-
# dry this up
|
76
|
-
file out_icon => f do |t|
|
77
|
-
Flak::Base.make_dir_for(out_icon)
|
78
|
-
cmd = "#{@settings[:outliner_convert_cmd]} #{f} #{out_icon}"
|
79
|
-
sh cmd
|
80
|
-
end
|
81
|
-
|
82
|
-
file icon_release => icon do |t|
|
83
|
-
Flak::Base.make_dir_for(icon_release)
|
84
|
-
cp icon, icon_release
|
85
|
-
end
|
86
|
-
|
87
|
-
file out_icon_release => out_icon do |t|
|
88
|
-
Flak::Base.make_dir_for(out_icon_release)
|
89
|
-
cp out_icon, out_icon_release
|
90
|
-
end
|
91
|
-
|
92
|
-
task :release =>[ icon_release , out_icon_release]
|
93
|
-
end
|
94
|
-
######################################################
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
if ( @settings.has_key?(:maya_convert_cmd ) )
|
101
|
-
files = @settings[:maya_icon_files]
|
102
|
-
unless files.nil?
|
103
|
-
|
104
|
-
# file tasks to convert icons for outliner and hypershade
|
105
|
-
######################################################
|
106
|
-
files.each do |f|
|
107
|
-
|
108
|
-
icon_release = File.join(@settings[:maya_release_path] , 'icons', f.pathmap('%f').ext('xpm'))
|
109
|
-
|
110
|
-
icon = File.join("build", @settings[:product_revision] , 'icons', f.pathmap('%f').ext('xpm'))
|
111
|
-
|
112
|
-
|
113
|
-
file icon => f do |t|
|
114
|
-
Flak::Base.make_dir_for(icon)
|
115
|
-
cmd = "#{@settings[:maya_convert_cmd]} #{f} #{icon}"
|
116
|
-
sh cmd
|
117
|
-
end
|
118
|
-
|
119
|
-
|
120
|
-
file icon_release => icon do |t|
|
121
|
-
Flak::Base.make_dir_for(icon_release)
|
122
|
-
cp icon, icon_release
|
123
|
-
end
|
124
|
-
|
125
|
-
|
126
|
-
task :release =>[ icon_release ]
|
127
|
-
end
|
128
|
-
######################################################
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
|
133
|
-
end
|
134
|
-
end
|
135
|
-
################################################################################
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|