-
Notifications
You must be signed in to change notification settings - Fork 87
Building on Windows
- Download Qt5
- Download NSIS
- Download OpenSSL (1.0.x) from here
- Visual C++ Redistributables for both x86 and x86_64 from here (if you have Visual Studio 2013, if not get redistributables for version you are going to use)
- Enable PowerShell (run
Set-ExecutionPolicy unrestricted
as administrator in power shell)
Open huggle3-qt-lx/windows and run release.ps1
, despite the fact that it may fail. If it does fail, it will show a clear error that tells you what is wrong and how to fix it. Follow that.
Once you build the x86 version, you can open the windows64 folder and run pack.ps1, which will build a setup for the 64-bit version Huggle.
IMPORTANT: Libraries, Windows and tools used to create official packages are changing extremely frequently, so you may not be able to build a working installation package straight away without some tweaking to match your versions. For example it may be necessary to add extra Visual Studio redist packages for different versions of Visual Studio than you used to compile Huggle in order to get OpenSSL working (these may be compiled with different Visual Studio versions than Huggle). You will need to update some variables in PowerShell scripts to match your versions of libraries.
Huggle requires two files that are automatically generated by packaging scripts.
- src/huggle_core/version.txt
- src/huggle_core/definitions.hpp
In case you are running custom builds and don't use any of the packaging scripts, you need to make these files yourself. For definitions, you only need to copy definitions_prod.hpp to definitions.hpp (then you can modify it to your needs). For version.txt, you can either run update.sh in bash, or create an empty text file called version.txt. This will also work, although there will be less information about Huggle's version in the About form.
- Install cmake
- Run cmake, configure and generate with -DHUGGLE_EXT=true -DQT5_BUILD=true (file huggle/CMakeLists.txt)
- Open generated huggle.sln file in Visual Studio
- Build whole solution
Note: Sometimes MOC fails, so you may need to keep restarting build until it finishes, this is a Qt bug.