8000 GitHub - RabahSend/mkpj: Simple command line tool used to create simple C++ projects !
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RabahSend/mkpj

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mkpj

licence release Downloads size issue

MKPJ

a simple command line tool used to create simple C++ projects !

What it does ?

mkpj is a simple yet very useful program that lets you create projects folder as well as adding hpp/cpp files and download utility pairs. It can also create QT projects : adding the resources, interface, and config folders who contains a .json config file, a .ui file, a .qrc file, and it adds a .pro file to the root of the folder. Theses projects follow a simple yet efficient template:

project_name/
 ├── bin/
 ├── include/
 │   └── *.hpp
 ├── src/
 │   └── *.cpp
 ├── obj/
 ├── Makefile
 ├── .mkpj.conf
 ├── .pairs.conf
 └── README.md

QT project template :

project_name/
 ├── bin/
 ├── config/
 │   └── conf.json
 ├── interface/
 │   └── *.ui
 ├── resources/
 │   └── *.qrc
 ├── include/
 │   └── *.hpp
 ├── src/
 │   └── *.cpp
 ├── obj/
 ├── Makefile
 ├── .mkpj.conf
 ├── .pairs.conf
 ├── project_name.pro
 └── README.md

The mkpj programm creates a Makefile based on the inputs you specified.
The Makefile includes the all, install and clean targets. (The install target shall be run as root).

By default, make will put the object files (.o) in the obj folder and output the binary in the bin folder.


How to use ?

To create a project, mkpj will ask you several questions such as

  • The project name
  • If it is a QT project
  • The target (the ouput from the Makefile)
  • The output file extension

Just type

$ mkpj

To open the menu. This menu will let you create a project, once in a project, you will be able to add cpp/hpp files, add a pair from the list, you can regenerate the Makefile, and export the project to a tarball.

You can add additionnal files to the tarball by modifying the additional_files property in the .mkpj.conf file at the root of your project.

You can add a pair to your project using

$ mkpj -p <pair_name>

see the Pairs section for more information.


Pairs

Since version 0.6 mkpj can download pairs of files from the internet.

The pairs are simple utility classes that can be used in your projects. You can find the list of available pairs here.

You can add your own pairs by adding them to the pairs folder in the mkpj-core repository and making a pull request. We will review your pair and add it to the list if it is relevant.

If you want to get more information about the pairs, you can check the mkpj-core repository wich contains the pairs as well as a more in depth documentation containing a template for the pairs and a guide on how to create your own pairs.

To list the available pairs, use

$ mkpj -l

or use the menu.

To download a pair, use

$ mkpj -p <pair_name>

Compilation

GNU g++ is expected to be present on the system, as well as libcurl.

To check if libcurl is installed on your system, use

$ ldconfig -p | grep libcurl

You shall prepare the project for compilation using

$ make configure

You can compile the programm on your system using

$ make

It will generate a mkpj file in the bin folder.
You can already use this binary file to execute the program but it is recommanded to install it.


Installation

The installation the install script is recomended for beginners.

The simple way, using the install script via curl:

sudo /bin/bash -c "$(curl -fsSL "https://raw.githubusercontent.com/BaptisteP31/mkpj/main/install.sh")"

Note that the install script will install the program in the /usr/local/bin folder.


mkpj is now available on homebrew !

The main benefit of using homebrew is that it will automatically update the program when a new release is available.

Using homebrew (linux and macos):

$ brew tap BaptisteP31/mkpj

and then

$ brew install mkpj

More info on homebrew here.

From source:

On linux, use

# make install

to install the program in the /usr/local/bin folder.

From binary:

If you don't want to compile from the source, you can use the provided binary in the release section of the repository.

To install the binary file on linux, use

# sudo mv mkpj /usr/local/bin


This projects uses part of the CXXOPTS project.

About

Simple command line tool used to create simple C++ projects !

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.2%
  • Shell 1.3%
  • Makefile 0.5%
0