factory install
- Description:
Explains how to install packages built with aidebuild.
Methods
(static) install_as_user()
- Description:
Package installation to use the package.
System installation
- The required system installation, using the usual LinuX installer mechanism (either
aptordnfdepending on the distribution) writes:
# under fedora and equivalent sudo dnf install git nodejs npm wget curl libcurl-devel python3-devel # under ubuntu, debian and equivalent (some package name adaptation may be required) sudo apt install bash git nodejs npm wget curl libcurl4-openssl-dev python3-devThe following global npm installation are recommended to avoid heavy local installation
sudo npm install -g jsdoc docdash js-beautify uglify-js bindings express express-fileupload node-addon-api ace-builds rdf cligui2- A C++ compilation chain is also required and used for C/C++ compilation, but one is usually installed.
- A python installation is included for some packages and the Python version
3.10,3.11,3.12, or3.7m(on RasPI) is actually in use. - Complementary used tools are usual LinuX commands including bash.
- A web browser defined in the global
$BROWSERenvironment variable is also used.
Remarks:
- Under Ubuntu you may have to install dedicated versions of
nodejsandnpm, please refer to the install_on_ubuntu.sh documented script for details and easy use, after checking it is ok for you, you simply have to run the script. - This, presently, only easily works with a LinuX like distributions (including MacOS). A tutorial for a windows partial installation is available here.
- If
npmis already installed, you may have to runsudo npm install -g npm@latestto install the latest version or runnpm cache clean --forceto clear spurious files. - If during
npm installthenpm ERR! git dep preparation failed when trying to install package.jsonthere may several different causeswgethas been forgotten to be installed,- a spurious version of npm has been installed, use, e.g.,
sudo npm install -g npm@10.1.0, to overcome;- also do not hesitate to copy the whole error message and contact us.
Complementary system installation
- Depending on the package and usage the following installation are optional (without, the present mechanism will still work with reduced functionalities):
- For build_cpp, C/C++ debugging with gdb and C/C++ dynamic profiling with valgrind are used.
- For build_gyp, webservice construction uses gyp mechanism.
- For build_python, python wrapping uses the swig.
- For build_public, documentation generation, the linkchecker tool, the LaTeX compilation chain, the libreoffice software and maple symbolic calculator, are optionally used.
- This means that this command is to be used (while
libreofficeis installed by default on most distributions andmaplerequires a specific licence installation):
sudo apt install gdb valgrind swig linkcheckerInstalling opencv
- When using opencv there is a need to install, depending on the distribution:
# under fedora and equivalent sudo dnf install opencv opencv-contrib opencv-devel # under unbuntu and equivalent sudo apt install libopencv-core-dev libopencv-contrib-devsee install_rasppi for more details on debian/RaspPi system
-
When implementing aide-group software on specific hardware such as tabletop on Raspberry-Pi and esp32gpiocontrol on ESP32, dedicated installation processes are documented within the package.
-
All other required tools are automatically installed and updated thanks to the npm mechanism, as defined in the
package.jsonfile, but:- The command:
sudo npm -g install docdash js-beautify jsdoc uglify-js
will install required package globally, and save local space and installation time.
- The command:
-
Remark: Under some ubuntu instalation the some
npm warm EBADENGINEanderrors in minimatchoccur withput imparing the installation.
Installing a package
-
This is a npm package, installed using the npm command line tools. Here npm is used because it is a very simple mechanism with a large set of tools and an active and smart community, and it is particularly adapted to multi-language (C/C++ with Javacsript, and also Python) development, and very simple web-service design, including on small hardware such as the Raspberry-Pi, and is easy to adapt to smaller connected objects.
-
Given a package in the
aide-groupof name, say,wjson, simply either/or:- Run in your node directory:
npm install git+https://gitlab.inria.fr/line/aide-group/wjson.git- Add a line in the
package.jsonfile:
{ ../.. "dependencies": { ../.. "wjson": "git+https://gitlab.inria.fr/line/aide-group/wjson.git" } }- The required system installation, using the usual LinuX installer mechanism (either
(static) install_as_co_developer()
- Description:
Package installation to co-develop the package.
-
This is a git source bundle of a npm package, installed using the git and npm command line tools.
-
You must start installing the required configuration as explained for here.
-
To become a developer you need to:
- Contact the aide support (e.g., aide-help@inria.fr to open a gitlab.inria external account (please explain your motivation).
- Accept the invitation as co-developer of https://gitlab.inria.fr/line/aide-group.".
- Create a secured computer ssh private/public key pair.
- Create the key pair using, e.g, the
ssh-keygen -t rsacommand. - Choose the standard option to save the key in the
~/.ssh/id_rsafile. - Copy the public key pair on your gitlab account https://gitlab.inria.fr/-/profile/keys Note: Better do not reuse an existing private/public key but create a new one (you can have several ssh keys active on gitlab).
- Create the key pair using, e.g, the
-
Given a package in the
aide-groupof name, say,wjson, simply either/or:- Choose a working directory.
- In your working directory, clone the source bundle and change to the directory to install and test:
git clone git@gitlab.inria.fr:line/aide-group/wjson.git cd wjson npm install npm run build npm test- In order to recheck all elements rerun, in the package
make reinstall ; npm test- In order to co-develop, change to the src directory and use make directives.
-
(static) install_a_new_package()
- Description:
Initializes a package in order to be used with aidebuild.
Initialization tutorial
- You must be registered on the gitlab.inria.fr as explained here.
- Create a git project in the proper group.
- Consider choosing public vibility
- Enter a one line project desctription when creating the project or in the
Setting->Descriptionmenu - Do not initialize repository with a
README.md
- Note the
Project ID
- It is gettable from a little menu at the right of the project title
- It is also readable on the
Setting => Generalproject menu page
- In the parent working directory, download and run
init.sh
wget -q https://gitlab.inria.fr/line/aide-group/aidebuild/-/raw/master/src/init.shsh ./init.sh- This interactive script, asking for the
Project ID, will generate a working directory with the proper initial files (See below).
- This interactive script, asking for the
- Edit and complete the
./package.jsonmeta-data file.
- Please consider, beyond the general documentation:
- Please refer to the build_public section for more information on specific meta-data options.
- Activate the gitlab pages, to allow the package web-site to be activated, i.e.:
-On Left Menu =>
Settings=>General=>Visibility, project features, permissions(clicExpand)- Enable
CI/CDto Build, test, and deploy your changes. - Enable
Pages… to host your static websites on GitLab. - Clic
Save Changes.
- Enable
- On Left Menu =>
Settings=>CI/CD=>Runners(clicExpand)- Enable
Enable shared runners for this project. - Clic
Save Changes. (If noSave Changesbutton use the button of anotherSettingsitem).
- Enable
- On Left Menu =>
Deploy=>Pages- Disable
Use unique domain optionin order to obtain a https://$group.gitlabpages.inria.fr/$group/$project standard URL
- Disable
The package.json non-standard options
The package.json file is expected to contain:
- The "name", "description", "homepage" (of the documentation), "version", "license", "author" (or "contributors"), "repository" (of the source files), "scripts", "dependencies", "devDependecies" usual fields, But since the specification is open, it may also contain:
- Multiple authors under the "contributors" field as exemplified here, with "name", "email" and "url" items,
- In the "repository" field an additional "project_ID" item, corresponding to the project ID on the gitlab forge.
- A "usage" field which is a list a HTML lines, to complete the installation or usage documentation more….
- A "softwareheritage" boolean field (default is false) to indicate that the software has been archived on https://archive.softwareheritage.org using this link.
- A "build_cpp" boolean field (default is true) to indicate that C/C++ compilation has to be performed.
- A "swig" boolean field (default is false) to indicate the that the python wrapper has to be built.
- A "gypfile" boolean field (default is false) to indicate that the node-gyp wrapper has to be built.
Initialization hints
- Your default branch must be
master- to change (e.g. from
main) tomasterconsider theSettings->Repository+Branch Defaultsmenu - you also may have to unprotect the
mainbranch inSettings->Repository+Protected branchesmenu - you better delete unused branches in
Code->Branchesmenu
- to change (e.g. from
Initialization details
-
This will create a directory with your project name and install the required files:
./package.jsonis the project package meta-data file, which is pre-formatted with all possible predefined information../src/makefileinitial file, the required aidebuild include and variable templates, to partially clear if not used../.gitignorestandard file, allowing to have clean git push and pull operations without local generated files../.gitlab-ci.ymlstandard file, allowing to generate a public web-site presenting and documenting the package, with a minimal./public/index.htmlpage.
-
The present installation is specific to package on the
gitlab.inria.frforge but is easily adaptable to other platforms. -
You may also read the init.sh as a step by step tutorial and perform installation manually