Compiler Configuration
To create a build configuration, use the init
command. The command will create the boson.json
file in the root of the application with build settings. It is not required for compilation, but allows better control over all stages of the build.
name
The name of your application.
It is used to create output executable file. For example, if you specify "name": "example"
, the example.exe
application will be created for the Windows platform (and example
binaries for others).
arch
List of build architectures.
You can explicitly specify the CPU architectures your application will be built for.
Available options:
amd64
(orx86_64
)aarch64
(orarm64
)
platform
List of build platforms.
You can explicitly specify a list of operating systems for which your application will be compiled.
Available options:
windows
(orwin
/win32
/win64
)linux
macos
(ordarwin
)
entrypoint
An application entrypoint PHP file.
In the entrypoint field, you should specify the relative path to the file that will be executed when the application is launched.
output
An output build directory.
The relative path is specified in which all assembly files and the result of the assembly itself will be placed.
build
List of rules for including files inside the assembly.
This field contains an object with a set of rules. Available fields of the object:
"files"
- List of files to include."directories"
- List of directories to include."finder"
- List of rules (filters) to include.
build.files
The "files"
section specifies a list (array) of individual files to include in the assembly.
build.directories
The "directories"
section specifies a list (array) of directories to include in the assembly.
build.finder
The "finder"
section specifies a list (array) of finder-like rules to include in the assembly.
The "finder"
may contain an array of objects with, "name"
, "not-name"
, "directory"
and "not-directory"
fields.
name field format
Filters files by name. All files matching the specified rule will be included in the build.
You may specify a mask where an asterisk means any occurrence of any number of characters
*.phpindex*You can specify a regular expression to check the file name. Such an expression must start and end with the
/
characters./\.php$//^index.*/
directory field format
Specifies the directory in which to search for files to include.
You may define real path to directory.
./path/to/directoryYou may use
*
as a wildcard character to search in the directories matching a pattern (each pattern has to resolve to at least one directory path)../path/to/*/*/dir
ini
Additional options for the PHP interpreter.
You can specify additional options for the interpreter using the settings object.
The key should be one of the available directive names. The value may be any scalar (int
, float
, string
or bool
) value.