Ungoogled-chromium: How do you make a Windows build from the source code?

Created on 10 Jun 2017  路  21Comments  路  Source: Eloston/ungoogled-chromium

This may seem like a stupid question so please forgive me on that - I'm not the type that uses Github much and I'm not a coder/programmer.

How would one go about making a build from the source you've provided? I wanted to do this because your latest version from premade packages is 55, and at that's pretty far back now. I figure if I can make a "build" from the source you've made, I'd be caught up.

Just point me in the right direction and I'll get started on that. I just don't really know anything about compiling/building from code, I'm the type that doesn't know what to do unless I'm presented with an exe. I guess it's time for that to change.

I _did_ already google it, but it seems like a question that there's multiple answers to and different sources have to be built / compiled different ways, so I figured it best to just ask.

I see some ".md" files that look like they're titled to be relevant to what I'm looking for, but I don't know how to open .md files...

My OS is Windows 10 x64.

If you can ever find the time to update the Windows package you have, I'd really appreciate it. I mean, 55 is a good while ago now.

Thanks!

question

Most helpful comment

.md files are Markdown files. They can be viewed on GitHub if you click on them from the project's repository viewer (i.e. the list of files you see on the repository's home page). The links from the README.md document (opened already on the repository's home page) should open them for you.

At the time of writing, ungoogled-chromium does not build Windows. Issue #215 was made to re-add support, but there has been no concrete progress made yet.

Based on what you've told me, here are the general steps you'll need to take to get ungoogled-chromium working on Windows:

  1. Get comfortable using the command-line (Command Prompt, though PowerShell might work). You'll be using it extensively, and all build tools (Google's and ungoogled-chromium's) are all commandline-based.
  2. Understand the regular Chromium build process on Windows.

    • Understanding why this process is done this way and how all of the utilities work (at a somewhat high level) is essential to understanding how the ungoogled-chromium build process works.

    • I recommend trying to get a build of regular Chromuim to work, so you can get some hands-on experience with these utilities and ensure your build environment is setup correctly (this is what I did when I started working on Chromium).

  3. Keep in mind that you'll need to learn about GN and Python 2 and 3 in more detail. This will be important when you run into issues relating to them.
  4. Understand the ungoogled-chromium build process from its documentation

    • It will also help to read the out-of-date Windows instructions to understand Windows-specific details to the build process.

  5. Update Windows support. This will more than likely involve making patches, tweaking GN flags, and writing Python code for utilikit.

Keep in mind that these steps aren't detailed at all; there is quite a bit of depth to each step.

If you're still interested, I wish you the best of luck! It took me a while to learn everything I know about Chromium now, and there were quite a few setbacks along the way. Keep at it, and it will pay off in many more ways than just learning about building Chromium.

If you need some guidance, higher-level knowledge, or help with some cryptic errors relating to ungoogled-chromium, post it here or on Gitter (link in the README).

All 21 comments

.md files are Markdown files. They can be viewed on GitHub if you click on them from the project's repository viewer (i.e. the list of files you see on the repository's home page). The links from the README.md document (opened already on the repository's home page) should open them for you.

At the time of writing, ungoogled-chromium does not build Windows. Issue #215 was made to re-add support, but there has been no concrete progress made yet.

Based on what you've told me, here are the general steps you'll need to take to get ungoogled-chromium working on Windows:

  1. Get comfortable using the command-line (Command Prompt, though PowerShell might work). You'll be using it extensively, and all build tools (Google's and ungoogled-chromium's) are all commandline-based.
  2. Understand the regular Chromium build process on Windows.

    • Understanding why this process is done this way and how all of the utilities work (at a somewhat high level) is essential to understanding how the ungoogled-chromium build process works.

    • I recommend trying to get a build of regular Chromuim to work, so you can get some hands-on experience with these utilities and ensure your build environment is setup correctly (this is what I did when I started working on Chromium).

  3. Keep in mind that you'll need to learn about GN and Python 2 and 3 in more detail. This will be important when you run into issues relating to them.
  4. Understand the ungoogled-chromium build process from its documentation

    • It will also help to read the out-of-date Windows instructions to understand Windows-specific details to the build process.

  5. Update Windows support. This will more than likely involve making patches, tweaking GN flags, and writing Python code for utilikit.

Keep in mind that these steps aren't detailed at all; there is quite a bit of depth to each step.

If you're still interested, I wish you the best of luck! It took me a while to learn everything I know about Chromium now, and there were quite a few setbacks along the way. Keep at it, and it will pay off in many more ways than just learning about building Chromium.

If you need some guidance, higher-level knowledge, or help with some cryptic errors relating to ungoogled-chromium, post it here or on Gitter (link in the README).

Damn... looks like a LOT of stuff to do to get it running.

I'll see if I can dedicate time to doing it sometime, but yeah it looks way over my head.

I'll do my best, but I really appreciate if you or anyone else reading this who knows what they're doing can make new Windows builds sometime.

Thanks.

Damn... looks like a LOT of stuff to do to get it running.

Yeah, this is a major reason why there aren't a lot of people working on Chromium in their free time. Like many things though, the initial learning is always the most challenging.

Point 5 seems to be the hardest for a non-developer...

So do points 3 and 4...

Well those steps describe the entire learning curve, so I'm not surprised that they seem like a lot of work.

Well, after looking into it more and getting up to barely step 2... yeah I think it's fair to say that I can't do this myself.

I thought the process might be something like just needing to install Visual Studio or Python and some dependencies and then running a command to compile or something, but it's clearly not that simple and you need to actually know how to code and stuff. I'd need to take university courses in coding to know what I'm doing in any of this, since I've never written any actual programming or anything (my "code" knowledge ends at HTML/CSS, which is hardly what anyone would call coding).

So yeah... if anyone _does_ know how to do this then I would seriously appreciate it if you can take it upon yourself to get this done and let Eloston add it to the contributor binaries section.

For the time being I guess I'm switching to Iridium since that's probably the closest I can get to Ungoogled Chromium for Chromium 58+, until I switch to Linux.

Thanks for the responses though.

Edit: Actually Eloston, would you suggest Iridium, or the "NoSync, No WebRTC, No Widevine" version of Chromium provided at Woolyoss here?: https://chromium.woolyss.com/ (second entry in the second box down)

The plus side to those too is that you get the bleeding edge new Chromium with it as well (currently 61).

I'm not sure if it might be even better than using Iridium. Iridium talks about making those things more secure, but this distro of Chromium outright doesn't include them. I don't need them for anything so I figure maybe this might be even better.

@92847586

I thought the process might be something like just needing to install Visual Studio or Python and some dependencies and then running a command to compile or something

Well that's essentially how it would work once Windows support is added back in (it would be similar to the oudated Windows build instructions). Regular Chromium is even easier to setup if you use depot_tools.

Actually Eloston, would you suggest Iridium, or the "NoSync, No WebRTC, No Widevine" version of Chromium provided at Woolyoss

From what I can remember, Woolyss's builds are identical to regular Chromium apart from some different GN flags (all of the different variants are just different GN flags). The build process is pratically identical to regular Chromium and no patches are applied, which is why it's easy to build bleeding-edge versions. However, GN flags are quite limited and cannot disable or change a lot of features.

Iridium takes this a step further by patching code and using custom GN flags. One nice feature they add is the trk scheme, which is essentially a way to check if hardcoded URLs to Google are still being used despite patching. However, they do redirect some traffic to Iridium's own servers, which is a questionable decision in my opinion. Regarding their claim about being "secure", I'm not really sure what exactly they mean; most of their patches are to prevent data from being sent to Google or tweak default preferences. There aren't any patches that stand out as increasing security.

In the end, either option has their benefits and drawbacks. It really depends on what you need.

I'd need to take university courses in coding to know what I'm doing in any of this, since I've never written any actual programming or anything

For a project like this, you don't need to take a programming class. In fact, all of my projects on GitHub so far aren't that conceptually difficult; most of it is just a matter of creating some framework (for code and potentially files) and attaching pieces to it (whether it be libraries or programming language features). You can pick up fundamental programming concepts from practically anywhere in almost any form, which is pretty much all you really need conceptually to work on ungoogled-chromium.

For step 1, I should clarify that it's probably best to learn the command-line as you go. That way you can connect your knowledge to something that's concrete and practical.

Well that's essentially how it would work once Windows support is added back in (it would be similar to the oudated Windows build instructions). Regular Chromium is even easier to setup if you use depot_tools.

In that case, will it be easier to just wait until that's done?

For step 1, I should clarify that it's probably best to learn the command-line as you go. That way you can connect your knowledge to something that's concrete and practical.

Well I at least know how to use the command line to an extent. "cd %DirectoryHere%" etc. I can navigate in it and do a few basic things, but I've never had to use it a ton.

For a project like this, you don't need to take a programming class. In fact, all of my projects on GitHub so far aren't that conceptually difficult; most of it is just a matter of creating some framework (for code and potentially files) and attaching pieces to it (whether it be libraries or programming language features). You can pick up fundamental programming concepts from practically anywhere in almost any form, which is pretty much all you really need conceptually to work on ungoogled-chromium.

Yeah, it just seemed like the kinda thing I'd need a teacher actually there showing me the ins-and-outs for me to learn. To be honest I flunked the easiest math course there is, and coding seems very math-like and anything that's not in plain English tends to lose me and start seeming cryptic to me. I was barely able to complete an HS computer science course. Much as I love computers, my actual best courses were English and humanities, haha. The most coding I've been able to do is HTML and CSS - Java looks cryptic to me and I was able to modify some Lua for a game before but that was mostly just guesswork and copy/pasting things from one place to another...

What I learned is that while I'm good at memorizing what to do inside a GUI or OS and can fix the vast majority of people's problems, I'm far from being actually "good with computers". I'm just as good as any tech support at BestBuy or whatever else is, not a coder or anything.

But I may take another crack after this "Windows support" issue is out of the way. Maybe that'll make it easier. Step 5 sounded like it was going to be way over my head which made me feel like "Well even if I could get that far, I'm certain to hit a dead end at that point".

If it becomes as easy as just installing dependencies and compiling, I could do that. But I suppose once it becomes that simple you'll probably just start providing binaries yourself, huh...

Honestly, just getting that specific VS that Chromium wants, "Visual Studio 2015 Update 3", was hard enough. They seem to want you to make an account with them just to get to it, and I was like, "Screw that I guess I have to pirate it then" (I hate Microsoft, and making unnecessary accounts for things), and well that took a while to do.

I might revisit when the update issue is fixed. Sounds like I need to know some Python to be able to get it done anyway.

Iridium takes this a step further by patching code and using custom GN flags. One nice feature they add is the trk scheme, which is essentially a way to check if hardcoded URLs to Google are still being used despite patching. However, they do redirect some traffic to Iridium's own servers, which is a questionable decision in my opinion. Regarding their claim about being "secure", I'm not really sure what exactly they mean; most of their patches are to prevent data from being sent to Google or tweak default preferences. There aren't any patches that stand out as increasing security.

That's kinda what I was thinking - it looks to me like Iridium is nothing more than just "Oh, it's Chrome but with different defaults, which you could easily just set by downloading Chrome and doing it yourself". Which in that case I would just use Chrome. The choice to redirect to their own servers is kinda sketchy even.

I mean, I already disable all prefetching and form autocomplete and saving passwords and stuff like that, and even block all cookies and javascript except ones from sites I explicitly whitelist. I also flip a few switches in chrome://flags and have a suite of extensions.

I'm not sure if Iridium and other browsers are really doing much more than that to help. And in that case I may as well just get normal Chrome until Ungoogled Chromium is caught up or I switch to Linux which will eventually be happening (I take it you keep the Linux/Debian binaries updated).

What interested me most about the projects is just ensuring that truly zero data is sent to Google, and eliminating binary blobs. Everything else falls upon the user and their choice of preferences I would think.

If it becomes as easy as just installing dependencies and compiling, I could do that. But I suppose once it becomes that simple you'll probably just start providing binaries yourself, huh...

Yeah. It takes little effort to publish binaries once support is there.

Honestly, just getting that specific VS that Chromium wants, "Visual Studio 2015 Update 3", was hard enough. They seem to want you to make an account with them just to get to it, and I was like, "Screw that I guess I have to pirate it then"

Well it seems you can still get a direct link to Visual Studio 2015 Update 3 Community. But who knows how long those links will last (hopefully they stay because even the most minor of updates still change enough to break Chromium).

it looks to me like Iridium is nothing more than just "Oh, it's Chrome but with different defaults

I didn't mean to downplay the significance of the trk scheme feature; it's a pretty neat and simple but effective feature. But it doesn't catch as much as I would like it to (hence this project).

(I take it you keep the Linux/Debian binaries updated).

I normally keep binaries for whatever platform I'm working on up-to-date. Currently, that is Debian Stretch.

FYI for users who are getting 500 Server Error on #215 "Update Windows support": you need to use the Mobile version instead of the Desktop version. Changing the user agent via DevTools is one way to do this.

I have so far made it to setting up the buildspace tree for the latest windows build, however there has been a few issues with a little python comprehension that didn't stop me. Another hiccup was that buildkit-launcher seems to break when half-way through tarball extraction, which I instead used 7zip and it worked. Now I am running into an issue with domain substitution and it spits back:

D:\src>py buildkit-launcher.py subdom
2018-03-06 16:55:47,885 - DEBUG: Initialized logger 'buildkit'
2018-03-06 16:55:47,895 - ERROR: Buildspace tree does not exist: [Errno 2] No such file or directory
: 'D:\\src\\buildspace\\tree\\third_party\\devtools-node-modules\\third_party\\node_modules\\gulp\\n
ode_modules\\gulp-util\\node_modules\\dateformat\\node_modules\\meow\\node_modules\\normalize-packag
e-data\\node_modules\\is-builtin-module\\node_modules\\builtin-modules\\package.json'

D:\src>

This is due to the directory being too long, but I am unsure how I could fix that given the structure of the tree. I have tried subst to no avail. I am using Win 7 Ultimate SP1.

Using \\?\ notation or retrieving the short path through win32api might work however I'm not sure where I should force that behavior in the python scripts.

@mercerius Please see https://github.com/Eloston/ungoogled-chromium/issues/345#issuecomment-371022101. Let's move this discussion over there.

I'm able to get the sources using this command
git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-windows.git
However, when i'm about to build it with:
py build.py
i'm getting error that says, i'm using python 2.7.6 while the supporter version is 2.7.9. I guess this talks about the python within depot_tools but not sure yet because i've already installed the latest python 3.x version in my Windows 10
any clues on how to fix this?

i'm getting error that says, i'm using python 2.7.6 while the supporter version is 2.7.9. I guess this talks about the python within depot_tools but not sure yet because i've already installed the latest python 3.x version in my Windows 10

Read documentation first: https://github.com/ungoogled-software/ungoogled-chromium-windows#other-build-requirements

i'm getting error that says, i'm using python 2.7.6 while the supporter version is 2.7.9. I guess this talks about the python within depot_tools but not sure yet because i've already installed the latest python 3.x version in my Windows 10

Read documentation first: https://github.com/ungoogled-software/ungoogled-chromium-windows#other-build-requirements

I read that already and satisfied all the requirements and getting that same error.

I read that already and satisfied all the requirements and getting that same error.

idk, I have 2.7.14 and 3.6.4 installed, which works without any problems.

i realized i also installed 2.7.8 aside from 2.7.9 and its only seeing 2.7.8.
I Uninstalled 2.7.8
now i'm getting
ImportError: No module named win32api

I already installed pywin32 and still getting the same error

pip install pywin32
Requirement already satisfied: pywin32 in c:\users\winux\appdata\localprogramspythonpython37-32\lib\site-packages (224)

python37-32

python -V      # <<< check if it is really 2.7.X
python -m pip install pywin32

python37-32

python -V      # <<< check if it is really 2.7.X
python -m pip install pywin32

python -V # returned 2.7.19 since i installed the latest
python -m pip install pywin32
python : C:\Python27python.exe: No module named pip

After checking, my python3 pip is ok but my python 2.7.19 pip is not working.
if i try
easy_install pip # it only reinstall's those for python3 nothing installed for python27 directory
still says "no module named pip"

how do i install pip on my python27?

how do i install pip on my python27?

python -m easy_install pip ?

Was this page helpful?
0 / 5 - 0 ratings