##// END OF EJS Templates
packaging: install and run Inno files in a build directory...
Gregory Szorc -
r43914:10454e78 default
parent child Browse files
Show More
@@ -15,7 +15,6 b' import subprocess'
15 from .py2exe import build_py2exe
15 from .py2exe import build_py2exe
16 from .util import find_vc_runtime_files
16 from .util import find_vc_runtime_files
17
17
18
19 EXTRA_PACKAGES = {
18 EXTRA_PACKAGES = {
20 'dulwich',
19 'dulwich',
21 'keyring',
20 'keyring',
@@ -43,11 +42,16 b' def build('
43 raise Exception('%s does not exist' % iscc_exe)
42 raise Exception('%s does not exist' % iscc_exe)
44
43
45 vc_x64 = r'\x64' in os.environ.get('LIB', '')
44 vc_x64 = r'\x64' in os.environ.get('LIB', '')
45 arch = 'x64' if vc_x64 else 'x86'
46 inno_source_dir = source_dir / 'contrib' / 'packaging' / 'inno'
47 inno_build_dir = build_dir / ('inno-%s' % arch)
46
48
47 requirements_txt = (
49 requirements_txt = (
48 source_dir / 'contrib' / 'packaging' / 'inno' / 'requirements.txt'
50 source_dir / 'contrib' / 'packaging' / 'inno' / 'requirements.txt'
49 )
51 )
50
52
53 inno_build_dir.mkdir(parents=True, exist_ok=True)
54
51 build_py2exe(
55 build_py2exe(
52 source_dir,
56 source_dir,
53 build_dir,
57 build_dir,
@@ -71,6 +75,10 b' def build('
71
75
72 print('creating installer')
76 print('creating installer')
73
77
78 # Copy Inno files into place.
79 for p in ('mercurial.iss', 'modpath.iss'):
80 shutil.copyfile(inno_source_dir / p, inno_build_dir / p)
81
74 args = [str(iscc_exe)]
82 args = [str(iscc_exe)]
75
83
76 if vc_x64:
84 if vc_x64:
@@ -80,6 +88,6 b' def build('
80 args.append('/dVERSION=%s' % version)
88 args.append('/dVERSION=%s' % version)
81
89
82 args.append('/Odist')
90 args.append('/Odist')
83 args.append('contrib/packaging/inno/mercurial.iss')
91 args.append(str(inno_build_dir / 'mercurial.iss'))
84
92
85 subprocess.run(args, cwd=str(source_dir), check=True)
93 subprocess.run(args, cwd=str(source_dir), check=True)
@@ -5,7 +5,7 b''
5 #define FileHandle
5 #define FileHandle
6 #define FileLine
6 #define FileLine
7 #define VERSION = "unknown"
7 #define VERSION = "unknown"
8 #if FileHandle = FileOpen(SourcePath + "\..\..\..\mercurial\__version__.py")
8 #if FileHandle = FileOpen(SourcePath + "\..\..\mercurial\__version__.py")
9 #expr FileLine = FileRead(FileHandle)
9 #expr FileLine = FileRead(FileHandle)
10 #expr FileLine = FileRead(FileHandle)
10 #expr FileLine = FileRead(FileHandle)
11 #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1)
11 #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1)
@@ -43,7 +43,7 b' AppUpdatesURL=https://mercurial-scm.org/'
43 AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
43 AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
44 AppContact=mercurial@mercurial-scm.org
44 AppContact=mercurial@mercurial-scm.org
45 DefaultDirName={pf}\Mercurial
45 DefaultDirName={pf}\Mercurial
46 SourceDir=..\..\..
46 SourceDir=..\..
47 VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
47 VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
48 VersionInfoCopyright=Copyright 2005-2019 Matt Mackall and others
48 VersionInfoCopyright=Copyright 2005-2019 Matt Mackall and others
49 VersionInfoCompany=Matt Mackall and others
49 VersionInfoCompany=Matt Mackall and others
General Comments 0
You need to be logged in to leave comments. Login now