project
Subsystemsnew
Creates a new Project from a selected Template
-t/--template [templateName]
app
-n/--name [projectName]
Unset(depends on selected template)
--nologo
app
build
/run
/publish
build targetsempty
build
targetlib
build
/test
build targetCreates a new Project based on the app
template in the current working directory.
bs project new -t app
Creates a new Project with name MyApp
based on the app
template in the current working directory.
bs project new -t app -n MyApp
make
Runs a selected build target
-t/--target [targetName]
build
--nologo
Run the default target of the project in the current working directory
project make
Run the build
target of the project in the current working directory
project make -t build
The Project Information gets stored in the file build-settings.json
in the root of the project directory.
App Template Build Settings Example
Contains the Name and Version of the Project
"AppInfo": {
"Name": "App",
"Version": "0.0.0.1"
}
Contains a list of all build targets that are defined for this project.
"BuildTargets": {
"Targets": [
...
]
}
A build target defines the way a project gets built.
{
"Name": "build",
"OutputFormat": "text",
"OutputFile": "./bin/build/App.bs",
"Include": [
"./src/*.bs"
],
"SubTarget": "",
"References": [],
"PreEvents": [],
"PostEvents": [],
"PreprocessorDirectives": ""
}
It is possible to specify a sub target that will get executed before the current target is running.
A List of Directives that will be defined in the preprocessor during execution of the build target.
"PreprocessorDirectives":
"TARGET=\"build\" NAME=\"App\" VERSION=\"1.0.0.0\" FULLNAME=\"App@1.0.0.0\""
The Project Settings have a feature that enables writing properties that get resolved at runtime
Instead of Explicitly writing out the Output Path of the build target, the output path can be specified dynamically like so:
"OutputFile": "./bin/%Target.Name%/%AppInfo.Name%%AppInfo.Version%.%Target.Output.OutputExtension%"
During Runtime the OutputFile property will have this value:
build
App
1.0.0.0
text
"OutputFile": "./bin/build/App1.0.0.0.bs"
It is also possible to use the properties from subtargets inside the current target. Which enables one to pass through the output file and other information of the subtarget.
"OutputFile": "%SubTarget.OutputFile%",
The Properties of the Settings file will resolve recursively.