diff options
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/common/deploy-rbutil.py | 4 | ||||
-rwxr-xr-x | utils/common/deploy-themeeditor.py | 1 | ||||
-rwxr-xr-x | utils/common/deploy.py | 16 |
3 files changed, 20 insertions, 1 deletions
diff --git a/utils/common/deploy-rbutil.py b/utils/common/deploy-rbutil.py index dea9f328ee..a94dfdae20 100755 --- a/utils/common/deploy-rbutil.py +++ b/utils/common/deploy-rbutil.py | |||
@@ -52,6 +52,9 @@ deploy.progexe = { | |||
52 | "darwin" : "RockboxUtility.app", | 52 | "darwin" : "RockboxUtility.app", |
53 | "linux2" : "RockboxUtility" | 53 | "linux2" : "RockboxUtility" |
54 | } | 54 | } |
55 | deploy.regreplace = { | ||
56 | "rbutil/rbutilqt/version.h" : ["SVN \$.*\$", "SVN $Revision: %REVISION% $"] | ||
57 | } | ||
55 | # OS X 10.6 defaults to gcc 4.2. Building universal binaries that are | 58 | # OS X 10.6 defaults to gcc 4.2. Building universal binaries that are |
56 | # compatible with 10.4 requires using gcc-4.0. | 59 | # compatible with 10.4 requires using gcc-4.0. |
57 | deploy.qmakespec = { | 60 | deploy.qmakespec = { |
@@ -72,4 +75,3 @@ deploy.programfiles = [ ] | |||
72 | deploy.nsisscript = "" | 75 | deploy.nsisscript = "" |
73 | 76 | ||
74 | deploy.deploy() | 77 | deploy.deploy() |
75 | |||
diff --git a/utils/common/deploy-themeeditor.py b/utils/common/deploy-themeeditor.py index 4569052e97..8b66e5aef4 100755 --- a/utils/common/deploy-themeeditor.py +++ b/utils/common/deploy-themeeditor.py | |||
@@ -35,6 +35,7 @@ deploy.progexe = { | |||
35 | "darwin" : "rbthemeeditor.app", | 35 | "darwin" : "rbthemeeditor.app", |
36 | "linux2" : "rbthemeeditor" | 36 | "linux2" : "rbthemeeditor" |
37 | } | 37 | } |
38 | deploy.regreplace = {} | ||
38 | # OS X 10.6 defaults to gcc 4.2. Building universal binaries that are | 39 | # OS X 10.6 defaults to gcc 4.2. Building universal binaries that are |
39 | # compatible with 10.4 requires using gcc-4.0. | 40 | # compatible with 10.4 requires using gcc-4.0. |
40 | deploy.qmakespec = { | 41 | deploy.qmakespec = { |
diff --git a/utils/common/deploy.py b/utils/common/deploy.py index 44635c851d..1e48f8a56f 100755 --- a/utils/common/deploy.py +++ b/utils/common/deploy.py | |||
@@ -563,6 +563,22 @@ def deploy(): | |||
563 | tempclean(workfolder, cleanup and not keeptemp) | 563 | tempclean(workfolder, cleanup and not keeptemp) |
564 | sys.exit(1) | 564 | sys.exit(1) |
565 | 565 | ||
566 | # replace version strings. Only done when building from trunk | ||
567 | if tag == "": | ||
568 | print "Updating version information in sources" | ||
569 | for f in regreplace: | ||
570 | infile = open(sourcefolder + "/" + f, "r") | ||
571 | incontents = infile.readlines() | ||
572 | infile.close() | ||
573 | |||
574 | outfile = open(sourcefolder + "/" + f, "w") | ||
575 | for line in incontents: | ||
576 | # replacements made on the replacement string: | ||
577 | # %REVISION% is replaced with the revision number | ||
578 | replacement = re.sub("%REVISION%", str(trunk), regreplace[f][1]) | ||
579 | outfile.write(re.sub(regreplace[f][0], replacement, line)) | ||
580 | outfile.close() | ||
581 | |||
566 | if source == True: | 582 | if source == True: |
567 | tf = tarfile.open(archivename, mode='w:bz2') | 583 | tf = tarfile.open(archivename, mode='w:bz2') |
568 | tf.add(sourcefolder, os.path.basename(re.subn('/$', '', sourcefolder)[0])) | 584 | tf.add(sourcefolder, os.path.basename(re.subn('/$', '', sourcefolder)[0])) |