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

Side by Side Diff: build_release.py

Issue 5924532154007552: Issue 1149 - Fix the installer version (Closed)
Patch Set: Use revision number for devbuilds and IEPLUGIN_VERSION otherwise Created Aug. 12, 2014, 9:25 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/createsolutions.bat » ('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])
52 53
53 for arch in ("ia32", "x64"): 54 for arch in ("ia32", "x64"):
54 subprocess.check_call([ 55 subprocess.check_call([
55 "msbuild", 56 "msbuild",
56 os.path.join(basedir, "build", arch, "adblockplus.sln"), 57 os.path.join(basedir, "build", arch, "adblockplus.sln"),
57 "/p:Configuration=Release", "/target:AdblockPlus;AdblockPlusEngine", 58 "/p:Configuration=Release", "/target:AdblockPlus;AdblockPlusEngine",
58 ]) 59 ])
59 60
60 sign(os.path.join(basedir, "build", arch, "Release", "AdblockPlus.dll"), 61 sign(os.path.join(basedir, "build", arch, "Release", "AdblockPlus.dll"),
61 os.path.join(basedir, "build", arch, "Release", "AdblockPlusEngine.exe")) 62 os.path.join(basedir, "build", arch, "Release", "AdblockPlusEngine.exe"))
62 63
63 installerParams = os.environ.copy() 64 installerParams = os.environ.copy()
64 installerParams["VERSION"] = version 65 installerParams["VERSION"] = version
65 subprocess.check_call(["nmake", "/A", "ia32", "x64"], env=installerParams, cwd=o s.path.join(basedir, "installer")) 66 subprocess.check_call(["nmake", "/A", "ia32", "x64"], env=installerParams, cwd=o s.path.join(basedir, "installer"))
66 sign(os.path.join(basedir, "installer", "build", "ia32", "adblockplusie-%s-multi language-ia32.msi" % version), 67 sign(os.path.join(basedir, "installer", "build", "ia32", "adblockplusie-%s-multi language-ia32.msi" % version),
67 os.path.join(basedir, "installer", "build", "x64", "adblockplusie-%s-multila nguage-x64.msi" % version)) 68 os.path.join(basedir, "installer", "build", "x64", "adblockplusie-%s-multila nguage-x64.msi" % version))
68 69
69 # If this fails, please check if InnoSetup is installed and added to you PATH 70 # If this fails, please check if InnoSetup is installed and added to you PATH
70 signparam = " ".join(map(lambda p: "$q%s$q" % p if " " in p else p, sign_command ("$f"))) 71 signparam = " ".join(map(lambda p: "$q%s$q" % p if " " in p else p, sign_command ("$f")))
71 subprocess.check_call(["iscc", "/A", "/Ssigntool=%s" % signparam, "/Dversion=%s" % version, os.path.join(basedir, "installer", "src", "innosetup-exe", "64BitTwo Arch.iss")]) 72 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/createsolutions.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld