mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 22:59:35 +00:00
- Updated build and run commands to accept a --target option for specifying target platforms. - Enhanced documentation to include cross-compilation usage and supported targets. - Modified configuration to allow target-specific settings and toolchains. - Introduced a new test command to run project tests with specified profiles and targets. - Improved handling of target directories and output structure for different platforms. - Added support for multiple targets in the configuration file. - Implemented inheritance for workspace and dependencies based on target and profile.
1.3 KiB
1.3 KiB
dcr run
Builds the project and runs the resulting binary.
Usage
dcr run
dcr run --debug
dcr run --release
dcr run --target linux --release
dcr run --release --force
dcr run --debug --clean
Behavior
- Validates
dcr.toml. - Reads
package.name,build.kind, and optionalbuild.target. - Runs the same build flow as
dcr build. - Executes the built artifact path for the selected profile.
- If
[run].cmdis set, runs that command instead of the built binary.
Restrictions
- If
build.kind = "staticlib"orbuild.kind = "sharedlib",runexits with error. - The profile is selected from the first argument.
--target <triple>runs the binary for specified target (short names:linux,macos,windows).--forceskips build cache checks and recompiles.--cleanremovestarget/<profile>andbuild.cleanpaths before building.
run.cmd variables
run.cmd supports the same variables as build steps: {profile}, {version}, {version_major},
{version_minor}, {version_patch}, {version_suffix}, {version_suffix_dash}.
The command runs via sh -c on Unix and cmd /C on Windows.
On build failure
dcr run attempts to launch an existing binary from the same profile if present; otherwise it reports that code errors must be fixed.