Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: build_release.py

Issue 4660775054475264: Issue #1222 - make sure the installer version is set correctly (Closed)
Patch Set: Created Nov. 27, 2014, 1:15 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | installer/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 import sys, os, re, subprocess 3 import sys, os, re, subprocess
4 4
5 def print_usage(): 5 def print_usage():
6 print >>sys.stderr, "Usage: %s release|devbuild SIGNING_KEY_FILE" % (os.path.b asename(sys.argv[0])) 6 print >>sys.stderr, "Usage: %s release|devbuild SIGNING_KEY_FILE" % (os.path.b asename(sys.argv[0]))
7 7
8 if len(sys.argv) < 3: 8 if len(sys.argv) < 3:
9 print_usage() 9 print_usage()
10 sys.exit(1) 10 sys.exit(1)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 version = read_macro_value(os.path.join(basedir, "src", "shared", "Version.h"), "IEPLUGIN_VERSION"); 42 version = read_macro_value(os.path.join(basedir, "src", "shared", "Version.h"), "IEPLUGIN_VERSION");
43 43
44 if build_type == "devbuild": 44 if build_type == "devbuild":
45 while version.count(".") < 1: 45 while version.count(".") < 1:
46 version += ".0" 46 version += ".0"
47 buildnum = subprocess.check_output(['hg', 'id', '-R', basedir, '-n']) 47 buildnum = subprocess.check_output(['hg', 'id', '-R', basedir, '-n'])
48 buildnum = re.sub(r'\D', '', buildnum) 48 buildnum = re.sub(r'\D', '', buildnum)
49 version += ".%s" % buildnum 49 version += ".%s" % buildnum
50 50
51 subprocess.check_call([os.path.join(basedir, "createsolution.bat"), version, bui ld_type]) 51 subprocess.check_call([os.path.join(basedir, "createsolution.bat"), version, bui ld_type])
52 subprocess.check_call([os.path.join(basedir, "installer", "createsolutions.bat") , version])
53 52
54 for arch in ("ia32", "x64"): 53 for arch in ("ia32", "x64"):
55 subprocess.check_call([ 54 subprocess.check_call([
56 "msbuild", 55 "msbuild",
57 os.path.join(basedir, "build", arch, "adblockplus.sln"), 56 os.path.join(basedir, "build", arch, "adblockplus.sln"),
58 "/p:Configuration=Release", "/target:AdblockPlus;AdblockPlusEngine", 57 "/p:Configuration=Release", "/target:AdblockPlus;AdblockPlusEngine",
59 ]) 58 ])
60 59
61 sign(os.path.join(basedir, "build", arch, "Release", "AdblockPlus.dll"), 60 sign(os.path.join(basedir, "build", arch, "Release", "AdblockPlus.dll"),
62 os.path.join(basedir, "build", arch, "Release", "AdblockPlusEngine.exe")) 61 os.path.join(basedir, "build", arch, "Release", "AdblockPlusEngine.exe"))
63 62
64 installerParams = os.environ.copy() 63 installerParams = os.environ.copy()
65 installerParams["VERSION"] = version 64 installerParams["VERSION"] = version
66 subprocess.check_call(["nmake", "/A", "ia32", "x64"], env=installerParams, cwd=o s.path.join(basedir, "installer")) 65 subprocess.check_call(["nmake", "/A", "ia32", "x64"], env=installerParams, cwd=o s.path.join(basedir, "installer"))
67 sign(os.path.join(basedir, "installer", "build", "ia32", "adblockplusie-%s-multi language-ia32.msi" % version), 66 sign(os.path.join(basedir, "installer", "build", "ia32", "adblockplusie-%s-multi language-ia32.msi" % version),
68 os.path.join(basedir, "installer", "build", "x64", "adblockplusie-%s-multila nguage-x64.msi" % version)) 67 os.path.join(basedir, "installer", "build", "x64", "adblockplusie-%s-multila nguage-x64.msi" % version))
69 68
70 # If this fails, please check if InnoSetup is installed and added to you PATH 69 # If this fails, please check if InnoSetup is installed and added to you PATH
71 signparam = " ".join(map(lambda p: "$q%s$q" % p if " " in p else p, sign_command ("$f"))) 70 signparam = " ".join(map(lambda p: "$q%s$q" % p if " " in p else p, sign_command ("$f")))
72 subprocess.check_call(["iscc", "/A", "/Ssigntool=%s" % signparam, "/Dversion=%s" % version, os.path.join(basedir, "installer", "src", "innosetup-exe", "64BitTwo Arch.iss")]) 71 subprocess.check_call(["iscc", "/A", "/Ssigntool=%s" % signparam, "/Dversion=%s" % version, os.path.join(basedir, "installer", "src", "innosetup-exe", "64BitTwo Arch.iss")])
OLDNEW
« no previous file with comments | « no previous file | installer/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld