CQtDeployer/docs/en/ExtraFiles.md

104 lines
2.4 KiB
Markdown
Raw Normal View History

2021-01-09 18:42:17 +03:00
# Adding extraData into distributive.
2021-01-09 23:55:36 +03:00
CQtDeployer has support to work with extra data files.
2021-01-09 18:42:17 +03:00
2021-01-09 23:55:36 +03:00
For this you should use the -extraData and -extraDataOut options.
2021-01-09 18:42:17 +03:00
## Examples:
### Add custom file into root directory of the your distribution.
```
cqtdeployer -extraData path/to/my/customFile
```
Or in configFile.json
```json
{
...
"extraData": "./path/to/my/customFile"
...
}
```
This command support list of arrguments.
``` bash
cqtdeployer -extraData path/to/my/customFile,path/to/my/customFile2,path/to/my/customFile3
```
Or in configFile.json
```json
{
...
"extraData": [
"./path/to/my/customFile",
"./path/to/my/customFile2",
"./path/to/my/customFile3"
]
...
}
```
### Changing location of extra data files.
2021-01-09 23:55:36 +03:00
For change location you should use the extraDataOut options. This option change destination path relative the root of the distributive.
2021-01-09 18:42:17 +03:00
### Example. Add custom scripts into scripts folder in the Distribution.
``` bash
cqtdeployer -extraData /path/to/myScripts.sh,/another/path/to/myScripts.sh -extraDataOut scripts
```
Or in configFile.json
```json
{
...
"extraData": [
"./path/to/myScripts.sh",
"./another/path/to/myScripts.sh"
],
"extraDataOut": "scripts"
...
}
```
## Packages
2021-01-09 23:55:36 +03:00
extraData and extraDataOut options have support to work with packages. See the packaging [page](Pacakges.md) to get more information about packages.
2021-01-09 18:42:17 +03:00
Sometimes we need to create a multipackages application. For example create a installer for clinet-server application with the client and server applications. The client and server have a own default configuration files. We add cinfig files using the extraData option.
For create a big distributon i recomends use the [confFile](DeployConfigFile.md).
## Example multipacking application.
```json
{
"bin": [
"myClientExecutable",
"myServerExecutable"
],
"targetPackage" : [
["Client", "myClientExecutable"],
["Server", "myServerExecutable"]
],
"extraData": [
["Client", "./path/to/clientConfig.conf"],
["Server", "./path/to/serverConfig.conf"]
],
"extraDataOut": [
["Client", "defaultConfigurations"],
["Server", "defaultConfigurations"]
]
}
```
This config create a distribution with two appications (client and server). Each application have a own configuration file in the defaultConfigurations folder.