Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jan 23, 2019. It is now read-only.
/qpmxPublic archive

A frontend for qpm, to provide source and build caching

License

NotificationsYou must be signed in to change notification settings

Skycoder42/qpmx

Repository files navigation

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

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


Travis Build StatusAppveyor Build statusCodacy BadgeAUR

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:

  • global source caching, to reduce downloads
  • precompiles packages locally to speed up builds
    • but also supports build with sources directly
  • fully cross-platform
    • can be run on any "host" platform supported by Qt
    • can compile packages for any Qt platform
  • easy and simple qmake integration, with just two additional lines a the pro file
    • automatically added by qpmx on package installation
  • Supports translations and local includes for (static) library projects
  • Resources andQ_COREAPP_STARTUP_FUNCTION work as expected, even when used as compiled library
  • can search packages
  • Methods for developers:
    • Use a local copy instead of an actual package for debug purpose
      • still supports source and compile builds
    • provide methods to publish packages directly via qpmx

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 athttps://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 usingqpmx install (If not done automatically, prepare the pro file withqpm init --prepare <pro-file>). And thats it. Simply run qmake, and qpmx will automatically install, precompile and preparepackages, and include everything required to your pro file automatically.

Translations

To have translations properly working, you can use theTRANSLATIONS variable in both, qpmx packages and in your final project. Simply runmake lrelease and translations will be compiled automatically. The same happens with files inEXTRA_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 toINSTALLS+= qpmx_ts_target

Common use cases

Package Users

  • Installing a package:qpmx install [<provider>::]<package>[@<version>]Example:qpmx install com.github.skycoder42.qpmx-sample-package would search all providers for the package and then install the latest version.
  • Preparing a pro-file to include qpmx packages:qpmx init --prepare <pro-file>This is done automatically on the first install, but if you are missing the line, you can add it this way.
  • Search for a packageqpmx search de.skycoder42.qtmvvmWill search all providers that support searching (qpm) for packages that match the given name.

Package Developers

  • Create a qpmx-file for a package:qpmx create --prepare qpmThis will create/update a qpmx-file based of your inputs, and in this example, prepare it for publishing with the given provider.
  • Publish a qpmx package:qpmx publish 4.2.0Publishes the package for all providers it was prepared for, with the given version of 4.2.0
  • Switch a package dependency to a local path (dev mode):qpmx dev add <provider>::<package>@<version> <path>This will use the local<path> as package source instead of downloading it from git/qpm/... (of course only for this qpmx.json project)

Special (qmake) stuff

qmake variables

VariableDescription
QPMX_EXTRA_OPTIONSAdditional option parameters for theqpmx init invocation
QPMX_TRANSLATE_EXTRA_OPTIONSAdditional option parameters for theqpmx translate invocation
QPMX_HOOK_EXTRA_OPTIONSAdditional option parameters for theqpmx 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 likeTRANSLATIONS, 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 thetarget target (Seehttps://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 neitherqpmx_static norqpmx_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 addingqpmx_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 runqpmx --help andqpmx <command> --help to see what the tool can do. it's mostly non-interactive, but a few commands do require user interaction.


[8]ページ先頭

©2009-2025 Movatter.jp