Diffstat (limited to 'scripts/builder/backendBuilder.py') (more/less context) (ignore whitespace changes)
-rw-r--r-- | scripts/builder/backendBuilder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/builder/backendBuilder.py b/scripts/builder/backendBuilder.py index f5dc7b2..16dbe2f 100644 --- a/scripts/builder/backendBuilder.py +++ b/scripts/builder/backendBuilder.py | |||
@@ -1,49 +1,49 @@ | |||
1 | #!/usr/bin/python | 1 | #!/usr/bin/env python |
2 | # -*- coding: UTF-8 -*- | 2 | # -*- coding: UTF-8 -*- |
3 | 3 | ||
4 | import sys, os, json | 4 | import sys, os, json |
5 | import shutil | 5 | import shutil |
6 | import main | 6 | import main |
7 | import hashlib | 7 | import hashlib |
8 | 8 | ||
9 | class BackendBuilder: | 9 | class BackendBuilder: |
10 | 10 | ||
11 | def __init__ (self, projectTargetDir, frontends, versions, settings): | 11 | def __init__ (self, projectTargetDir, frontends, versions, settings): |
12 | self.projectTargetDir = projectTargetDir | 12 | self.projectTargetDir = projectTargetDir |
13 | self.frontends = frontends | 13 | self.frontends = frontends |
14 | self.versions = versions | 14 | self.versions = versions |
15 | self.settings = settings | 15 | self.settings = settings |
16 | 16 | ||
17 | def name (self): | 17 | def name (self): |
18 | raise NotImplementedError() | 18 | raise NotImplementedError() |
19 | 19 | ||
20 | def relativePath (self): | 20 | def relativePath (self): |
21 | raise NotImplementedError() | 21 | raise NotImplementedError() |
22 | 22 | ||
23 | def compileCode (self): | 23 | def compileCode (self): |
24 | pass | 24 | pass |
25 | 25 | ||
26 | def copyCompiledCodeToTargetDir (self): | 26 | def copyCompiledCodeToTargetDir (self): |
27 | src = self.sourceFolder() | 27 | src = self.sourceFolder() |
28 | dst = self.targetFolder() | 28 | dst = self.targetFolder() |
29 | main.createFolder(os.path.dirname(dst)) | 29 | main.createFolder(os.path.dirname(dst)) |
30 | shutil.copytree(src, dst) | 30 | shutil.copytree(src, dst) |
31 | 31 | ||
32 | def sourceFolder (self): | 32 | def sourceFolder (self): |
33 | return main.projectBaseDir() + '/backend/' + self.relativePath() + '/src' | 33 | return main.projectBaseDir() + '/backend/' + self.relativePath() + '/src' |
34 | 34 | ||
35 | 35 | ||
36 | def targetFolder (self): | 36 | def targetFolder (self): |
37 | return self.projectTargetDir + self.relativePath() | 37 | return self.projectTargetDir + self.relativePath() |
38 | 38 | ||
39 | def createTargetFolder (self): | 39 | def createTargetFolder (self): |
40 | main.createFolder(self.targetFolder()) | 40 | main.createFolder(self.targetFolder()) |
41 | 41 | ||
42 | 42 | ||
43 | #def copyFrontendResources (self, frontend): | 43 | #def copyFrontendResources (self, frontend): |
44 | # print "copying resources for frontend: " + frontend | 44 | # print "copying resources for frontend: " + frontend |
45 | # print "SETTINGS: " + str(self.settings) | 45 | # print "SETTINGS: " + str(self.settings) |
46 | 46 | ||
47 | 47 | ||
48 | def writeToTargetFolder (self, filename, content): | 48 | def writeToTargetFolder (self, filename, content): |
49 | file = open(self.targetFolder() + '/' + filename, 'w') | 49 | file = open(self.targetFolder() + '/' + filename, 'w') |