Show More
@@ -61,8 +61,7 b' def build(' | |||
|
61 | 61 | |
|
62 | 62 | vc_x64 = r'\x64' in os.environ.get('LIB', '') |
|
63 | 63 | arch = 'x64' if vc_x64 else 'x86' |
|
64 | inno_source_dir = source_dir / 'contrib' / 'packaging' / 'inno' | |
|
65 | inno_build_dir = build_dir / ('inno-%s' % arch) | |
|
64 | inno_build_dir = build_dir / ('inno-py2exe-%s' % arch) | |
|
66 | 65 | staging_dir = inno_build_dir / 'stage' |
|
67 | 66 | |
|
68 | 67 | requirements_txt = ( |
@@ -104,6 +103,31 b' def build(' | |||
|
104 | 103 | print('copying %s to %s' % (f, dest_path)) |
|
105 | 104 | shutil.copyfile(f, dest_path) |
|
106 | 105 | |
|
106 | build_installer( | |
|
107 | source_dir, | |
|
108 | inno_build_dir, | |
|
109 | staging_dir, | |
|
110 | iscc_exe, | |
|
111 | version, | |
|
112 | arch="x64" if vc_x64 else None, | |
|
113 | ) | |
|
114 | ||
|
115 | ||
|
116 | def build_installer( | |
|
117 | source_dir: pathlib.Path, | |
|
118 | inno_build_dir: pathlib.Path, | |
|
119 | staging_dir: pathlib.Path, | |
|
120 | iscc_exe: pathlib.Path, | |
|
121 | version, | |
|
122 | arch=None, | |
|
123 | ): | |
|
124 | """Build an Inno installer from staged Mercurial files. | |
|
125 | ||
|
126 | This function is agnostic about how to build Mercurial. It just | |
|
127 | cares that Mercurial files are in ``staging_dir``. | |
|
128 | """ | |
|
129 | inno_source_dir = source_dir / "contrib" / "packaging" / "inno" | |
|
130 | ||
|
107 | 131 | # The final package layout is simply a mirror of the staging directory. |
|
108 | 132 | package_files = [] |
|
109 | 133 | for root, dirs, files in os.walk(staging_dir): |
@@ -158,8 +182,8 b' def build(' | |||
|
158 | 182 | |
|
159 | 183 | args = [str(iscc_exe)] |
|
160 | 184 | |
|
161 |
if |
|
|
162 |
args.append('/dARCH= |
|
|
185 | if arch: | |
|
186 | args.append('/dARCH=%s' % arch) | |
|
163 | 187 | |
|
164 | 188 | if not version: |
|
165 | 189 | version = read_version_py(source_dir) |
General Comments 0
You need to be logged in to leave comments.
Login now