Skip to content

Build From Source (Windows)

Jj0YzL5nvJ edited this page Nov 10, 2021 · 32 revisions

Building From Source (Windows)

Prerequisites:

  • Minimal supported OS version : Windows 7 32-bit

  • MS Visual Studio 2017 or newer

  • Git for Windows, download and install. Open Git Bash console in your workspace folder, to clone type:

    git clone https://github.com/gonetz/GLideN64.git

  • Advanced users who prefer to use CMD, this way

  • Set user environment variables. Run: rundll32 sysdm.cpl,EditEnvironmentVariables then New. Or right click on:

    This Computer > Properties > Additional system settings > Environment variables > New

    1. PJ64PluginsDirQT - Set its value as path for the Qt version of the 32-bit zilmar spec plugin (Project64, 1964, etc)
    2. PJ64PluginsDirQT_x64 - Set its value as path for the Qt version of the 64-bit zilmar spec plugin
    3. PJ64PluginsDirWTL - Set its value as path for the WTL version of the 32-bit zilmar spec plugin (Project64, 1964, etc)
    4. PJ64PluginsDirWTL_x64 - Set its value as path for the WTL version of the 64-bit zilmar spec plugin
    5. Mupen64PluginsDir - Set its value as path for the CLI version of the 32-bit plugin of mupen64plus
    6. Mupen64PluginsDir_x64 - Set its value as path for the CLI version of the 64-bit plugin of mupen64plus

Note: For the Qt (GUI) versions of mupen64plus, use MSYS2 or something and see "Build From Source (Linux)"

To build the CLI version of mupen64plus:

  • All necessary libs are already in the project
  • Open solution file from Visual Studio: projects\msvc\GLideN64.sln
  • To build the debug version select configuration "Debug_mupenplus"
  • To build the release version select configuration "Release_mupenplus"
  • Select platform. Win32 or x86 for 32-bit emulators, x64 for 64-bit ones
  • Press F7 or choose Build > Build solution from the menu bar
  • After a successful build, the resulting files will be copied to the folders set in the environment variables

To build the WTL version of zilmar spec:

  • Open solution file from Visual Studio: projects\msvc\GLideN64.sln
  • To build the debug version select configuration "Debug_wtl"
  • To build the release version select configuration "Release_wtl"
  • Select platform. Win32 or x86 for 32-bit emulators, x64 for 64-bit ones
  • Press F7 or choose Build > Build solution from the menu bar
  • After a successful build, the resulting files will be copied to the folders set in the environment variables

Prerequisites to build the Qt version of zilmar spec:

How to build GLideNUI

GLideNUI uses static build of QT libraries. You may build them from sources (right way) or download archive with precompiled ready to use libs (lazy way)

Lazy way:

Right way:

Prerequisites:

  • Python is necessary for building QT from sources. Download and install Python for Windows somewhere. This instruction implies that it is installed in C:\Tools\Python
  • Perl also can be handy. Download and install Perl for Windows somewhere. This instruction implies that it is installed in C:\Tools\Perl
  • jom. jom is a clone of nmake to support the execution of multiple independent commands in parallel. It works much faster than nmake on PC with multicore CPU. Download binary package and unpack somewhere. This instruction implies that it is unpacked to C:\Tools\jom

Build steps:

  • Open Visual Studio command prompt. In command line window type
SET PATH=C:\Tools\Python;C:\Tools\Perl\bin;C:\Tools\jom;%PATH%
git clone git://code.qt.io/qt/qt5.git -b 5.15
cd qt5
git submodule update --init --recursive
mkdir qt5-build
cd qt5-build
..\configure -no-freetype -qt-libpng -qt-zlib -qt-pcre -qt-libjpeg -c++std c++11 -mp -debug-and-release -opensource -confirm-license -static -static-runtime -make libs -nomake tools -nomake examples -nomake tests -prefix C:\Qt\qt-5_15-x86-msvc2017-static -platform win32-msvc2017 -opengl desktop -no-openssl -style-windowsvista -optimize-size
jom
jom install

Build will take time. Wait...

Setup Visual Studio to work with QT

  • You need QT add-in for Visual Studio For Visual Studio 2017 or newer, open Tools > Extensions and Updates > Online. Search for QT. Install QT Visual Studio tools
  • Restart Visual Studio
  • Open solution file from Visual Studio: projects\msvc\GLideN64.sln
  • Open QT5 - QTOptions dialog and add path to your QT build
  • Right click on GLideN64 solution and select Change Solution QT version. Select your build
  • Select "Debug" or "Release" configuration
  • Build GLideNUI project

To build the Qt version of zilmar spec:

  • Open solution file from Visual Studio: projects\msvc\GLideN64.sln
  • To build the debug version select configuration "Debug_qt"
  • To build the release version select configuration "Release_qt"
  • Select platform. Win32 or x86 for 32-bit emulators, x64 for 64-bit ones
  • Press F7 or choose Build > Build solution from the menu bar
  • After a successful build, the resulting files will be copied to the folders set in the environment variables

Optional batch script:

Prerequisites (CMD):

  • Basic knowledge of DOS or CMD
  • Run the command projects\msvc\GLideN64_Builder.cmd and follow the instructions
  • Set some third party tools in PATH which are a prerequisite: 7z, git and curl
  • curl is optional, used to download and autoconfigure the precompiled Qt for v141 / v142 PlatformToolsets (VS2017-2019)
  • Pay attention to what you don't want to build