summaryrefslogtreecommitdiff
path: root/scripts/builder/backendBuilder.py
Side-by-side diff
Diffstat (limited to 'scripts/builder/backendBuilder.py') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/builder/backendBuilder.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/builder/backendBuilder.py b/scripts/builder/backendBuilder.py
index b4ee990..ad6595c 100755
--- a/scripts/builder/backendBuilder.py
+++ b/scripts/builder/backendBuilder.py
@@ -39,67 +39,70 @@ class BackendBuilder(object):
raise NotImplementedError()
# --------------------------------------------------------------------------
def sourceFolder (self):
return os.path.join(main.projectBaseDir() , 'backend', self.relativePath(), 'src')
def tempFolder (self):
return os.path.join(self.projectTargetDir, '.tmp', self.relativePath())
def frontEndTempFolder (self):
return self.tempFolder()
def developmentTargetFolder (self):
return os.path.join(self.projectTargetDir, 'development')
def targetFolder (self):
return os.path.join(self.projectTargetDir, self.relativePath())
# --------------------------------------------------------------------------
def writeToFolder (self, folder, filename, content):
file = open(os.path.join(folder, filename), 'w')
file.write(content.encode('utf-8'))
file.close()
- def configureIndexContent (self, indexContent, requestPathPrefix = ".."):
+# def configureIndexContent (self, indexContent, requestPathPrefix = ".."):
+ def configureIndexContent (self, indexContent):
result = indexContent
- result = result.replace( '@request.path@', requestPathPrefix + '/' + self.settings['request.path'] )
+# result = result.replace( '@request.path@', requestPathPrefix + '/' + self.settings['request.path'] )
+ result = result.replace( '@request.path@', self.settings['request.path'] )
+ result = result.replace( '@dump.path@', self.settings['dump.path'] )
result = result.replace( '@should.pay.toll@', self.settings['should.pay.toll'] )
return result
def formatMAC (self, value):
x = iter(value)
return ' '.join([reduce(add, tup) for tup in izip(x, x, x, x)])
def logChecksums (self, content, message):
md5Digest = self.formatMAC(hashlib.md5(content.encode('utf-8')).hexdigest())
shaDigest = self.formatMAC(hashlib.sha1(content.encode('utf-8')).hexdigest())
sha256Digest = self.formatMAC(hashlib.sha256(content.encode('utf-8')).hexdigest())
print "-----"
print message + ": " + md5Digest + " (md5)"
print message + ": " + shaDigest + " (sha1)"
print message + ": " + sha256Digest + " (sha256)"
print "====="
def shouldCompileCode (self):
return ('debug' in self.versions) or ('install' in self.versions)
def run (self):
print self.name() + " - RUN"
if self.shouldCompileCode():
self.compileCode()
for frontend in self.frontends: