Building chromium in a single executable

1,784 views
Skip to first unread message

Gerald Selvino

unread,
Nov 23, 2012, 12:29:39 AM11/23/12
to chromi...@chromium.org
Hey chromium guys!

I'm doing a project based in chromium, I have a requirement of building it to a single executable so that it can run in a USB flash drive. I want to know where to start. 

I'm thankful for any help(advice, links to documentations, etc...)

Regards,

Gerald

YoungKi Hong

unread,
Nov 23, 2012, 12:32:38 AM11/23/12
to napole...@gmail.com, chromi...@chromium.org

Single executable is default mode.
So, you just  need to "make" :)
2012. 11. 23. 오후 2:29에 "Gerald Selvino" <napole...@gmail.com>님이 작성:

> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev

PhistucK

unread,
Nov 23, 2012, 5:47:23 AM11/23/12
to simon....@gmail.com, napole...@gmail.com, chromi...@chromium.org
Not really. At least on Windows, you have chrome.exe, chrome.dll, a handful of other DLL files and numerous resource packages.
I think the original poster wants everything is a single file. I guess this would take some work, if at all possible (the Direct 3D files are probably not open source, can you embed a DLL within an executable? I am not familiar enough with build systems to know).

PhistucK

YoungKi Hong

unread,
Nov 23, 2012, 6:04:46 AM11/23/12
to PhistucK, Gerald Selvino, chromi...@chromium.org
Yes, you are right.
In linux, chrome also needs extra files like pak.

Иван Игнатьев

unread,
Nov 23, 2012, 7:54:10 AM11/23/12
to chromi...@chromium.org
Maybe easiest way it's create portable package: http://portableapps.com/development

YoungKi Hong

unread,
Nov 24, 2012, 2:48:11 AM11/24/12
to Gerald Selvino, chromium-dev@chromium org

Phistuck is right. I want to pack it all in one exe in windows, to make it as portable as it could be. Or does anyone has alternative solution?

Gerald Selvino

unread,
Nov 24, 2012, 3:55:36 AM11/24/12
to chromi...@chromium.org
Thanks for this, I'll look to it and see.

Dominic Mazzoni

unread,
Nov 25, 2012, 11:49:14 PM11/25/12
to napole...@gmail.com, chromi...@chromium.org
Maybe I'm missing something, but are you sure you need it to be a single executable? Note that Chromium is "portable" by default - it runs just fine out of its own directory, it doesn't need to be installed. There's nothing unportable about having an exe and several dlls in the same directory, Windows will always search the same directory as an exe for needed dlls - and Chromium definitely looks for its resource files in that directory too.

To quickly see for yourself, just download a continuous build snapshot of Chromium here - this is basically exactly what you get if you compile Chromium yourself from source, and if you do compile it yourself you can use this archive as a guide to what files you should probably include and which ones you can safely skip:


(Hint: click on the largest revision number at the bottom of the page, not one from the dawn of time at the top.)

- Dominic

--

Paweł Hajdan, Jr.

unread,
Nov 26, 2012, 12:01:07 PM11/26/12
to napole...@gmail.com, chromi...@chromium.org
On Thu, Nov 22, 2012 at 9:29 PM, Gerald Selvino <napole...@gmail.com> wrote:
I'm doing a project based in chromium, I have a requirement of building it to a single executable so that it can run in a USB flash drive. I want to know where to start.

Could you explain more where the requirement comes from? As other people said here, it should just run fine out of a USB drive. If it doesn't, please post actual problems that happen when you try it.

Note that if you really want to have everything (including resources in .pak files) in a single .exe file, that would require a good knowledge of chrome internals and some modifications to the code (e.g. loading resources). Also, take into account NaCl has its separate files too, as well as Pepper Flash and PDF viewer.

Gerald Selvino

unread,
Nov 26, 2012, 8:29:36 PM11/26/12
to Paweł Hajdan, Jr., chromi...@chromium.org
Hi! thanks for all the reply. The requirement is from a private client doing their own browser for a device they are going to build. And yes, I realized that chrome is indeed portable as it is runnable within the directory where you built it(no registry entries needed, etc...). Hmmmn, I think I could negotiate this requirement to them as you guys suggest, it may take a lot of effort.

Marc-Antoine Ruel

unread,
Nov 27, 2012, 10:33:13 AM11/27/12
to napole...@gmail.com, Paweł Hajdan, Jr., chromi...@chromium.org
I hope you have a solid auto-update plan.

We, as a team, dislike having users with insecure stale versions. The users will suffer in the end for using a stale version, where functionality will silently break on web properties as the stable version moves on and web sites assume Google Chrome and Chromium users are always using the latest stable version.

M-A

2012/11/26 Gerald Selvino <napole...@gmail.com>

Gerald Selvino

unread,
Nov 27, 2012, 8:23:27 PM11/27/12
to Marc-Antoine Ruel, Paweł Hajdan, Jr., chromi...@chromium.org
We are looking into it, we have the chromium trunk as a vendor branch in which it will be updated every now and then, and an auto update plan based in chrome courgette

Paweł Hajdan, Jr.

unread,
Nov 28, 2012, 12:47:05 PM11/28/12
to Gerald Selvino, Marc-Antoine Ruel, chromi...@chromium.org
When shipping to users, you may want to have a plan based on stable channel releases instead of trunk (i.e. your trunk can be based on chromium trunk, but releases should be based on chromium releases).

Also, "every now and then" doesn't give much confidence about proper handling of security vulnerabilities.

Gerald Selvino

unread,
Nov 29, 2012, 3:44:57 AM11/29/12
to Paweł Hajdan, Jr., Marc-Antoine Ruel, chromi...@chromium.org
Thanks all!
Reply all
Reply to author
Forward
0 new messages