Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitcoin-qt.exe gitian win32: missing icon and runs blank terminal window #3499

Closed
wtogami opened this issue Jan 9, 2014 · 13 comments · Fixed by #3591
Closed

bitcoin-qt.exe gitian win32: missing icon and runs blank terminal window #3499

wtogami opened this issue Jan 9, 2014 · 13 comments · Fixed by #3591

Comments

@wtogami
Copy link
Contributor

wtogami commented Jan 9, 2014

Something changed with bitcoin-qt.exe built by gitian win32. The .exe is missing the Bitcoin icon and launching it opens a blank terminal window before the splash screen appears.

Built at 13e99e4

@laanwj
Copy link
Member

laanwj commented Jan 10, 2014

As for the console window: we need to add an -mwindows to the linking step of the bitcoin-qt.exe (but NOT bitcoind.exe or bitcoin-cli.exe, as they need a console).

For the icon I think we need to compile and link in the win32 resources file src/qt/res/bitcoin-qt.rc.

@theuni Do you have a suggestion on how to do this with autotools?

@Diapolo
Copy link

Diapolo commented Jan 10, 2014

AFAIK there are res files for bitcoind.exe and bitcoin-cli.exe already...
The lines that are responsible for adding an icon to an executable file are (from: bitcoin-qt-res.rc)

IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico"
IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico"

@laanwj
Copy link
Member

laanwj commented Jan 10, 2014

The problem is that they aren't used.

@Diapolo
Copy link

Diapolo commented Jan 10, 2014

AFAIK @theuni added a patch, that they should be used some time ago?
Anyway, the only file that adds an icon, is the .rc file for Bitcoin Core, the .rc files for bitcoind.exe and bitcoin-cli.exe are missing the mentioned entries from above.

@laanwj
Copy link
Member

laanwj commented Jan 10, 2014

Ok, so bitcoind.exe and bitcoin-cli.exe are fine?

But the gitian-built bitcoin-qt.exe however has no icon and opens a console window. Is this the same for your local builds or a gitian problem?

@Diapolo
Copy link

Diapolo commented Jan 10, 2014

Must be a Gitian problem, as I have an icon and also no console window.

@theuni
Copy link
Member

theuni commented Jan 11, 2014

@Diapolo can you confirm with self-built/gitian .exe's exactly what the issues are here? I'm happy to fix, but I'm in the dark without Windows.

@Diapolo
Copy link

Diapolo commented Jan 11, 2014

I don't Gitian build and (sorry) also didn't yet test the now merged Qt5 autotools patch (great work btw.).
My local builds currently rely on an older bitcoin-qt.pro files, to which I added needed changes to catch up with current master. Anyway, my bitcoin-qt.exe file has an application icon (the file itself, when viewed in Windows Explorer) and also doesn't open a blank terminal window (this can be cause by a missing -mwindows as @laanwj suggests or perhaps we have some debugging stuff enabled? dunno).

@Michagogo
Copy link
Contributor

Note that the blank terminal window is not always blank -- it's the output (I don't know if it's stdout, stderr, or something else). I have -tor set in my config file, and the terminal window that opens with the GUI shows a message about the option being renamed to -onion in a future release.

@laanwj
Copy link
Member

laanwj commented Jan 16, 2014

Indeed, the console window is Windows standard output, anything that's written to standard output ends up there.

@laanwj
Copy link
Member

laanwj commented Jan 24, 2014

@theuni Do you have any recommendations on how to make sure that -mwindows is passed when linking bitcoin-qt.exe? I know how to do it, but maybe you have a preference as to how.

@laanwj
Copy link
Member

laanwj commented Jan 26, 2014

If you want to distinguish between the two subsystem modes without Windows you can use the following commands:

Good:

$ objdump -x bitcoin-0.8.99-win32-setup.exe | grep -i "^Subsystem"
Subsystem               00000002        (Windows GUI)
$ objdump -x bitcoind.exe |grep -i "^Subsystem"
Subsystem               00000003        (Windows CUI)
$ objdump -x bitcoin-cli.exe |grep -i "^Subsystem"
Subsystem               00000003        (Windows CUI)

Wrong, should be GUI:

$ objdump -x bitcoin-qt.exe |grep -i "^Subsystem"
Subsystem               00000003        (Windows CUI)

@theuni
Copy link
Member

theuni commented Jan 26, 2014

@laanwj Need to check -mwindows in configure before passing it along (AX_CHECK_LINK_FLAG), then pass it along in a GUI_FLAGS or so. I'll push up a patch in a few hours when I can build/test.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants