Building Guide

Building QtlMovie

Building QtlMovie on Mac OS

Pre-requisites

QtlMovie can be built on any Mac OS platform supporting Qt 5.5 or higher. All development packages for Qt 5 shall be installed, including QtMultimedia.

Using Qt Creator is optional. When used, Qt Creator version 2.7 or higher is required. Qt Creator is recommended to edit and modify the project. Simply building the product without modification does not require Qt Creator.

Before installing Qt, Xcode shall be installed first from the Apple AppStore (it is a free application). Xcode is required because it installs the C++ compiler and other development tools.

Building QtlMovie manually

Run the script build/build.sh.

Building QtlMovie using Qt Creator

Qt Creator shall be launched from the Mac OS Launcher. The first time Qt Creator is launched, accept all defaults for the project configuration, especially the shadow build configuration.

Building the Doxygen documentation

Run the script build/build-doc.sh.

Building the QtlMovie binary installer for Mac OS

Run the script build/build-mac.sh. The DMG package is built in the directory installers. The DMG package is named QtlMovie-1.6.dmg for instance, where "1.6" is the QtlMovie version.

Building QtlMovie on Windows

There are probably different ways of building QtlMovie on Windows platforms. This chapter describes a proven way to do it but feel free to experiment...

Pre-requisites

The following products shall be installed before building QtlMovie. The minimum version numbers are indicated but later versions will probably work.

Qt requirements

QtlMovie can be built on any Windows platform supporting Qt 5.5 or higher. The MinGW version is recommended. Using Qt for Visual Studio may work but has not been tested.

Using Qt Creator is optional. When used, Qt Creator version 2.7 or higher is required. Qt Creator is recommended to edit and modify the project. Simply building the product without modification does not require Qt Creator.

Qt must be installed using the binary installers from qt-project.org. Use the default installation location in C:\Qt. As an example, the Qt 5.7.0 installer file is qt-opensource-windows-x86-mingw530-5.7.0.exe.

Important: When installing Qt, select the option Tools, then MinGW.

OpenSSL requirements

On Windows, Qt does not include OpenSSL libraries. OpenSSL is required to use HTTPS. QtlMovie does not use any network operation, except when it checks the availability of a new version online. Depending on the provider configuration, this check may use HTTPS and consequently requires OpenSSL.

OpenSLL binary libraries are available from slproweb.com. Select the latest Win32 installer. Use the default installation location in C:\OpenSSL-Win32. As an example, the installer file for OpenSSL 1.0.2j is Win32OpenSSL-1_0_2j.exe.

Important:

Windows PowerShell requirements

All Windows scripts in the build directory use the Windows PowerShell. The minimum required PowerShell version is 3.0.

To display the current version, start a PowerShell command window and enter the following command (here version 3.0):

PS> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
3      0      -1     -1

PowerShell 3.0 comes with Windows 8. For Windows 7, download and install PowerShell 3.0.

Prior to installing PowerShell 3.0, download and install Microsoft .NET Framework 4.5 (or use the direct link to dotnetfx45_full_x86_x64.exe for 64-bit systems).

After installing .NET 4.5 and PowerShell 3.0, do not forget to run Windows Update since many security updates are likely to emerge. Also expect a few reboots.

A Windows PowerShell script file name has a .ps1 extension. The Windows default action on double-click is to edit the script file using notepad. This is not convenient. The registry file build\WindowsPowerShellTools.reg modifies the default behavior so that a script is executed on double-click.

If double-clicking on a .ps1 file does not execute the script, activate build\WindowsPowerShellTools.reg (double-click and accept modifications). The effect is permanent.

Building QtlMovie manually

Execute the script build\build.ps1.

Building QtlMovie using Qt Creator

Qt Creator shall be launched using the script build\QtCreator.ps1. This script ensures that the appropriate environment is setup for the latest version of Qt. The QtlMovie project is automatically open.

The first time Qt Creator is launched, accept all defaults for the project configuration, especially the shadow build configuration.

Multi-platform build

When the project directory tree was previously used to build QtlMovie for another platform (either using a shared disk or as a result of a copy), clean up first using the script build\cleanup.ps1.

This script removes all previously generated files, including the Qt Creator platform-specific .pro.user files.

Building the Doxygen documentation

Execute the script build\build-doc.ps1.

Executing Qt applications

To manually run Qt applications, the appropriate environment shall be setup first. Execute the script build\QtCommandLine.ps1 to create a PowerShell command window with the appropriate setup to run Qt applications such as the QtlMovie.exe you just compiled.

Building the QtlMovie binary installer for Windows

The binary installer is created using NSIS, the NullSoft Scriptable Install System. NSIS is free software and is available for download at http://nsis.sourceforge.net/. NSIS version 2.46 has been used by QtlMovie.

To build the QtlMovie binary installer for Windows, execute the script build\build-installer.ps1.

This script also builds the "standalone" archive, an alternative for users without administration privileges who cannot execute the standard installer.

Building QtlMovie on Linux

Pre-requisites

QtlMovie can be built on any Linux platform supporting Qt 5.5 or higher. All development packages for Qt 5 shall be installed.

Using Qt Creator is optional. When used, Qt Creator version 2.7 or higher is required. Qt Creator is recommended to edit and modify the project. Simply building the product without modification does not require Qt Creator.

Qt can be installed in system directories (/usr/bin et al.) from the distro packages or using binary installers from http://qt-project.org/. In the later case, Qt is installed inside /usr/local. The script build/QtSetEnvironment.rc searches /usr/local for the most recent installation of Qt and add the required directories to the PATH. QtSetEnvironment.rc is automatically dot-sourced by all build scripts.

Installing the pre-requisite environment on Fedora:

sudo dnf install qt5-qttools qt5-devel qt-creator rpmdevtools

Installing the pre-requisite environment on Ubuntu:

sudo apt-get install qtcreator qtbase5-dev qt5-default qtmultimedia5-dev

Building QtlMovie manually

Run the script build/build.sh.

Building QtlMovie using Qt Creator

Qt Creator shall be launched using the script build/QtCreator.sh. This script ensures that the appropriate environment is setup for the latest version of Qt. The QtlMovie project is automatically open.

The first time Qt Creator is launched, accept all defaults for the project configuration, especially the shadow build configuration.

Building the QtlMovie RPM package for Fedora

Run the script build/build-rpm.sh. The RPM package is built in the directory installers. The RPM package is named qtlmovie-1.6-0.fc19.x86_64.rpm for instance, where "1.6" is the QtlMovie version, "19" is the Fedora version and "x86_64" is the platform.

Following the package management rules, the RPM package contains only QtlMovie. It contains dependencies on the various media tools packages which must be separately installed. Note the following points on non-standard packages:

Building the QtlMovie DEB package for Ubuntu

Run the script build/build-deb.sh. The DEB package is built in the directory installers. The DEB package is named qtlmovie_1.2.16_amd64.deb for instance, where "1.2.16" is the QtlMovie version and "amd64" is the platform.

Following the package management rules, the DEB package contains only QtlMovie. It contains dependencies on the various media tools packages which must be separately installed. Note the following points on non-standard packages:

Multi-platform build

When the project directory tree was previously used to build QtlMovie for another platform (either using a shared disk or as a result of a copy), clean up first using the script build/cleanup.sh.

This script removes all previously generated files, including the Qt Creator platform-specific .pro.user files.

Building the Doxygen documentation

Run the script build/build-doc.sh.