##// 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 15 from .py2exe import build_py2exe
16 16 from .util import find_vc_runtime_files
17 17
18
19 18 EXTRA_PACKAGES = {
20 19 'dulwich',
21 20 'keyring',
@@ -43,11 +42,16 b' def build('
43 42 raise Exception('%s does not exist' % iscc_exe)
44 43
45 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 49 requirements_txt = (
48 50 source_dir / 'contrib' / 'packaging' / 'inno' / 'requirements.txt'
49 51 )
50 52
53 inno_build_dir.mkdir(parents=True, exist_ok=True)
54
51 55 build_py2exe(
52 56 source_dir,
53 57 build_dir,
@@ -71,6 +75,10 b' def build('
71 75
72 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 82 args = [str(iscc_exe)]
75 83
76 84 if vc_x64:
@@ -80,6 +88,6 b' def build('
80 88 args.append('/dVERSION=%s' % version)
81 89
82 90 args.append('/Odist')
83 args.append('contrib/packaging/inno/mercurial.iss')
91 args.append(str(inno_build_dir / 'mercurial.iss'))
84 92
85 93 subprocess.run(args, cwd=str(source_dir), check=True)
@@ -5,7 +5,7 b''
5 5 #define FileHandle
6 6 #define FileLine
7 7 #define VERSION = "unknown"
8 #if FileHandle = FileOpen(SourcePath + "\..\..\..\mercurial\__version__.py")
8 #if FileHandle = FileOpen(SourcePath + "\..\..\mercurial\__version__.py")
9 9 #expr FileLine = FileRead(FileHandle)
10 10 #expr FileLine = FileRead(FileHandle)
11 11 #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1)
@@ -43,7 +43,7 b' AppUpdatesURL=https://mercurial-scm.org/'
43 43 AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
44 44 AppContact=mercurial@mercurial-scm.org
45 45 DefaultDirName={pf}\Mercurial
46 SourceDir=..\..\..
46 SourceDir=..\..
47 47 VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
48 48 VersionInfoCopyright=Copyright 2005-2019 Matt Mackall and others
49 49 VersionInfoCompany=Matt Mackall and others
General Comments 0
You need to be logged in to leave comments. Login now