If you found some error or want append more information please add pull request in
github
or create
new issues for ask or problem
wsjcpp
Yet another... C++ Source Package Manager.
Issues
You can add any issues on github: https://github.com/wsjcpp/wsjcpp/issues
Or write me an e-mail with topic: "wsjcpp"
to mrseakg@gmail.com
I need your help with this project!
Please rate it with a star, follow updates notifications by clicking on "watch" button or just make a fork
https://github.com/wsjcpp/wsjcpp
For submitting the official package into brew: "GitHub repository is not notable enough (<30 forks, <30 watchers and <75 stars)"
features - has implementation
- Creating an open-source package by anyone (github.com / gitlab.com / bitbucket.org / http / https )
- Manager - an application consisting of a single binary file
- Supports: Linux and MacOS
- Simple installation of specific versions of source packages into your projects
- Upgrade source packages
- Hold specific version of source code - so you can fix modules locally
- Source code "freezing" (sometimes it's necessary for commercial development)
- Simple integration into your CMake project
- Simple start for a new project (prepared basic structures and files)
- System for generating files with specific classes
- Included unit-tests systems
- Simple publication of source packages (github.com, bitbucket.org, gitlab.com, http/https servers)
- Added helpful tool for preparing packages for other systems: homebrew
- Included tool for unit-tests
all goals - not yet implemented
- Fast creation of microservices based on Dockerfile using C++
- Adding helpful tool for generating specific classes (templates or snippets)
- Adding helpful tool for preparing packages for other systems: deb, ppa, etc...
- Adding helpful tool for docker images
- Adding helpful tool for build servers
- Adding helpful tool with web interface for coding, building, managment
- Adding helpful tool for quick start of your local "source package registry"
- Adding helpful tool for code analizing
- Adding helpful tool for code documentation
Contacts
E-mail: mrseakg@gmail.com
Telegram: https://t.me/wsjcpp
Official web-site: https://wsjcpp.org
GitHub: https://github.com/wsjcpp/wsjcpp
Install
MacOS: brew
Via brew
% brew tap wsjcpp/wsjcpp
% brew install wsjcpp
To upgrade package:
% brew upgrade wsjcpp
MacOS: build from source code
% brew install git-core cmake make pkg-config g++ curl-openssl
% git clone https://github.com/wsjcpp/wsjcpp
% cd wsjcpp/
% ./build_simple.sh
% sudo cp -r /tmp/wsjcpp.git /usr/local/bin/wsjcpp
Ubuntu: install from PPA
$ sudo add-apt-repository ppa:sea5kg/wsjcpp
$ sudo apt-get update
$ sudo apt-get install wsjcpp
Launchpad PPA
Debian/Ubuntu: build && install from source code
$ sudo apt install cmake make g++ pkg-config libcurl4-openssl-dev git-core
$ git clone https://github.com/wsjcpp/wsjcpp /tmp/wsjcpp.git
$ cd /tmp/wsjcpp.git
$ ./build_simple.sh
$ sudo cp -r ./wsjcpp /usr/local/bin/wsjcpp
Look on YouTube
Docker
Step 1. Install the latest docker into your system
Step 2. Pull a container with wsjcpp
$ docker pull sea5kg/wsjcpp:latest
Step 3. Change the directory to the one containing your project (cd ~/my-project)
Step 4. Run interactive command line container
$ docker pull sea5kg/wsjcpp:latest
$ docker run -it --rm \
-v `pwd`/.:/root/project \
sea5kg/wsjcpp:latest \
bash
root@8b93098b8a07:~/project#
Now you can use "wsjcpp" command and build/run your project
more dependencies in docker image
If you need more deb packages and programs than the image "sea5kg/wsjcpp:latest" contains, you can install it via apt, but don't forget that after restarting the container they will be lost.
To solve this problem you need to prepare Dockerfile.dev that looks something like this:
FROM sea5kg/wsjcpp:latest
# install build requiremenets
RUN apt update && apt install -y --no-install-recommends \
libqt5sql5-mysql \ # replace to your packages
libqt5websockets5 \ # replace to your packages
libqt5websockets5-dev \ # replace to your packages
qt5-default # replace to your packages
Now you can use "wsjcpp" command and build/run your project
Build your docker image:
$ docker build -t your-project-build:latest -f Dockerfile.dev
Run container from your image (+ extend port):
$ docker run -it --rm \
-v `pwd`/.:/root/project \
your-project-build:latest \
-p 1234:1234 \
bash
root@0b93098b8a07:~/project#
Documentation
search packages in github
I think that better praxis is to add topic in the github repository:
https://github.com/topics/wsjcpp-package
init new package
$ mkdir your-package-name
$ cd your-package-name
$ wsjcpp init .
Then you need to specify several fields (or you can do it later in wsjcpp.yml):
Source Package Name: your-package-name
Version: v0.0.1
Description: Some package
Author's Name: Some Author
Author's Email: some@author.org
At this step different files will be generated (if they don't exist), eg:
- src.wsjcpp/CMakeLists.txt - file will be automatically updated after packages installation
- src.wsjcpp/wsjcpp_core/* - preinstalled package with core for unit-tests and logger
- unit-tests.wsjcpp/* <- folder for unit-tests
- src/main.cpp
- .wsjcpp/* <- temporary folder
- CMakeLists.txt
- build_simple.sh
- .gitignore
- ...
Submit source packages into wsjcpp
At the moment, wsjcpp can work with public repositories in
Below you can see that it is easy to submit wsjcpp-package:
Step 1. Create "wsjcpp.yml" file with minimal content (please fill in the fields with your data) in your repository
wsjcpp_version: "v0.1.1"
cmake_minimum_required: "3.0"
cmake_cxx_standard: "11"
name: "you/package-name"
version: "v0.0.0"
description: "Describe your package"
issues: "https://github.com/you/package-name/issues"
keywords:
- "c++"
- "keyword"
repositories:
- type: main
url: "https://github.com/you/package-name"
authors:
- name: "Your Name"
email: "your@email.com"
# files will be distributed for this package
distribution:
- source-file: "src/some.h"
target-file: "some.h"
type: "source-code"
- source-file: "src/some.h"
target-file: "some.h"
type: "source-code"
Step 2. And add topic
"wsjcpp-package" into your public github project
Step 3. Test installation of your project
$ mkdir /tmp/test1
$ cd /tmp/test1
$ wsjcpp init .
$ chmod +x build_simple.sh
$ wsjcpp install https://github.com/you/package-name:master
$ ./build_simple.sh
wsjcpp info
Information about current package. Example:
===== begin: wsjcpp info =====
Name: wsjcpp
Version: v0.1.1
Description: C++ Source Package manager
Directory: .
wsjcpp.version = v0.0.2
Keywords:
- c++
- sources
Distribution-Files:
- src/wsjcpp_package_manager_distribution_file.cpp -> wsjcpp_package_manager_distribution_file.cpp [source-code]
- src/wsjcpp_package_manager_distribution_file.h -> wsjcpp_package_manager_distribution_file.h [source-code]
- src/wsjcpp_package_manager_safe_scripting_generate.cpp -> wsjcpp_package_manager_safe_scripting_generate.cpp [source-code]
- src/wsjcpp_package_manager_safe_scripting_generate.h -> wsjcpp_package_manager_safe_scripting_generate.h [source-code]
- src/wsjcpp_package_manager.cpp -> wsjcpp_package_manager.cpp[source-code]
- src/wsjcpp_package_manager.h -> wsjcpp_package_manager.h [source-code]
Authors:
- Evgenii Sopov
Dependencies:
- wsjcpp-core:v0.1.1
- wsjcpp-yaml:v0.1.1
- wsjcpp-hashes:v0.1.0
- wsjcpp-safe-scripting:v0.1.0
- wsjcpp-arguments:v0.1.0
===== end: wsjcpp info =====
wsjcpp distribution
Developer defines what exactly your package will distribute (without main/trash/unit-tests - only core code).
- wsjcpp dist list - list of distributed files
- wsjcpp dist add filepath1 - add to distributed files
- wsjcpp dist remove filepath1 - remove from distribution (remove info only from wsjcpp.yml, not from filesystem)
Example:
% wsjcpp dist list
Distribution list:
source-code: 'src/wsjcpp_package_manager_distribution_file.cpp' -> 'wsjcpp_package_manager_distribution_file.cpp'
source-code: 'src/wsjcpp_package_manager_distribution_file.h' -> 'wsjcpp_package_manager_distribution_file.h'
source-code: 'src/wsjcpp_package_manager_safe_scripting_generate.cpp' -> 'wsjcpp_package_manager_safe_scripting_generate.cpp'
source-code: 'src/wsjcpp_package_manager_safe_scripting_generate.h' -> 'wsjcpp_package_manager_safe_scripting_generate.h'
source-code: 'src/wsjcpp_package_manager.cpp' -> 'wsjcpp_package_manager.cpp'
source-code: 'src/wsjcpp_package_manager.h' -> 'wsjcpp_package_manager.h'
% wsjcpp dist add src/some_file.h
Added.
% wsjcpp dist remove src/some_file.h
Removed.
wsjcpp unit-tests
Create unit-tests for your distributed files
- wsjcpp unit-tests list - list of defined unit-tests
- wsjcpp unit-tests create NameTest "Description Test" - few files will be created and added to unit-tests/CMakeLists.txt
- wsjcpp unit-tests delete NameTest - !!! remove files and definitions from wsjcpp.yml
- wsjcpp unit-tests disable NameTest - disable unit-test (exclude from build/run)
- wsjcpp unit-tests enable NameTest - enable unit-test (include into build/run)
Example:
% wsjcpp unit-tests list
2020-04-09 11:16:18.097, 0x0x1130c1dc0 [INFO] WsjcppArgumentProcessor-list:
Unit Tests Cases:
* NormalizeUnitTestName - Test Normalize UnitTest Name
* generateFilenameForUnitTest - Test generate filename for UnitTest
* InitPackage - Test for init package
* ReadPackage - Test for read package
% wsjcpp unit-tests create ExampleTest "Some example test"
% wsjcpp unit-tests delete ExampleTest
Unit Test 'ExampleTest' removed successfully.
wsjcpp generate
Generate source code from templates supplied with packages
- wsjcpp generate list - list of templates
- wsjcpp generate TemplateName ClassName - files will be generated from template and added into your CMakeLists.txt between lines '#### BEGIN_WSJCPP_APPEND' and '#### END_WSJCPP_APPEND'
Example:
% wsjcpp generate list
Generators:
- wsjcpp generate WsjcppSafeScriptingProc YouClassNameHere
- wsjcpp generate WsjcppArgumentProcessor YouClassNameHere
% wsjcpp generate WsjcppArgumentProcessor Some
2020-04-09 11:44:09.418, 0x0x10a3aadc0 [INFO] WsjcppSafeScriptingContext: arg1 = 'Some'
2020-04-09 11:44:09.420, 0x0x10a3aadc0 [INFO] WsjcppSafeScriptingProc[log_info]:
======
Generated class:
- ArgumentProcessorSome
Generated files:
- ./src/argument_processor_some.h
- ./src/argument_processor_some.cpp
======
wsjcpp change version
Update version in project
- wsjcpp change version v0.1.1 - update version for current project
Example config lines for wsjcpp.yaml:
auto-generated-files:
version-file:
path: "./"
filename: "VERSION"
printed-format: "{MAJOR}.{MINOR}.{BUILD}"
wsjcpp resources
Convert binary or text resource files into C++ code
- wsjcpp [resources|res] [list|ls] - list of defined resources
- wsjcpp [resources|res] add [--text|--binary] path_to_file - add file to resources and generate C++ files
- wsjcpp [resources|res] [remove|rm] path_to_file - remove C++ files, which were generated
Example:
% wsjcpp res ls --more
resources:
- filepath: build_simple.sh
filesize: 74
pack-as: text
sha1: 01af063d6f69d212dc443ed8afce828855f040a2
modified: 2019-08-09 13:57:33
- filepath: README.md
filesize: 4218
pack-as: text
sha1:
modified: 2020-04-13 12:39:27
% wsjcpp res rm README.md
Removed files:
- ./src-resources.wsjcpp/README_md_path04c6e9.h
- ./src-resources.wsjcpp/README_md_path04c6e9.cpp
% wsjcpp res add README.md
2020-04-09 11:44:09.418, 0x0x10a3aadc0 [INFO] WsjcppSafeScriptingContext: arg1 = 'Some'
2020-04-09 11:44:09.420, 0x0x10a3aadc0 [INFO] WsjcppSafeScriptingProc[log_info]:
======
Generated class:
- ArgumentProcessorSome
Generated files:
- ./src/argument_processor_some.h
- ./src/argument_processor_some.cpp
======
How to use resources from code:
#include <wsjcpp_resources_manager.h>
int main () {
WsjcppResourceFile *pFile = WsjcppResourcesManager::get("build_simple.sh");
if (pFile->getPackAs() == "text") {
std::string sBuildSipleSh(pFile->getBuffer(), pFile->getBufferSize());
}
if (pFile->getPackAs() == "binary") {
pFile->getBuffer(); // buffer
pFile->getBufferSize(); // buffer size
}
return -1;
}
wsjcpp prepare
Preparing some useful files and packages for other systems
- wsjcpp prepare help - For more information
- wsjcpp prepare travis - Prepare base file (.travis.yml) for Travis CI
- wsjcpp prepare homebrew - Prepare package for homebrew
- wsjcpp prepare dockerfile - Prepare sample Dockerfile for build and publishing current project
- wsjcpp prepare changelog - Prepare sample CHANGELOG.md
wsjcpp scan
Scan the code
- wsjcpp scan help - For more information
- wsjcpp scan todo - Search in code all TODOs
- wsjcpp scan uniq-lines - Scan code and search uniq-lines
Ideas
idea: wsjcpp prepare deb-package
idea
Prepare folder with a deb package
idea: wsjcpp prepare ppa-package
idea
Prepare folder for a ppa source package
idea: wsjcpp prepare dockerfile
idea
Prepare sample Dockerfile for you package
GitHub Issue
idea: wsjcpp docs generate
idea
Scan sources and generate documentation like a doxygen
GitHub Issue
idea: web-dev-panel
idea
launch: wsjcpp web-dev-panel start --web ./web --project-dir ./project --port 8777
Or simply (default port: 8777): wsjcpp web-dev-panel start
missing package: wsjcpp-do-run-command
What will be done:
- Simple web app
- File tree of a project (exclude git maybe)
- Code editor: using a CodeMirror
- Command line web
- Tabs: editor / console / test / packages / docs
- Or buttons: build / run-unit-tests
GitHub Issue
idea: add support conan
idea
- 1. Push/prepare package for conan.io
- 2. Install packages from conan.io
idea: wsjcpp clean
idea
read conf file wsjcpp.yml to clean section
idea: wsjcpp install -g "url"
idea
Add installation to global directory in system / or in home user directory
idea: wsjcpp install "git@github.com:...."
idea
Add support of installation packages from private repository (with credentials https/ssh/git)
idea: wsjcpp server-origin start
idea
Same "registry"
Web server for caching/registry source packages in local network (e.g. for use within your company)
what will be included:
- registry source package
- page of source package with infomation about tests/builds/dependencies
- package search interface
- feature: test build (enable/disable) - based on docker
- feature: subscription about new versions (enable/disable)
- feature: build/tests - logging
- feature: number of package dependencies for a specific package + remote icon
- feature: code-covarage
- feature: doxigen or something like it
- feature: find on github wsjcpp packages by tag 'wsjcpp'
тезисы
Он же билд сервер - для проверки пакетов (на основе докера)
Без авторизации - просто ссылка на репозиторий (github) и версию пакета (типа wsjcpp publish link : version) - также сохраняются все файлы для дистрибьюции - запрещена повторная заливка пакета
С авторизацией (простенькая) - загружается сорс код по файлово - то что в дистрибьюции - надо проработать протокол типа заливается вначале wsjcpp.yml - потом дозаливаются все остальные файлы
Регистрация только в ручном режиме - заходим в админку и добавляем пользователя с ролью девелопер
Состояние сборки и тестов (если не прошли тесты и сборка то пакет дропается с сервера а состояния остаются)
Хранятся последняя версия пакета а также версии на которые ссылаются предыдущие + хранятся unit-tests - весь остальной храм удаляется
Команды:
wsjcpp publish ссылка-на-гитхаб:бранч-или-тег
wsjcpp publish путь-до-локального-пакета
wsjcpp publish --origin ссылка-сервера-регистратора что-куда
если оригин не указан то используется дефолтный wsjcpp.org
C++ Managers
Such as:
- C++ Library Manager
- C++ Package Manager
- C++ Build Manager
- C++ Source Package Manager
I once thought:
"I wanna package manager for C++ like npm/pip for comfortable management of source code modules in my C++ projects".
Then I found a few source package manager projects for C++, but they didn't suit me... and I tried to create my own.
So... if you don't like my wsjcpp, or it's not exactly what you're looking for, please look through systems developed by other authors:
conan
Conan, the C/C++ Package Manager for Developers
The open source, decentralized and multi-platform
package manager to create and share all your native binaries.
Web Site
dds
A Build System and Library Manager
dds is a modern take on build system and library dependency management for C and C++ projects. It aims to be easy to use for beginners and experts alike, and maximally discoverable.
GitHub
the official documentation.
cpm
A C++ Package Manager based on CMake and Git.
CPM is designed to promote small, well-tested, composable C++ modules. CPM allows you to link against multiple different versions of the same static library without symbol conflicts. You can include other C++ modules that may depend on older or newer versions of the same modules you are using. Additionally, CPM will automatically download and build C++ modules for you.
GitHub
pacm
C++ package manager
Pacm is your solution for a simple C++ package manager that can be embedded or redistributed with native applications.
Web site
GitHub
spack
?
A flexible package manager supporting multiple versions, configurations, platforms, and compilers.
Web site
GitHub
buckaroo
C/C++ Package Manager
Buckaroo is a package manager for C/C++. Buckaroo makes it easy to add modules to your project in a controlled and cross-platform way.
Web site
GitHub
hunter
C/C++ Package Manager
CMake driven cross-platform package manager for C/C++.
GitHub
vcpkg
C++ Library Manager for Windows, Linux, and MacOS
Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement is vital to its success!
GitHub
DownloadProject
?
CMake module for downloading an external project's source at configure time
GitHub
cget
Cmake package retrieval.
This can be used to download and install cmake packages.
GitHub
maiken
build tool
Cross platform build tool for C/C++/Obj-C/C#/CUDA/opencl
GitHub
cppget
C++ package repository
C++ package repository, stable section
Web site
cmake - ExternalProject
cmake module
?
Web site
scons
SCons is an Open Source software construction tool—that is, a next-generation build tool.
Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.
Web Site
ninja
C++ Build System
Ninja is a small build system with a focus on speed. It differs from other build systems in two major respects: it is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible.
Web site
conda
Package, dependency and environment management for any language
Package, dependency and environment management for any language—Python, R, Ruby, Lua, Scala, Java, JavaScript, C/ C++, FORTRAN, and more.
Web site
pak-c-mak
pak-c-mak is cross-platform tools used as distributed package manager for C++ libraries.
This tool was inspired by maven local and maven central repositories.
maven
package-manager
cpp
cmake
artifacts-repository
c-plus-plus
package-repository
cross-platform
googletest
GitHub
wsjcpp
C++ Source Package Manager
Yet another... C++ Source Package Manager.
Web site
GitHub
Know more C++ managers/systems? Please create
an issue.
C++ Services
C++ Conferences
Collection of C++ conferences
cppcon
C++ conference
CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts. (c) https://cppcon.org/about/
Web Site
C++ CoreHard Spring
C++ conference
2015 - 2020 (?)
Web Site
C++ Russia
C++ conference
Конференция С++ Russia — это два дня и несколько треков хардкорных технических докладов, посвященных C++: concurrency, производительность, архитектура и инфраструктурные решения — всё для того, чтобы ваш код выглядел лучше и делал больше. Конференция ориентирована на опытных разработчиков, никаких вводных докладов!
Web Site
Know more C++ conferences? Please create
an issue.
C++ Frameworks
Oat++
Modern Web Framework for C++
Oat++ is the modern web framework for C++. It provides all the necessary features and components for production-grade development, including:
- Advanced REST controllers with request mappings and Swagger-UI annotations. See Api Controller.
- Retrofit/Feign like client. See Api Client.
- Object Mapping. See Data Transfer Object (DTO).
- Dependency Injection
- Swagger-UI. See oatpp-swagger module.
It is zero-dependency, easy-portable, and high-performance.
https://oatpp.io/
C++ Tools
C++ Other