-
Notifications
You must be signed in to change notification settings - Fork 0
ProbeConfig Explanation
This guide will teach you mastery of ProbeConfig.
ProbeConfig - configuration files format specially developed for zeroProbe configurations. Syntax similar to INI configurations. ProbeConfig doesn't support variables initialization. Internal interpreter in zeroProbe read's these configurations.
Lines have command and arguments divided by double dots operator (:).
ProbeConfig has 2 types of commands:
- empty start - commands that's interact with zeroProbe internal run configuration. It's named internal commands.
- ! - edit properties of stage defined by stages command. Learn more in Stages section.
If visualize it, that looks like this:
command: argument
zeroProbe has internal commands to tell them what to do. This list will increase with every added internal command. By the way, you can't make commands. Currently, zeroProbe interpreter doesn't support it.
zeroProbe's built-in internal commands:
- project - assign name for project. By default, it sets to "unnamed".
- check_for - creates list of components that must be checked before running.
- shell - assign shell for commands execution.
- arch - required arch of system.
- stages - base function. Tells zeroProbe list of possible stages. In the future, you can't edit this list.
Small example of it usage to build C++ applications:
project: Build File Lister
check_for: g++ gcc
shell: /bin/bash
stages: build test
!build.add_command: g++ main.cpp src/io.cpp src/io.h src/fs.cpp src/fs.h -o file_lister
!test.add_command: ./file_lister
When you start zeroProbe, they are trying to fetch stages.
Stages needed to provide information what to run and options to run.
To initialize it, you need to call stages and then enter every stage's name with spaces.
Example:
/* Initialization of one stage */
stages: run
/* Initialization of more than one stage */
stages: one more stage
Every stage in your configuration has properties.
To edit stages properties, you must use assign operator (!).
In previous versions of zeroProbe (< 2.0) assign operator used only to assign command to stage.
Now, to assign command, you must set it to stage propertie.
Stage has 3 properties: add_command, on_error and ignore_errors.
First, need to add commands to execute.
Second, it's a command that will be executed if error occur. And last one is a checkbox, ignore errors or not.
Example:
project: test
stages: build run-check run-count
!build.add_command: python -m nuitka --noinclude-custom-mode=http:nofollow --noinclude-custom-mode=email:nofollow --follow-import-to=subprocess paccon.py
!build.ignore_errors: 1
!run-check.add_command: ./paccon.bin check
!run-count.add_command: ./paccon.bin count
Table of available properties:
| Property | Description | Value |
|---|---|---|
| add_command | Adds command to execute. | text |
| on_error | Command if error occur. | text |
| ignore_errors | Suggest, can zeroProbe ignore errors of this stage |
1 or 0
|
ProbeConfig are not too hard. Also, it will gain new features and commands in future updates. Or, tell your idea for a new feature!