Giter VIP home page Giter VIP logo

qtpm's Introduction

qtpm - Qt Package Manager Prototype

Install

$ go get github.com/qtpm/qtpm

Usage

Create application template

$ mkdir helloworld
$ qtpm init
$ ls
CMakeExtra.txt   LICENSE.rst build       include     qtpackage.toml  src     test        vendor
$ qtpm build

Create library template

$ mkdir awesomesdk
$ cd awsomesdk
$ qtpm init app
CMakeExtra.txt   LICENSE.rst build       include     qtpackage.toml  src     test        vendor
$ qtpm build

Add files

$ qtpm add class MyDialog@QDialog
$ qtpm add test TestMyDialog

Change license

$ qtpm add license mit

Supported license names are mentioned at the below section.

Qt Location

It uses CMake behind qtpm command to build. By default, Qt should be in default (CMAKE_PREFIX_PATH). If you put Qt out of the folder, there are two ways to specify the Qt location.

  1. qtpm sees environment variable QTDIR:

    $ QTDIR=~/Qt/5.5/clang_64 qtpm build
  2. put qtpackage.user.toml that contains the following contents:

    qtdir = 'C:\Qt\5.5\mingw492_32'
    

If you don't use the both settings and Qt is not in CMAKE_PREFIX_PATH, qtpm tries to search any locations.

Name Convention

This tool behaves according to the convention over any configuration.

  • Source and header files are under src folder.
  • Tests are under test folder.
  • Resources are under resource folder.
  • One project folder includes one executable file or one shared library as the output.
  • If there is src/main.cpp, qtpm generates executable, otherwise shared library
  • Each test classes are implemented in test/*_test.cpp files (no header files) and compiled into executable.
  • Other .cpp files in test are treated test utility. They are linked with each test executables.
  • Each source file's suffix is used for conditional compile now. For example, sample_windows.cpp is built only on Windows platform.
    • _windows: Windows (Cygwin is not included)
    • _darwin: MacOS X
    • _unix: Unix-like OS including MacOS X and Cygwin
    • _linux: Unix-like OS (Mac OS X and Cygwin are not included)
    • _mingw: MinGW
    • _cygwin: Cygwin
    • _msvc: Microsoft Visual C++

Project File

Project file is written in TOML format.

  • name: Project name.
  • author: Author name.
  • license: License name.
  • requires: Dependency packages like 'github.com/shibukawa/qtobubus' (this feature is not implemented yet).
  • qtmodules: Required qt modules like Widgets, Xml.
  • version: Version number like [1, 0, 0].

Supported License Files

The following names can use with qtpm add license command:

  • apache-v2.0 : Apache License v2.0
  • artistic-v2.0 : The Artistic License v2.0
  • bsd-2 : Simplified BSD License (BSD 2-clause)
  • bsd-3 : Modified BSD License (BSD 3-clause)
  • epl-v1.0 : Eclipse Public License (EPL) v1.0
  • gnu-agpl-v3.0 : GNU Affero General Public License (AGPL) v3.0
  • gnu-gpl-v2.0 : GNU General Public License (GPL) v2.0
  • gnu-gpl-v3.0 : GNU General Public License (GPL) v3.0
  • gnu-lgpl-v2.1 : GNU Lesser General Public License (LGPL) v2.1
  • gnu-lgpl-v3.0 : GNU Lesser General Public License (LGPL) v3.0
  • mit : The MIT License (MIT)
  • mpl-v2.0 : Mozilla Public License (MPL) v2.0
  • unlicense : The Unlicense (Public Domain)

You can uses the following names as alias:

  • apache2 -> apache-v2.0
  • bsd -> bsd-3
  • eclipse -> epl-v1.0
  • gpl -> gnu-gpl-v3.0
  • gpl2 -> gnu-gpl-v2.0
  • gpl3 -> gnu-gpl-v3.0
  • lgpl -> gnu-lgpl-v3.0
  • lgpl2 -> gnu-lgpl-v2.1
  • lgpl3 -> gnu-lgpl-v3.0
  • mozilla -> mpl-v2.0
  • perl -> artistic-v2.0
  • public domain -> unlicense
  • x -> mit

License

MIT

qtpm's People

Contributors

shibukawa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

qtpm's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.