Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: piotr_n on May 09, 2012, 12:19:37 PM



Title: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: piotr_n on May 09, 2012, 12:19:37 PM
How do you guys build the official windows release of bitcoin-qt.exe, so it doesn't need QtCore4.dll and QtGui4.dll at the end?

I'm following every step in readme-qt.rst and at the end I get the exe that is ~13MB smaller, but it needs the two DLLs to start.


Title: Re: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: Diapolo on May 10, 2012, 03:46:11 PM
I guess you are compiling on Windows? I have given up to try to achieve this ;).

Dia


Title: Re: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: piotr_n on May 10, 2012, 03:51:25 PM
I guess you are compiling on Windows? I have given up to try to achieve this ;).

Dia
Yes I am.

So who is the mysterious developer that builds the official windows binaries?
http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.6.2/bitcoin-0.6.2-win32.zip/download

It's kind of hard to trust the person if nobody is able to reproduce his great job :)


Title: Re: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: Diapolo on May 10, 2012, 03:55:40 PM
I guess you are compiling on Windows? I have given up to try to achieve this ;).

Dia
Yes I am.

So who is the mysterious developer that builds the official windows binaries?
http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.6.2/bitcoin-0.6.2-win32.zip/download

It's kind of hard to trust the person if nobody is able to reproduce his great job :)

The official builds are trustworthy, as some (dunno exact numbers) devs build the executable from a public source (guess from Github) and compare the files via checksum, this ensures not a single one is able to modifiy the code to contain bad stuff.

But you were able to build for yourself, which is a great step (and was hard work ... at least for me ^^).

Dia


Title: Re: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: piotr_n on May 10, 2012, 04:12:27 PM
Obviously some devs do build the executable.
I just have no clue how they do it, because when I follow instructions from the readme I get an exe that needs the DLLs.

I would guess that they use a different Qt SDK.
May it be that they cross-compile it under Linux?


Title: Re: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: twobitcoins on May 10, 2012, 05:07:57 PM
They cross-compile under Linux using Gitian to create reproducible builds.

To do it under Windows, I think you'll have to build a statically linked version of Qt from sources.  I have not tried it though.


Title: Re: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: Pieter Wuille on May 10, 2012, 05:21:22 PM
The Linux and Windows binaries are built using gitian. Gitian is a system that builds the source inside an virtual machine running Ubuntu. By carefully controlling the build environment like this, it guarantees that everyone ends up with byte-per-byte the same binary as output. These are signed using GPG, and compared among developers before release. This allows everyone to verify that the distributed binaries are indeed created from the specified source code.

The script for the Windows build can be found here (https://github.com/bitcoin/bitcoin/blob/master/contrib/gitian-descriptors/gitian-win32.yml). Note that it's built in a Unix environment, and is probably very different from how you'd do it on Windows itself. Still, it may contain some hints.


Title: Re: How to build bitcoin-qt.exe without the Qt DLL dependency?
Post by: piotr_n on May 10, 2012, 05:22:35 PM
Oh, OK - all clear now.
Thanks guys.