-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Compiling the whole project
Notice: It is important to install the exact versions of the tools mentioned hereafter.
- Install Visual Studio 2013 (
en_visual_studio_ultimate_2013_with_update_5_x86_dvd_6815896.iso
) (make sure to install MFC). - Download Qt 5.6.3 (x86) for MSVC2013, install in
C:\Qt\qt-5.6.3-x86-msvc2013
. - Download Qt 5.6.3 (x64) for MSVC2013, install in
C:\Qt\qt-5.6.3-x64-msvc2013
. - Download Qt Creator 4.3.1, install in
C:\Qt\qtcreator-4.3.1
. - Install CMake based on your architecture.
- Install Windows SDK.
- Clone the repository (
development
branch) to your local drive. Make sure to include the submodules in your clone command!
git clone --recurse-submodules -b development https://github.com/x64dbg/x64dbg.git
Qt has made some changes to their licensing and deleted all the LTS packages (including source code) from their website. The original installers are mirrored on SourceForge and OSDN.
There is also a portable Qt archive Qt5.6.3-msvc2013-installed.7z, which is just both those installers extracted.
If you downloaded Qt5.6.3-msvc2013-installed.7z
you have to create your own kits. Relevant documentation:
- https://doc.qt.io/qtcreator/creator-project-qmake.html#setting-up-new-qt-versions
- https://doc.qt.io/qtcreator/creator-targets.html
Some screenshots showing how to configure 32-bit MSVC2013 Qt 5.6.3:
Pay attention to the warnings and select the compiler version that matches your Qt version (x86
for 32-bit, amd64
for 64-bit).
- Run
.github/format/install-git-hook.bat
to initialize the pre-commit formatting hooks - Run
setupdeps.bat
to copy the dependencies - Open
x64dbg.sln
in Visual Studio 2013 - Compile the solution in Release mode
- Open
src\gui\x64dbg.pro
in Qt Creator - Compile the GUI in Release mode.
While unsupported, people have built x64dbg with Visual Studio 2015/2017/2019 and/or newer Qt versions. If you use a different Qt version you have to run windeployqt.exe --force x64gui.dll
to do this automatically.
If you encounter build errors with newer Qt or Visual Studio versions, a pull request is appreciated!
You can get the latest Qt versions from: https://www.qt.io/offline-installers
If you do not like Qt Creator you can try the Qt Visual Studio Tools.
This video is slightly outdated. The process is still the same, except that you have to install Qt 5.6.0 (see the first section of this documented).
There is a video available where the build process (after installing the prerequisites) is shown. It is available on YouTube and in SWF Format.
This is a video by a_a_
but it uses Visual Studio 2017 and Qt 5.8 (both of which are currently not officially supported): https://vimeo.com/213004417 Note: The video is a bit dated, and the copy_libs.bat
script displayed in the video does not copy all required DLLs to the output folder. Make sure to run setupdeps.bat
before running the copy_libs.bat
displayed in the video in order to copy all required DLLs to the output folder. Alternatively, run setupdeps.bat
and then delete all the Qt DLLs in the output bin folder, and replace them with ones from your Qt version.
If you install Qt and/or Visual Studio in different paths, you can set (global) environment variables to make setenv.bat create a custom environment for compiling with build.bat.
set QT32PATH=C:\Qt\qt-5.6.3-x86-msvc2013\5.6.3\msvc2013\bin
set QT64PATH=C:\Qt\qt-5.6.3-x64-msvc2013\5.6.3\msvc2013_64\bin
set QTCREATORPATH=C:\Qt\qtcreator-4.3.1\bin
set VSVARSALLPATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
Note: Due to continued vandalism it is no longer possible to edit the wiki directly. Instead you can suggest an edit in the x64dbg/wiki repository.