This adds a flag which prevents displaying the console when running
bitcoin-qt.exe.
Details
- Reviewers
deadalnix jasonbcox - Group Reviewers
Restricted Project - Commits
- rSTAGINGd5be34457fb9: [CMAKE] Avoid displaying the console when launching bitcoin-qt.exe
rABCd5be34457fb9: [CMAKE] Avoid displaying the console when launching bitcoin-qt.exe
Prerequisite:
Follow the doc/build-windows.md and depends/README.md documentation
and install the dependencies for i686-w64-mingw32 and
x86_64-w64-mingw32.
# 32-bit version mkdir buildcmake && cd buildcmake cmake -GNinja .. -DBUILD_BITCOIN_SEEDER=OFF \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win32.cmake ninja
Check the build succeeds.
Check the generated src/qt/bitcoin-qt.exe binary runs as expected.
Ensure there is no console display when running the exe.
Operate the same for Win64.
# 64-bit version rm -rf * cmake -GNinja .. -DBUILD_BITCOIN_SEEDER=OFF \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win64.cmake ninja
Check the build succeeds.
Check the generated src/qt/bitcoin-qt.exe binary runs as expected.
Ensure there is no console display when running the exe.
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- cmake_windows_no_console
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 5591 Build 9244: Bitcoin ABC Buildbot (legacy) Build 9243: arc lint + arc unit
Event Timeline
src/qt/CMakeLists.txt | ||
---|---|---|
164 ↗ | (On Diff #7684) | How this isn't windows only ? What is configure doing ? |
src/qt/CMakeLists.txt | ||
---|---|---|
164 ↗ | (On Diff #7684) | Yes, this is windows only. Configure does the same in bitcoin_qt.m4: case $host in # [...] *mingw*) BITCOIN_QT_CHECK([ AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)]) ]) esac |
I discovered by chance that cmake targets have a property which does exactly the same
(setting the exact same flag) in a more cmake fashion way.
This property has no impact if the build is not a windows executable, so no need to
make it explicitely windows only.
From the cmake mailing list, this tends to confirm that this property has no impact outside of a windows build: https://cmake.org/pipermail/cmake/2008-March/020577.html