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

issue wtogami opened this issue on January 9, 2014
  1. wtogami commented at 1:07 PM on January 9, 2014: contributor

    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 13e99e463d4aa0bd2b2892010ca8c7007c40c242

  2. laanwj commented at 8:51 AM on January 10, 2014: member

    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?

  3. Diapolo commented at 10:24 AM on January 10, 2014: none

    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)

    <pre> IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico" IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico" </pre>

  4. laanwj commented at 10:49 AM on January 10, 2014: member

    The problem is that they aren't used.

  5. Diapolo commented at 10:55 AM on January 10, 2014: none

    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.

  6. laanwj commented at 11:18 AM on January 10, 2014: member

    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?

  7. Diapolo commented at 11:49 AM on January 10, 2014: none

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

  8. theuni commented at 3:05 PM on January 11, 2014: member

    @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.

  9. Diapolo commented at 5:05 PM on January 11, 2014: none

    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).

  10. Michagogo commented at 10:01 AM on January 16, 2014: 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.

  11. laanwj commented at 10:15 AM on January 16, 2014: member

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

  12. laanwj commented at 1:35 PM on January 24, 2014: member

    @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.

  13. laanwj commented at 12:46 PM on January 26, 2014: member

    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)
    
  14. theuni commented at 4:57 PM on January 26, 2014: member

    @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.

  15. laanwj closed this on Jan 28, 2014

  16. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me