Building on Linux

Prerequisites and Dependancies

You will need:

  • The Qt 5.x libraries development packages, including Webkit (or Webengine, but Webkit is still the default. See below for how to use Webengine), Network and Script, which sometimes come in different packages.

  • The Qt 'qmake' tool for the same version.

  • jsoncpp (https://github.com/open-source-parsers/jsoncpp). This is packaged as libjsoncpp-dev on Debian.

  • libcurl (libcurl-dev)

  • libmicrohttpd (libmicrohttpd-dev)

  • libexpat (libexpat1-dev)

  • Only for building from git source, and for libupnpp: the autotools (autoconf, automake, libtool).

You need to download the release tar files for libnpupnp, libupnpp and upplay, or clone the git repositories: libnpupnp, libupnpp, upplay.

Building

Extract the source for libupnpp and upplay, use the following procedures:

Building libnpupnp:

cd libnpupnp-x.y.z
./configure --prefix=/usr
make
sudo make install

Building libupnpp:

cd libupnpp-x.y.z
./configure --prefix=/usr
make
sudo make install

Building upplay:

cd upplay-x.y.z
qmake
make
sudo make install

And you should now be able to upplay

The above examples are for source extracted from tar release files. For git source, you need to adjust the names of the top directories, and use the following command before the libupnpp 'configure':

sh autogen.sh

Building on Mac OS X

Thanks to Jacques Distler for providing the procedure:

Note
for libupnpp versions 0.16.0 and earlier and upplay versions 1.2.11 and earlier, you will need to unset libupnpp_la_LDFLAGS in the 'Makefile' before building libupnpp, and add -lupnp to LINK in the upplay 'Makefile'. These should be fixed in later versions.
  1. Install QT. We used to rely on Fink to do this, but it is now preferable to use the qt.io builds. Get Qt from https://www.qt.io/download and follow the installation instructions. You just need the base Desktop Qt package.

  2. The above does not include Qt Webkit any more. You can get it from https://github.com/annulen/webkit/releases

  3. Build and install the jsconcpp library

    cd [distribution directory]
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=ON -G "Unix Makefiles" ..
    make
    sudo make install
  4. Install libupnp. Extract the source code, then:

    cd [distribution directory]
    ./configure
    make
    sudo make install
  5. Install libupnpp. Extract the source code, then:

    cd [distribution directory]
    CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib \
    upnp_CFLAGS=-I/usr/local/include upnp_LIBS=-L/usr/local/lib \
    ./configure --libdir=/usr/local/lib --includedir=/usr/local/include
    make
    sudo make install
  6. Install Upplay. Extract the source code, then:

    cd [distribution directory]
    /path/to/Qt/5.12.1/clang_64/bin/qmake PREFIX=/usr/local
    make
    sudo make install
  7. Finally, install a link in the usual 'Applications' folder:

    sudo ln -s /usr/local/bin/upplay.app /Applications/upplay.app

Building with Webengine

To build with webengine, one manual edit must be performed before running qmake: edit upplay.pro and uncomment the "WEBPLATFORM = webengine" line.

For versions older than 1.3.9, another thing needed to be done: - Copy dirbrowser/dirbrowser.ui.webengine to dirbrowser/dirbrowser.ui