Skip to content

Commit

Permalink
- Update to ungoogled-chromium 127.0.6533.72-1
Browse files Browse the repository at this point in the history
  • Loading branch information
teeminus committed Jul 27, 2024
1 parent 9f55f24 commit 6184123
Show file tree
Hide file tree
Showing 21 changed files with 3,806 additions and 395 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ ln -s /usr/bin/vim /usr/bin/vi
1. Sanity checking for consistency in series file
* `./devutils/check_patch_files.sh`
1. Check for esbuild dependency changes in file `build/src/DEPS` and adapt `downloads.ini` accordingly
1. Check for commit hash changes of `src` submodule in `third_party/microsoft_dxheaders` (e.g. using GitHub https://github.com/chromium/chromium/tree/127.0.6533.72/third_party/microsoft_dxheaders) and adapt `downloads.ini` accordingly
1. Check for version changes of windows rust crate (`third_party/rust/windows_x86_64_msvc/`) and adapt `downloads.ini` and `patches/ungoogled-chromium/windows\windows-fix-building-with-rust.patch` accordingly
1. Use git to add changes and commit

### Update rust
Expand Down
64 changes: 38 additions & 26 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,40 +152,41 @@ def main():
downloads_cache.mkdir(parents=True, exist_ok=True)
_make_tmp_paths()

# Get download metadata (DownloadInfo)
# Extractors
extractors = {
ExtractorEnum.SEVENZIP: args.sevenz_path,
ExtractorEnum.WINRAR: args.winrar_path,
}

# Prepare source folder
if args.tarball:
download_info = downloads.DownloadInfo([
_ROOT_DIR / 'downloads.ini',
_ROOT_DIR / 'ungoogled-chromium' / 'downloads.ini',
])
# Download chromium tarball
get_logger().info('Downloading chromium tarball...')
download_info = downloads.DownloadInfo([_ROOT_DIR / 'ungoogled-chromium' / 'downloads.ini'])
downloads.retrieve_downloads(download_info, downloads_cache, True, args.disable_ssl_verification)
try:
downloads.check_downloads(download_info, downloads_cache)
except downloads.HashMismatchError as exc:
get_logger().error('File checksum does not match: %s', exc)
exit(1)

# Unpack chromium tarball
get_logger().info('Unpacking chromium tarball...')
downloads.unpack_downloads(download_info, downloads_cache, source_tree, extractors)
else:
download_info = downloads.DownloadInfo([
_ROOT_DIR / 'downloads.ini',
])
# Clone sources
subprocess.run([sys.executable, str(Path('ungoogled-chromium', 'utils', 'clone.py')), '-o', 'build\src', '-p', 'win32' if args.x86 else 'win64'], check=True)

# Retrieve downloads
# Retrieve windows downloads
get_logger().info('Downloading required files...')
downloads.retrieve_downloads(download_info, downloads_cache, True,
args.disable_ssl_verification)
download_info_win = downloads.DownloadInfo([_ROOT_DIR / 'downloads.ini'])
downloads.retrieve_downloads(download_info_win, downloads_cache, True, args.disable_ssl_verification)
try:
downloads.check_downloads(download_info, downloads_cache)
downloads.check_downloads(download_info_win, downloads_cache)
except downloads.HashMismatchError as exc:
get_logger().error('File checksum does not match: %s', exc)
exit(1)

# Prepare source folder
if not args.tarball:
# Clone sources
subprocess.run([sys.executable, str(Path('ungoogled-chromium', 'utils', 'clone.py')), '-o', 'build\src', '-p', 'win32' if args.x86 else 'win64'], check=True)

# Unpack downloads
extractors = {
ExtractorEnum.SEVENZIP: args.sevenz_path,
ExtractorEnum.WINRAR: args.winrar_path,
}
get_logger().info('Unpacking downloads...')
downloads.unpack_downloads(download_info, downloads_cache, source_tree, extractors)

# Prune binaries
pruning_list = (_ROOT_DIR / 'ungoogled-chromium' / 'pruning.list') if args.tarball else (_ROOT_DIR / 'pruning.list')
unremovable_files = prune_binaries.prune_files(
Expand All @@ -196,6 +197,10 @@ def main():
get_logger().error('Files could not be pruned: %s', unremovable_files)
parser.exit(1)

# Unpack downloads
get_logger().info('Unpacking downloads...')
downloads.unpack_downloads(download_info_win, downloads_cache, source_tree, extractors)

# Apply patches
# First, ungoogled-chromium-patches
patches.apply_patches(
Expand Down Expand Up @@ -252,7 +257,7 @@ def main():

# Generate version file
with open(RUST_FLAG_FILE, 'w') as f:
f.write('rustc 1.79.0-nightly (ef8b9dcf2 2024-04-24)')
f.write('rustc 1.80.0-nightly (faefc618c 2024-05-07)')
f.write('\n')

if not args.ci or not (source_tree / 'out/Default').exists():
Expand All @@ -277,6 +282,13 @@ def main():

# Run gn gen
_run_build_process('out\\Default\\gn.exe', 'gen', 'out\\Default', '--fail-on-unused-args')

if not args.ci or not os.path.exists('third_party\\rust-toolchain\\bin\\bindgen.exe'):
# Build bindgen
_run_build_process(
sys.executable,
'tools\\rust\\build_bindgen.py')

# Run ninja
if args.ci:
_run_build_process_timeout('third_party\\ninja\\ninja.exe', '-C', 'out\\Default', 'chrome',
Expand Down
Loading

0 comments on commit 6184123

Please sign in to comment.