author | Josh <jokajak@gmail.com> | 2012-03-17 19:29:33 (UTC) |
---|---|---|
committer | Josh <jokajak@gmail.com> | 2012-03-17 19:29:33 (UTC) |
commit | 0e396afdc4aa9ec8734ba48f90e9fefbad3b2b33 (patch) (unidiff) | |
tree | 2ace8ec32d24c1d34b4578fe9297c4e4b4b97720 /scripts/builder/backendBuilder.py | |
parent | ff33328861685c1a2d5f9b729a2b3595509c38ee (diff) | |
parent | 6f7ead0446aae6dd9f40b183e402b059a33d0517 (diff) | |
download | clipperz-0e396afdc4aa9ec8734ba48f90e9fefbad3b2b33.zip clipperz-0e396afdc4aa9ec8734ba48f90e9fefbad3b2b33.tar.gz clipperz-0e396afdc4aa9ec8734ba48f90e9fefbad3b2b33.tar.bz2 |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'scripts/builder/backendBuilder.py') (more/less context) (ignore whitespace changes)
-rw-r--r-- | scripts/builder/backendBuilder.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/builder/backendBuilder.py b/scripts/builder/backendBuilder.py index 3e61955..5b91678 100644 --- a/scripts/builder/backendBuilder.py +++ b/scripts/builder/backendBuilder.py | |||
@@ -82,37 +82,50 @@ class BackendBuilder(object): | |||
82 | 82 | ||
83 | def shouldCompileCode (self): | 83 | def shouldCompileCode (self): |
84 | return ('debug' in self.versions) or ('install' in self.versions) | 84 | return ('debug' in self.versions) or ('install' in self.versions) |
85 | 85 | ||
86 | 86 | ||
87 | def run (self): | 87 | def run (self): |
88 | print self.name() + " - RUN" | 88 | print self.name() + " - RUN" |
89 | 89 | ||
90 | if self.shouldCompileCode(): | 90 | if self.shouldCompileCode(): |
91 | self.compileCode() | 91 | self.compileCode() |
92 | 92 | ||
93 | for frontend in self.frontends: | 93 | for frontend in self.frontends: |
94 | if (frontend.module == frontend.submodule): | ||
95 | submoduleExtension = '' | ||
96 | else: | ||
97 | submoduleExtension = '.' + frontend.submodule | ||
98 | |||
94 | main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module)) | 99 | main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module)) |
95 | 100 | ||
96 | if 'debug' in self.versions: | 101 | if 'debug' in self.versions: |
97 | frontend.copyResourcesToFolder(self.frontEndTempFolder()) | 102 | frontend.copyResourcesToFolder(self.frontEndTempFolder()) |
98 | 103 | ||
99 | index = self.configureIndexContent(frontend.assemble(assemblyMode='DEBUG', versionType='DEBUG')) | 104 | index = self.configureIndexContent(frontend.assemble(assemblyMode='DEBUG', versionType='DEBUG')) |
100 | self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index_debug.html'), index) | 105 | self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index_debug' + submoduleExtension + '.html'), index) |
101 | 106 | ||
102 | if 'install' in self.versions: | 107 | if 'install' in self.versions: |
103 | index = self.configureIndexContent(frontend.assemble()) | 108 | index = self.configureIndexContent(frontend.assemble()) |
104 | self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index.html'), index) | 109 | self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index) |
105 | 110 | ||
106 | self.logChecksums(index, "[" + self.name() + " - " + frontend.module + "] index.html checksum") | 111 | self.logChecksums(index, "[" + self.name() + " - " + frontend.module + "] index" + submoduleExtension + ".html checksum") |
107 | 112 | ||
108 | self.createPackage() | 113 | self.createPackage() |
109 | 114 | ||
110 | if 'development' in self.versions: | 115 | if 'development' in self.versions: |
111 | for frontend in self.frontends: | 116 | for frontend in self.frontends: |
117 | if (frontend.module == frontend.submodule): | ||
118 | submoduleExtension = '' | ||
119 | else: | ||
120 | submoduleExtension = '.' + frontend.submodule | ||
121 | |||
122 | print "FRONTEND module: " + frontend.module | ||
123 | print "FRONTEND submodule: " + frontend.submodule | ||
124 | |||
112 | main.createFolder(os.path.join(self.developmentTargetFolder(), frontend.module)) | 125 | main.createFolder(os.path.join(self.developmentTargetFolder(), frontend.module)) |
113 | 126 | ||
114 | index = self.configureIndexContent(frontend.assemble(assemblyMode='DEVELOPMENT', versionType='DEBUG'), self.settings['development.settings']['url']) | 127 | index = self.configureIndexContent(frontend.assemble(assemblyMode='DEVELOPMENT', versionType='DEBUG'), self.settings['development.settings']['url']) |
115 | self.writeToFolder(self.developmentTargetFolder(), os.path.join(frontend.module, 'index.html'), index) | 128 | self.writeToFolder(self.developmentTargetFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index) |
116 | 129 | ||
117 | 130 | ||
118 | #=================================================================== | 131 | #=================================================================== |