Home

Awesome

[DEPRECATED] qpmx

The Advanced Qt package manager - a frontend/replacement for qpm.

This project has been deprecated in favor of qdep. Please migrate all you packages and project to qdep as qpmx will not be maintained anymore.


Travis Build Status Appveyor Build status Codacy Badge AUR

Features

qpmx is designed as a package manager tool without any backend. It is an advanced tool with support for qpm and git package repositories, and provides a bunch of features to make the usage as easy as possible. The main features ares:

Backends

qpmx is a tool only, and thus needs external "backends" that provide it with packages. This is done via a simple plugin. Currently, two plugins are provided: git and qpm

QPM plugin

With the qpm plugin, qpmx can be used to install qpm packages, without loosing all the advantages like caching. It properly resolves dependencies, can search and is version-aware. It requires you to have qpm installed as well. Because qpm packages are not designed to be precompiled, there migth be issues with some packages. In case you encounter those, try switching to source mode.

GIT plugin

The git/github plugin supports any git repository. The urls are the package names, and the tags the versions. Tags must be real versions (e.g. 1.0.1). It cannot search, and may not support all url schemes. It also comes with a github provider, which can be used to have simpler names for github projects.

Installation

Examples

Have a look at https://github.com/Skycoder42/qpmx-sample-package. Its a project with a sample qpmx packages, as well as an application (https://github.com/Skycoder42/qpmx-sample-package/tree/master/qpmx-test) that uses this sample package. It's a git/github package with dependencies to qpm packages, to show off the possibilities.

General usage

Simply install packages using qpmx install (If not done automatically, prepare the pro file with qpm init --prepare <pro-file>). And thats it. Simply run qmake, and qpmx will automatically install, precompile and prepare packages, and include everything required to your pro file automatically.

Translations

To have translations properly working, you can use the TRANSLATIONS variable in both, qpmx packages and in your final project. Simply run make lrelease and translations will be compiled automatically. The same happens with files in EXTRA_TRANSLATIONS, but without joining them with qpmx package translations. You can use that one if you have more the 1 ts file per language. To install them, use the prepared target:

qpmx_ts_target.path = $$[QT_INSTALL_TRANSLATIONS] # or wherever you want to install them to
INSTALLS += qpmx_ts_target

Common use cases

Package Users

Package Developers

Special (qmake) stuff

qmake variables

VariableDescription
QPMX_EXTRA_OPTIONSAdditional option parameters for the qpmx init invocation
QPMX_TRANSLATE_EXTRA_OPTIONSAdditional option parameters for the qpmx translate invocation
QPMX_HOOK_EXTRA_OPTIONSAdditional option parameters for the qpmx hook invocation
PUBLIC_HEADERSqpmx package only: The headers to be used by users. If left empty, HEADERS is used
QPMX_WORKINGDIRThe (sub)directory to use for generation of qpmx files. If left empty, the build directory is used
EXTRA_TRANSLATIONSJust like TRANSLATIONS, but qpmx will not join those files with the qpmx translations (but still compile)
QPMX_INSTALL_DIRA special variable set for prc files included in static qpmx usage. Contains the path where the binaries etc. have been installed to

Extra targets

TargetDescription
qpmx_ts_targetA target to install compiled translations (.qm) files. Use like the target target (See https://doc.qt.io/qt-5/qmake-advanced-usage.html#installing-files)

Special CONFIG values

ValueDescription
qpmx_staticqpmx package only: Is defined when a qpmx package is build as static library
qpmx_src_buildqpmx package only: Is defined when a qpmx package is included as source package into a project
qpmx_no_libbuildDisable auto-detection of library builds. See section below

Note: If neither qpmx_static nor qpmx_src_build are defined, the package is used as static library in a project (typically, in your prc files)

QPMX libbuilds

In order to make it possible to use qpmx to create static and shared libraries that depend on qpmx packages but want to keep that dependency "internal", qpmx by default does 2 things to make this possible. Both can be disabled by adding qpmx_no_libbuild to the config.

  1. Private libs: The qpmx libraries are linked against as "private" libraries, effectively hiding them from for example la or prl files.
  2. Static library merging: Generated static libraries are merged with the compiled qpmx packages into one library that can be easily deployed.

Environment variables

VariableDescription
QPMX_CACHE_DIRThe directory to use as to cache qpmx stuff to. If not set or empty, QStandardPaths::CacheLocation is used.

Documentation

Planned for the future. You can run qpmx --help and qpmx <command> --help to see what the tool can do. it's mostly non-interactive, but a few commands do require user interaction.