Skip to content

Building on Windows

Александр Старочкин edited this page Nov 7, 2021 · 5 revisions
scoop install gcc

if it errors with 404, fix C:/Users/USERNAME/scoop/buckets/main/bucket/gcc.json (change to mirrors.huaweicloud.com)

        "64bit": {
            "url": [
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-binutils-2.34-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-crt-git-8.0.0.5815.9517d302-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-expat-2.2.9-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-gcc-9.3.0-2-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-gcc-fortran-9.3.0-2-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-gcc-libgfortran-9.3.0-2-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-gcc-libs-9.3.0-2-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-gettext-0.19.8.1-8-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-gmp-6.2.0-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-headers-git-8.0.0.5815.9517d302-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-isl-0.22.1-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-libiconv-1.16-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5814.9dbf4cc1-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-make-4.3-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-mpc-1.1.0-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-mpfr-4.0.2-2-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-pkg-config-0.29.2-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-windows-default-manifest-6.4-3-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-winpthreads-git-8.0.0.5814.9dbf4cc1-1-any.pkg.tar.xz",
                "http://mirrors.huaweicloud.com/msys2/mingw/x86_64/mingw-w64-x86_64-zlib-1.2.11-7-any.pkg.tar.xz"
            ],
            "hash": [
                "c2c23fc704639f0e30a6aa094130f12028fd722d5961ef29df503f241d0bd93e",
                "b2c79727807bf1c13881dbc5cc49617105e317cfff8a4e946d420163048fccb5",
                "04ee9cc360b1aefb3729fec475001e1d35d94979a7dea1e604ac56015216df99",
                "29ccb0030d1dae9fd194bb5bc76ba7330a7478b0afe1b2c0c19419a59c0980ef",
                "228f8cb9ef89806fd96aba00d814d1f038e7ef84e5926730b427d79b5f225b73",
                "c88596218c06622ee22df85bbd2f5b7e6fb99ea86f946d5f98f9c24b97f92dd0",
                "596749645071942369ce93266f7622d64d53daf1cd509ca3b86782add9ef714a",
                "0349bd137cd15ec2e3e882b1b8152ffc4bc5369999b0aa1999c6b087c34148bc",
                "5cb1a3b31c95cfb0c9dafa93b2898479ac660e5ac931be54f7dddc8e726f98d0",
                "cbe0b0a1af6c46ff2bf3f4cc8f96e73c862a2b11781bd21d6e10cbb4fba587da",
                "202d28c4d0eeb38837afa39c157c3c1c046ae313641e1a348e1ff60787d447da",
                "b37b013727b16a90095deb90cecdc073c5bb8dde26886448e2cbf357b29c1271",
                "35d49b330e55c347644e4c0a8d8ce0886ae6b005c0ab1b0bb28bbcf563754704",
                "7863472b0763a1a6ca70bdcc6e98df3b2016b221c9da5fe264b28d1c6e1c236c",
                "d7c59f4e347a86e1cf1c539277fd3e43096846642b1cdf764cae1a8a4e783374",
                "322712f92173473913b3199988301c3b32639289a4410ba31e732e54bacf3143",
                "f69c6a4f83164db254178821009e69877855a5dfbfc6b7c5a796cb79964ddaf0",
                "6c0ea4adcef503dc8174e9d4d70a10aee8295d620db4494f78fa512df0589dcf",
                "9c8a641161971830f65503b45b0307a691fb13736815f7fdc30988dee07feb01",
                "1decf05b8ae6ab10ddc9035929014837c18dd76da825329023da835aec53cec2"
            ],
            "pre_install": [
                "Move-Item \"$dir\\mingw64\\*\" \"$dir\"",
                "Remove-Item \"$dir\\mingw64\", \"$dir\\.*\""
            ],
            "post_install": [
                "ensure \"$dir\\bin\\bak\" | Out-Null",
                "Move-Item \"$dir\\bin\\python*.exe\" \"$dir\\bin\\bak\""
            ]
        },
  • install zlib if it is not installed
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/horta/zlib.install/master/install.bat', 'install.bat')"; ./install.bat
git clone https://github.com/taglib/taglib
cd taglib; md build; cd build
cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Libraries\taglib -DBUILD_SHARED_LIBS=OFF -DENABLE_STATIC_RUNTIME=ON ..
make
make install
  • install Python (don't forget to add it to PATH)
  • install yandex_music and pypresence python libraries using pip
pip install yandex_music
pip install pypresence
  • clone and open DMusic in QtCreator, select Release configuration, click build icon
  • copy DMusic.exe to new directory and open this directory in terminal
  • deploy release build using windeployqt
C:/Qt/5.15.2/mingw81_64/bin/windeployqt.exe --qmldir DMUSIC_SOURCE_DIRECORY/qml ./DMusic.exe
  • run DMusic
Clone this wiki locally