{"action":"created","issue":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4589","repository_url":"https://api.github.com/repos/qbittorrent/qBittorrent","labels_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4589/labels{/name}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4589/comments","events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4589/events","html_url":"https://github.com/qbittorrent/qBittorrent/issues/4589","id":127205507,"number":4589,"title":"Build for windows","user":{"login":"tomaspy","id":1788469,"avatar_url":"https://avatars.githubusercontent.com/u/1788469?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaspy","html_url":"https://github.com/tomaspy","followers_url":"https://api.github.com/users/tomaspy/followers","following_url":"https://api.github.com/users/tomaspy/following{/other_user}","gists_url":"https://api.github.com/users/tomaspy/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaspy/subscriptions","organizations_url":"https://api.github.com/users/tomaspy/orgs","repos_url":"https://api.github.com/users/tomaspy/repos","events_url":"https://api.github.com/users/tomaspy/events{/privacy}","received_events_url":"https://api.github.com/users/tomaspy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/labels/Windows","name":"Windows","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-01-18T11:15:08Z","updated_at":"2016-02-16T17:22:11Z","closed_at":null,"body":"Hi All,\r\n\r\nI try the all of combination for windows build. I get error always for any new version source like libtorrent, qbtorrent etc etc... For me this is the only one combination what is work without error.\r\nFor new version QB RECOMMENDED a NEW build guide for windows.\r\nOn other operation system OSX, linux the build is work fine:)\r\nIf you know any working build combination with guide please post it.\r\n\r\nHere is the working guide and combination for windows:\r\n\r\nThe Microsoft Visual C++ 2013 compiler\r\nPerl 5.20.1.1 x86\r\nNASM assembler 2.11.05\r\n zlib. 1.2.8\r\n OpenSSL 1.0.1i \r\n Boost libraries 1.56.0\r\n libtorrent-rasterbar 0.16.17\r\n Qt4 source 4.8.6\r\n Qt Creator 3.2.1 \r\n qBittorrent 3.1.12\r\n\r\nLet's assume that the working directory(ies) for our compilation will be:\r\n\r\nFor x86: C:\\qBittorrent\r\n\r\nInstall Perl.\r\nInstall Qt Creator.\r\nExtract NASM inside our working dir, eg.:\r\nFor x86: C:\\qBittorrent\\nasm\r\n\r\nExtract the zlib source inside our working dir(s).\r\nRename the resulting dir(s) from zlib-x.x.x to just zlib.\r\nOpen the MSVC2013 command shell:\r\nFor x86: Start->Programs->Visual Studio 2013->Visual Studio Tools->VS2013 x86 Native Tools Command Prompt\r\nNavigate to the zlib source folder:\r\nFor x86: pushd C:\\qBittorrent\\zlib\r\nEdit the win32\\Makefile.msc file.\r\nFind the line starting with CFLAGS\r\nReplace -MD with -GL -MT -Zc:wchar_t-\r\nFind the line starting with LDFLAGS\r\nReplace -debug with -opt:icf -dynamicbase -nxcompat -ltcg /nodefaultlib:msvcrt\r\nIssue the following commands:\r\n\r\nFor x86:\r\nnmake -f win32/Makefile.msc LOC=\"-DASMV -DASMINF -DNDEBUG -I.\" OBJA=\"inffas32.obj match686.obj\"\r\n\r\nxcopy zlib.h C:\\qBittorrent\\install\\include\\\r\nxcopy zconf.h C:\\qBittorrent\\install\\include\\\r\nxcopy zlib.lib C:\\qBittorrent\\install\\lib\\\r\nxcopy zlib.pdb C:\\qBittorrent\\install\\lib\\\r\n\r\nCompiling OpenSSL\r\nMake sure you have installed Perl and NASM (for x86).\r\nExtract the OpenSSL source inside our working dir(s).\r\nRename the resulting dir(s) from openssl-x.x.x to just openssl.\r\nOpen the MSVC2013 command shell:\r\nFor x86: Start->Programs->Visual Studio 2013->Visual Studio Tools->VS2013 x86 Native Tools Command Prompt\r\nNavigate to the OpenSSL source folder:\r\nFor x86: pushd C:\\qBittorrent\\openssl\r\nNow we will build a static version of OpenSSL. Issue the following commands:\r\n\r\nset \"PATH=%PATH%;C:\\qBittorrent\\nasm\"\r\nperl Configure VC-WIN32 no-shared zlib no-zlib-dynamic threads --prefix=C:\\qBittorrent\\install -IC:\\qBittorrent\\install\\include -LC:\\qBittorrent\\install\\lib\r\nms\\do_nasm\r\n\r\nEdit the ms\\nt.mak file:\r\n\r\nFind the line that starts with: EX_LIBS\r\nReplace zlib1.lib with zlib.lib\r\nFind the line that starts with: CFLAG\r\nAppend: /Zc:wchar_t- /GL /Zi\r\nFind the line that starts with: LFLAGS\r\nReplace /debug with /incremental:no /opt:icf /dynamicbase /nxcompat /ltcg /nodefaultlib:msvcrt\r\nThen issue the following:\r\n\r\nnmake -f ms\\nt.mak\r\nnmake -f ms\\nt.mak install\r\n\r\nCompiling Boost\r\nExtract the Boost sources in the working dir(s).\r\nRename the resulting dir(s) from boost_x_x_x to just boost.\r\nOpen the MSVC2013 command shell:\r\nFor x86: Start->Programs->Visual Studio 2013->Visual Studio Tools->VS2013 x86 Native Tools Command Prompt\r\nNavigate to the Boost source folder:\r\n\r\nFor x86: pushd C:\\qBittorrent\\boost\r\nNow you will need to bootstrap Boost so it will build b2.exe. Issue the following command: bootstrap.bat vc12\r\n\r\nb2 -q --with-system --toolset=msvc-12.0 variant=release link=static runtime-link=static debug-symbols=off warnings=off warnings-as-errors=off\r\n\r\nCompiling libtorrent\r\nExtract the libtorrent sources in the working dir(s).\r\nRename the resulting dir(s) from libtorrent-rasterbar-x.x.x to just libtorrent.\r\nOpen the MSVC2013 command shell:\r\nFor x86: Start->Programs->Visual Studio 2013->Visual Studio Tools->VS2013 x86 Native Tools Command Prompt\r\nNavigate to the libtorrent source folder:\r\nFor x86: pushd C:\\qBittorrent\\libtorrent\r\n\r\n..\\boost\\b2 -q --prefix=\"stage\" --without-python --toolset=msvc-12.0 variant=release link=static runtime-link=static encryption=openssl logging=none geoip=static dht-support=on boost=source character-set=unicode boost-link=static -sBOOST_ROOT=\"C:\\qBittorrent\\boost\" include=\"C:\\qBittorrent\\install\\include\" library-path=\"C:\\qBittorrent\\install\\lib\" install\r\n\r\nCompiling Qt4\r\nExtract the Qt4 sources in the working dir(s).\r\nRename the resulting dir(s) from qt-everywhere-opensource-src-x.x.x to just qt4.\r\nOpen the MSVC2013 command shell:\r\nFor x86: Start->Programs->Visual Studio 2013->Visual Studio Tools->VS2013 x86 Native Tools Command Prompt\r\nNavigate to the Qt4 source folder:\r\nFor x86: pushd C:\\qBittorrent\\qt4\r\nNow we will build a static version of Qt4 with making as small as possible.\r\nOpen mkspecs\\win32-msvc2013\\qmake.conf and replace the\r\nFind the line that starts with: QMAKE_CFLAGS_RELEASE\r\nReplace -MD with -GL -MT\r\nFind the line that starts with: QMAKE_LFLAGS\r\nReplace /NXCOMPAT with /NXCOMPAT /LTCG\r\nFind the line that starts with: QMAKE_LFLAGS_RELEASE\r\nReplace /INCREMENTAL:NO with /INCREMENTAL:NO /NODEFAULTLIB:MSVCRT\r\nOpen src\\3rdparty\\zlib_dependency.pri and src\\tools\\bootstrap\\bootstrap.pri\r\nReplace zdll.lib with zlib.lib\r\nIssue the following commands:\r\n\r\nconfigure.exe -release -opensource -confirm-license -static -ltcg -fast -system-zlib -no-qt3support -no-opengl -no-openvg -no-dsp -no-vcproj -no-dbus -no-phonon -no-phonon-backend -no-multimedia -no-audio-backend -no-webkit -no-script -no-scripttools -no-declarative -no-declarative-debug -mp -arch windows -qt-style-windowsxp -nomake examples -nomake demos -platform win32-msvc2013 -openssl-linked -largefile -I \"C:\\qBittorrent\\install\\include\" -L \"C:\\qBittorrent\\install\\lib\"\r\n\r\nbin\\qmake.exe projects.pro QT_BUILD_PARTS=\"libs translations\"\r\n\r\nnmake\r\n\r\nYou can close the command prompt now.\r\n\r\nConfiguring Qt Creator\r\nLaunch Qt Creator and select Tools->Options...\r\nSelect the Build & Run item from the left and select the Qt Versions tab.\r\nFor x86:\r\nClick the Add... button and select qmake.exe. It should be in: C:\\qBittorrent\\qt4\\bin\\qmake.exe\r\nName it something meaningful like Qt4 - MSVC2013 (x86)\r\n\r\nFor x86:\r\nClick the Add... button and name it x86\r\nIn Compiler select Microsoft Visual C++ Compiler 12.0 (x86)\r\nIn Qt version select Qt4 - MSVC2013 (x86)\r\n\r\nCompiling qBittorrent\r\nExtract the qBittorrent sources in the working dir(s).\r\nGo to Maxmind and download the GeoLite Country database in binary format. Here is the link. Extract the GeoIP.dat file to: src\\gui\\geoip\r\nOpen the winconf.pri file, edit and adjust the paths:\r\n\r\nFor both:\r\nReplace _WIN32_WINNT=0x0500 with _WIN32_WINNT=0x0501\r\nFor x86:\r\nReplace C:/qBittorrent/boost_1_51_0 with C:/qBittorrent/boost\r\nReplace C:/qBittorrent/RC_0_16/include with C:/qBittorrent/libtorrent/include\r\nReplace C:/qBittorrent/Zlib/include with C:/qBittorrent/install/include\r\nReplace C:/qBittorrent/boost_1_51_0/stage/lib with C:/qBittorrent/boost/stage/lib\r\nReplace C:/qBittorrent/RC_0_16/bin/<path-according-to-the-build-options-chosen> with C:/qBittorrent/libtorrent/stage/lib\r\nReplace C:/qBittorrent/Zlib/lib with C:/qBittorrent/install/lib\r\n\r\nOpen the winconf-msvc.pri file and adjust the filename of the lib of Boost:\r\n\r\nCheck C:\\qBittorrent\\boost\\stage\\lib or C:\\qBittorrent64\\boost\\stage\\lib for the .lib name, it should be named in this format: libboost_system-vcx-mt-s-x_x.lib, eg: libboost_system-vc120-mt-s-1_56.lib\r\nReplace libboost_system-vc90-mt-s-1_51.lib with the .lib name.\r\nLaunch Qt Creator and open the qbittorrent.pro file.\r\n\r\nFor x86: check the x86 checkbox and click Configure Project\r\n\r\nChange the configuration from Debug to Release in the left side of the window (where the computer icon is).\r\n\r\nSelect Build->Build All\r\n\r\nAfter the compilation ends you should have qbittorrent.exe in:\r\n\r\nFor x86: C:\\qBittorrent\\build-qbittorrent-x86-Release\\src\\release"},"comment":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/comments/184784931","html_url":"https://github.com/qbittorrent/qBittorrent/issues/4589#issuecomment-184784931","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4589","id":184784931,"user":{"login":"Papanikles","id":8446383,"avatar_url":"https://avatars.githubusercontent.com/u/8446383?v=3","gravatar_id":"","url":"https://api.github.com/users/Papanikles","html_url":"https://github.com/Papanikles","followers_url":"https://api.github.com/users/Papanikles/followers","following_url":"https://api.github.com/users/Papanikles/following{/other_user}","gists_url":"https://api.github.com/users/Papanikles/gists{/gist_id}","starred_url":"https://api.github.com/users/Papanikles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Papanikles/subscriptions","organizations_url":"https://api.github.com/users/Papanikles/orgs","repos_url":"https://api.github.com/users/Papanikles/repos","events_url":"https://api.github.com/users/Papanikles/events{/privacy}","received_events_url":"https://api.github.com/users/Papanikles/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T17:22:11Z","updated_at":"2016-02-16T17:22:11Z","body":"My bad. I selected \"c:/qt5/qtbase/bin\" and correct is \"c:/qt5/bin\".\r\n\r\nBut now I have other problem. QT Creater 3.6.0 give me this error:\r\n`C:\\qBittorrent\\qbittorrent-3.3.3\\src\\app\\qtsingleapplication\\qtlocalpeer.cpp:-1: error: C1041: cannot open program database 'C:\\qBittorrent\\build-qbittorrent-x86-Release\\src\\vc140.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS`"}}