~izidor/gtg/small_features

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Izidor Matušov
  • Date: 2012-07-13 14:18:17 UTC
  • mfrom: (1201.2.5 integrate-mallard-doc)
  • Revision ID: izidor.matusov@gmail.com-20120713141817-1vs2ey7e3l14a5dn
Integrate mallard doc, thanks for awesome work Radina & Bertrand

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
### CONSTANTS ################################################################
31
31
 
32
32
DATA_DIR        = "share/gtg"
 
33
HELP_DIR        = "share/help"
33
34
GLOBAL_ICON_DIR = "share/icons/hicolor"
34
35
 
35
36
### TOOLS ####################################################################
47
48
            fileList.append((os.path.join(DATA_DIR, newroot), dirList))
48
49
    return fileList
49
50
 
 
51
def create_userdoc_list():
 
52
    fileList = []
 
53
    rootdir  = "doc/userdoc"
 
54
    for root, subFolders, files in os.walk(rootdir):
 
55
        dirList = []
 
56
        for file in files:
 
57
            dirList.append(os.path.join(root, file))
 
58
        if len(dirList)!=0:
 
59
            comps = root.split(os.sep)
 
60
            prefix = os.path.join(comps[0], comps[1], comps[2])+os.sep
 
61
            if root != prefix[:-1]:
 
62
                newroot = root.replace(prefix, "")
 
63
            else:
 
64
                newroot = ""
 
65
            newroot = os.path.join( HELP_DIR, comps[2], "gtg", newroot)
 
66
            fileList.append((newroot, dirList))
 
67
    return fileList
50
68
 
51
69
def create_data_files():
52
70
    data_files = []
64
82
                       ['data/icons/hicolor/32x32/apps/gtg.png']))
65
83
    data_files.append(('share/icons/hicolor/scalable/apps', \
66
84
                       ['data/icons/hicolor/scalable/apps/gtg.svg']))
 
85
    # documentation
 
86
    helpfiles = create_userdoc_list()
 
87
    data_files.extend(helpfiles)
67
88
    # misc
68
89
    data_files.append(('share/applications', ['gtg.desktop']))
69
90
    data_files.append(('share/dbus-1/services', ['org.gnome.GTG.service']))