I found the reason of this problem inside
google_update/build.scons file.
As said at the top comment, for official builds it copies the "saved constant shell" to the output directory instead of copying the shell it just built.
"Saved constant shell" for opt-win build is google_update/bin/opt/GoogleUpdate.exe. But when I applied customization I renamed it in the code to {OmahaCompanyName}Update.exe so the script can not find it.
After renaming the "saved constant shell" file to {OmahaCompanyName}Update.exe that build error is gone.
However, as said in google_update/bin/Readme.txt, this shell can only be used with goopdate.dll files that have been signed with the real certificate.
And here is the problem with the customized Omaha: it don't have goopdate.dll because it was renamed it as a part of customization.
So here are the questions that I have now:
- I think that the correct way to handle this is to create my own "saved constant shell", so what do I need to do that? Can it be build with hammer or should I build it separately? Do I need to sign it manually?
- What certificate do I need to use for this? I assume I need to have my own certificate, am I right? Do I need to use it for both constant shell and my custom dll? (sorry if it's dumb questions, I'm just not familiar with all these certificate-related stuff)
- When building non-customized version of Omaha with --build_server, it fails later on with
scons: *** [scons-out\opt-win\clickonce_deployment\clickonce_bootstrap.exe.manifest] Error 1
This certificate cannot be used for signing - "cafd39335d6e76f0e26d81296e7cbbfbdf16a720"
I suppose it's because I don't have the real Google's certificate, so how can I make it to sign binaries with my own certificate? It looks like the certificate-related --authenticode_file and --authenticode_password switches are ignored when using --build_server. I see there is _BUILD_SERVER_CERTIFICATE_HASH constant in main.scons (its value is in the error message above) but I can not find anything indicating the certificate file itself.
Could you please help me with that?
Thanks.