2021-05-27 20:05:45 +00:00
|
|
|
[config]
|
|
|
|
default_to_workspace = false
|
|
|
|
|
2021-07-09 22:18:04 +00:00
|
|
|
[env]
|
|
|
|
DEBUG = true
|
|
|
|
RELEASE = false
|
|
|
|
NO_X11 = false
|
|
|
|
NO_MODULO = false
|
|
|
|
EXEC_PATH = "target/debug/espanso"
|
2021-07-17 08:24:25 +00:00
|
|
|
BUILD_ARCH = "x86_64" # TODO: do something with this
|
2021-07-09 22:18:04 +00:00
|
|
|
|
|
|
|
[env.release]
|
|
|
|
DEBUG = false
|
|
|
|
RELEASE = true
|
|
|
|
EXEC_PATH = "target/release/espanso"
|
|
|
|
|
|
|
|
# Build variants
|
|
|
|
|
|
|
|
# This one was written in Rust instead of bash because it has to run on Windows as well
|
|
|
|
[tasks.build-binary]
|
|
|
|
script_runner = "@rust"
|
2021-07-16 20:14:05 +00:00
|
|
|
script = { file = "scripts/build_binary.rs" }
|
2021-06-05 17:10:31 +00:00
|
|
|
|
2021-07-10 08:45:39 +00:00
|
|
|
[tasks.run-binary]
|
|
|
|
command = "${EXEC_PATH}"
|
|
|
|
args = ["${@}"]
|
|
|
|
dependencies = ["build-binary"]
|
|
|
|
|
2021-07-16 20:14:05 +00:00
|
|
|
# Windows
|
2021-06-05 17:10:31 +00:00
|
|
|
|
2021-07-16 20:50:13 +00:00
|
|
|
[tasks.build-windows-resources]
|
|
|
|
script_runner = "@rust"
|
|
|
|
script = { file = "scripts/build_windows_resources.rs" }
|
|
|
|
dependencies = ["build-binary"]
|
|
|
|
|
2021-07-16 20:14:05 +00:00
|
|
|
[tasks.build-windows-portable]
|
|
|
|
script_runner = "@rust"
|
|
|
|
script = { file = "scripts/build_windows_portable.rs" }
|
2021-07-16 20:50:13 +00:00
|
|
|
dependencies = ["build-windows-resources"]
|
2021-06-05 17:10:31 +00:00
|
|
|
|
2021-07-17 08:24:25 +00:00
|
|
|
[tasks.build-windows-installer]
|
|
|
|
script_runner = "@rust"
|
|
|
|
script = { file = "scripts/build_windows_installer.rs" }
|
|
|
|
dependencies = ["build-windows-resources"]
|
|
|
|
|
|
|
|
[tasks.build-windows-all]
|
|
|
|
dependencies = ["build-windows-portable", "build-windows-installer"]
|
|
|
|
|
2021-07-16 20:14:05 +00:00
|
|
|
# macOS
|
2021-06-05 17:10:31 +00:00
|
|
|
|
2021-07-16 20:14:05 +00:00
|
|
|
[tasks.create-bundle]
|
|
|
|
script = { file = "scripts/create_bundle.sh" }
|
2021-07-09 22:18:04 +00:00
|
|
|
dependencies=["build-binary"]
|
2021-06-05 17:10:31 +00:00
|
|
|
|
2021-07-11 20:26:40 +00:00
|
|
|
[tasks.run-bundle]
|
2021-06-05 17:10:31 +00:00
|
|
|
command="target/mac/Espanso.app/Contents/MacOS/espanso"
|
|
|
|
args=["${@}"]
|
|
|
|
dependencies=["create-bundle"]
|
|
|
|
|
2021-07-16 20:14:05 +00:00
|
|
|
# Linux
|
|
|
|
|
2021-07-09 22:18:04 +00:00
|
|
|
[tasks.create-app-image]
|
2021-07-16 20:14:05 +00:00
|
|
|
script = { file = "scripts/create_app_image.sh" }
|
2021-07-09 22:18:04 +00:00
|
|
|
dependencies=["build-binary"]
|
|
|
|
|
|
|
|
[tasks.run-app-image]
|
|
|
|
args=["${@}"]
|
|
|
|
script='''
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
echo Launching AppImage with args: "$@"
|
|
|
|
./target/linux/AppImage/out/Espanso-*.AppImage "$@"
|
|
|
|
'''
|
|
|
|
dependencies=["create-app-image"]
|
|
|
|
|
|
|
|
# Test runs
|
|
|
|
|
2021-05-27 20:05:45 +00:00
|
|
|
[tasks.test]
|
|
|
|
command = "cargo"
|
2021-06-25 16:57:17 +00:00
|
|
|
args = ["test", "--workspace", "--exclude", "espanso-modulo", "--exclude", "espanso-ipc", "--no-default-features"]
|
2021-06-02 19:52:08 +00:00
|
|
|
|
|
|
|
[tasks.test-output]
|
|
|
|
command = "cargo"
|
2021-06-25 16:57:17 +00:00
|
|
|
args = ["test", "--workspace", "--exclude", "espanso-modulo", "--exclude", "espanso-ipc", "--no-default-features", "--", "--nocapture"]
|