Overview
| module url | N/A | ||||||||||||||||||||||||||||||||||||||||||||||||||
| git repository | https://bitbucket.org/arrizza-public/cpip-common | ||||||||||||||||||||||||||||||||||||||||||||||||||
| git command | git clone git@bitbucket.org:arrizza-public/cpip-common.git | ||||||||||||||||||||||||||||||||||||||||||||||||||
| verification report | https://arrizza.com/web-ver/cpip-common-report.html | ||||||||||||||||||||||||||||||||||||||||||||||||||
| version info |
|
- repo status: Repo Information
- installation: Common Setup
Summary
This project generates C/C++ packages that can be used by other projects.
See CPIP Packages for the latest CPIP components. That page has links to other projects that provide the components e.g.:
- cpp-on-the-fly-stats C++ package for doing stats
- find-the-best python/tkinter executable
- logger in this project for a C++ logger
Future
If possible, this mechanism can be used to share FPGA components, Arduino source or objects, etc.
Scenarios
There are 3 components in the tests:
1) src-proj
a project that creates a shared package e.g. this one. These have source files that are compiled and unit tested independently of other projects.
2) user-proj
a project that uses a shared package e.g. devcpp-app-template. These name the packages in their local xplat.cfg file and then use:
zpm mk-gen
zpm mk-build
to generate and build the package.
3) server: my web server arrizza.com
Note: the local shared directory can be anywhere in your system. It is named in the xplat.cfg file:
[cpip]
root_dir = ~/projects/cpip <=== this is the local shared directory
packages = logger
In the scenarios below, I use "~/projects/cpip"
Scenario: Refresh from Server
- Go to a user-proj or src-proj
zpm cpip-pull: copies from remote to ~/projects/cpip- follow instructions in "Use a package" below
Scenario: Use a package
- go to a user-proj
- update xplat.cfg to indicate the package(s) to use
[cpip]
root_dir = ~/projects/cpip
packages = logger # an example package
- update gen.py as necessary for the new package
zpm mk-gen: generates the Makefile.xx file. This contains all the definitions and commands needed to buildzpm mk-build: runs make to build the package- run to verify the new package is used correctly
Scenario: Create a package
- in the src-proj:
- set up the source files and unit tests.
- build and run UTs to verify the package is correct
- publish the package:
- update lib/packages.json with the new target info
zpm cpip-publish:- merges lib/packages.json into ~/projects/cpip
- copies all source/exes etc. named for that target from this project to ~/projects/cpip
- Use the package:
- go to a user-proj
- follow instructions in "Use a package" above
- verify package works correctly
Notes:
- assumes two src-projs don't use the same pkg name
Scenario: Publish to server
Not available for public use since it uses private components and knowledge of my website.
In short, it does this:
- goes through the ~/projects/cpip/cpip.json file and generates an HTML page with all the known packages
- For each source or other type of file, it creates link to the package file that resides on the server
- Then the HTML page and all the packages files are copied to the web server