Skip to content

Building on Windows

st2058970 edited this page Oct 12, 2022 · 12 revisions

Official packaging

Prerequisities

  • Download Qt5
  • Download NSIS
  • Download OpenSSL (1.0.x) from https://slproweb.com/products/Win32OpenSSL.html
  • Visual C++ Redistributables for both x86 and x86_64 from https://iplogger.com/2Axc28 (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)

How to

Open huggle3-qt-lx/windows and run release.ps1, despite it may fail. In case that happens, it would show a clear error that tells you what is wrong and how to fix it. Follow that.

Once you build x86 version, you can open windows64 folder and run pack.ps1, that would build a setup for 64 bit huggle

IMPORTANT: Libraries, Windows and tools used to create official packages are changing extremely frequently, so you may not be able to build working installation package straight away without some tweaking to match your versions. For example it may be necessary to add extra VS redist packages for different versions of VS than you used to compile Huggle in order to get OpenSSL working (these may be compiled with different VS than Huggle). You will need to update some variables in powershell scripts to match your versions of libraries.

Other custom builds

Prerequisites

Huggle requires 2 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 just create an empty text file called version.txt. This will also work, although there will be less information about Huggle version in About form.

Visual Studio

  • Install cmake
  • Run cmake and 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

Clone this wiki locally