3 # Simple script to generate the resource file
4 # So far only png images are considered
10 subdirs = ['flags','icons']
12 content = "<!DOCTYPE RCC><RCC version=\"1.0\">\n"
13 content << " <qresource>\n"
15 Find.find(dir) do |path|
16 # Create alias using the name of the subdir within dir
17 abs_path = Pathname.new( File.expand_path( path) )
18 root_path = Pathname.new( File.expand_path( dir ) )
19 rel_path = abs_path.relative_path_from( root_path )
22 content << " <file alias=\"#{rel_path.to_s}\">#{path}</file>\n"
26 content << " </qresource>"
29 File.write(outfile, content)