@@ -152,40 +152,41 @@ def main():
152
152
downloads_cache .mkdir (parents = True , exist_ok = True )
153
153
_make_tmp_paths ()
154
154
155
- # Get download metadata (DownloadInfo)
155
+ # Extractors
156
+ extractors = {
157
+ ExtractorEnum .SEVENZIP : args .sevenz_path ,
158
+ ExtractorEnum .WINRAR : args .winrar_path ,
159
+ }
160
+
161
+ # Prepare source folder
156
162
if args .tarball :
157
- download_info = downloads .DownloadInfo ([
158
- _ROOT_DIR / 'downloads.ini' ,
159
- _ROOT_DIR / 'ungoogled-chromium' / 'downloads.ini' ,
160
- ])
163
+ # Download chromium tarball
164
+ get_logger ().info ('Downloading chromium tarball...' )
165
+ download_info = downloads .DownloadInfo ([_ROOT_DIR / 'ungoogled-chromium' / 'downloads.ini' ])
166
+ downloads .retrieve_downloads (download_info , downloads_cache , True , args .disable_ssl_verification )
167
+ try :
168
+ downloads .check_downloads (download_info , downloads_cache )
169
+ except downloads .HashMismatchError as exc :
170
+ get_logger ().error ('File checksum does not match: %s' , exc )
171
+ exit (1 )
172
+
173
+ # Unpack chromium tarball
174
+ get_logger ().info ('Unpacking chromium tarball...' )
175
+ downloads .unpack_downloads (download_info , downloads_cache , source_tree , extractors )
161
176
else :
162
- download_info = downloads .DownloadInfo ([
163
- _ROOT_DIR / 'downloads.ini' ,
164
- ])
177
+ # Clone sources
178
+ subprocess .run ([sys .executable , str (Path ('ungoogled-chromium' , 'utils' , 'clone.py' )), '-o' , 'build\src' , '-p' , 'win32' if args .x86 else 'win64' ], check = True )
165
179
166
- # Retrieve downloads
180
+ # Retrieve windows downloads
167
181
get_logger ().info ('Downloading required files...' )
168
- downloads .retrieve_downloads ( download_info , downloads_cache , True ,
169
- args .disable_ssl_verification )
182
+ download_info_win = downloads .DownloadInfo ([ _ROOT_DIR / 'downloads.ini' ])
183
+ downloads . retrieve_downloads ( download_info_win , downloads_cache , True , args .disable_ssl_verification )
170
184
try :
171
- downloads .check_downloads (download_info , downloads_cache )
185
+ downloads .check_downloads (download_info_win , downloads_cache )
172
186
except downloads .HashMismatchError as exc :
173
187
get_logger ().error ('File checksum does not match: %s' , exc )
174
188
exit (1 )
175
189
176
- # Prepare source folder
177
- if not args .tarball :
178
- # Clone sources
179
- subprocess .run ([sys .executable , str (Path ('ungoogled-chromium' , 'utils' , 'clone.py' )), '-o' , 'build\src' , '-p' , 'win32' if args .x86 else 'win64' ], check = True )
180
-
181
- # Unpack downloads
182
- extractors = {
183
- ExtractorEnum .SEVENZIP : args .sevenz_path ,
184
- ExtractorEnum .WINRAR : args .winrar_path ,
185
- }
186
- get_logger ().info ('Unpacking downloads...' )
187
- downloads .unpack_downloads (download_info , downloads_cache , source_tree , extractors )
188
-
189
190
# Prune binaries
190
191
pruning_list = (_ROOT_DIR / 'ungoogled-chromium' / 'pruning.list' ) if args .tarball else (_ROOT_DIR / 'pruning.list' )
191
192
unremovable_files = prune_binaries .prune_files (
@@ -196,6 +197,10 @@ def main():
196
197
get_logger ().error ('Files could not be pruned: %s' , unremovable_files )
197
198
parser .exit (1 )
198
199
200
+ # Unpack downloads
201
+ get_logger ().info ('Unpacking downloads...' )
202
+ downloads .unpack_downloads (download_info_win , downloads_cache , source_tree , extractors )
203
+
199
204
# Apply patches
200
205
# First, ungoogled-chromium-patches
201
206
patches .apply_patches (
@@ -252,7 +257,7 @@ def main():
252
257
253
258
# Generate version file
254
259
with open (RUST_FLAG_FILE , 'w' ) as f :
255
- f .write ('rustc 1.79 .0-nightly (ef8b9dcf2 2024-04-24 )' )
260
+ f .write ('rustc 1.80 .0-nightly (faefc618c 2024-05-07 )' )
256
261
f .write ('\n ' )
257
262
258
263
if not args .ci or not (source_tree / 'out/Default' ).exists ():
@@ -277,6 +282,13 @@ def main():
277
282
278
283
# Run gn gen
279
284
_run_build_process ('out\\ Default\\ gn.exe' , 'gen' , 'out\\ Default' , '--fail-on-unused-args' )
285
+
286
+ if not args .ci or not os .path .exists ('third_party\\ rust-toolchain\\ bin\\ bindgen.exe' ):
287
+ # Build bindgen
288
+ _run_build_process (
289
+ sys .executable ,
290
+ 'tools\\ rust\\ build_bindgen.py' )
291
+
280
292
# Run ninja
281
293
if args .ci :
282
294
_run_build_process_timeout ('third_party\\ ninja\\ ninja.exe' , '-C' , 'out\\ Default' , 'chrome' ,
0 commit comments