files.py revision 3a0760a0ffbee7fe5eb72ac8f16ef9b53340fccd
# list files in directory
import os
import uuid
directory_ids = {}
file_ids = {}
indentstring = ''
indentstring += ' '
return indentstring
"""
list all files and directory recursivly
create the file_ids dictionary to be used in ComponentGroup references
"""
global file_ids
global directory_ids
# first list files within directory
wxs.write(indent(level)+ "<Component Id='component" + _id + "' Guid='" + str(uuid.uuid4()) + "' DiskId='1'>\n")
wxs.write(indent(level + 1)+ "<File Id='file" + _id + "' Name='" + file + "' DiskId='1' Source='" + file_key + "' KeyPath='yes' />\n")
# then all directories
wxs.write(indent(level) + "<Directory Id='" + directory_ids[directory_key] + "' Name='" + dir + "'>\n")
"""
add componentgroup that contain all items from file_ids that match condition
remove the matched elements from file_ids
"""
global file_ids
print "start parsing ..\..\inkscape"
# link to ProgrmMenu