Commit eb5e4d0a authored by Calder Kitagawa's avatar Calder Kitagawa Committed by Commit Bot

[Zucchini] Compile zucchini into setup.exe

This change compiles Zucchini-apply into setup.exe this adds ~50 kB in
size (this works for raw, x86, and x64 PE file patches).

NOTE: this will not ship Zucchini patches yet but it makes setup.exe
capable of patching using Zucchini in addition to Courgette. The
release/diff infrastructure is configured so that Courgette and Zucchini
are used to generate patches in parallel; however, we will continue to
only ship Courgette patches to users. This will allow us to evaluate the
stability and benefits of Zucchini. Only after this evaluation period
will we begin the discussion of swapping over to Zucchini for the next
release (with Courgette as a fallback).

Bug: 729154
Change-Id: I3b9bc1f28f7c5a92fbe393e0d59bd9ac98946372
Reviewed-on: https://chromium-review.googlesource.com/1172445
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583257}
parent 65e1c76c
......@@ -63,11 +63,15 @@ bool ArchivePatchHelper::Uncompress(base::FilePath* last_uncompressed_file) {
}
bool ArchivePatchHelper::ApplyPatch() {
// TODO(ckitagawa): Swap ordering back to Zucchini first once we ship
// Zucchini based patches by default.
if (CourgetteEnsemblePatch() || BinaryPatch())
return true;
#if BUILDFLAG(ZUCCHINI)
if (ZucchiniEnsemblePatch())
return true;
#endif // BUILDFLAG(ZUCCHINI)
return CourgetteEnsemblePatch() || BinaryPatch();
return false;
}
bool ArchivePatchHelper::CourgetteEnsemblePatch() {
......@@ -110,6 +114,9 @@ bool ArchivePatchHelper::ZucchiniEnsemblePatch() {
<< target_.value()
<< " using Zucchini. err=" << static_cast<uint32_t>(result);
// Ensure a partial output is not left behind.
base::DeleteFile(target_, false);
return false;
}
......
......@@ -5,5 +5,5 @@
declare_args() {
# Specify if the Zucchini patcher features should be included in setup.exe.
# See //components/zucchini for more information.
use_zucchini = false
use_zucchini = true
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment