forked from espanso/espanso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
115 lines (90 loc) · 2.81 KB
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[config]
default_to_workspace = false
[env]
DEBUG = true
RELEASE = false
NO_X11 = false
NO_MODULO = false
EXEC_PATH = "target/debug/espanso"
BUILD_ARCH = "current"
[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"
script = { file = "scripts/build_binary.rs" }
[tasks.run-binary]
command = "${EXEC_PATH}"
args = ["${@}"]
dependencies = ["build-binary"]
[tasks.test-binary]
script_runner = "@rust"
script = { file = "scripts/test_binary.rs" }
# Windows
[tasks.build-windows-resources]
script_runner = "@rust"
script = { file = "scripts/build_windows_resources.rs" }
dependencies = ["build-binary"]
[tasks.build-windows-portable]
script_runner = "@rust"
script = { file = "scripts/build_windows_portable.rs" }
dependencies = ["build-windows-resources"]
[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"]
[tasks.sign-windows-resources]
env = { "TARGET_SIGNTOOL_FILE" = "target/windows/resources/espansod.exe" }
script_runner = "@rust"
script = { file = "scripts/sign_windows_exe.rs" }
[tasks.sign-windows-installer]
env = { "TARGET_SIGNTOOL_FILE" = "target/windows/installer/Espanso-Win-Installer-x86_64.exe" }
script_runner = "@rust"
script = { file = "scripts/sign_windows_exe.rs" }
# macOS
[tasks.build-macos-arm-binary]
env = { "BUILD_ARCH" = "aarch64-apple-darwin" }
run_task = [
{ name = "build-binary" }
]
[tasks.build-macos-x86-binary]
env = { "BUILD_ARCH" = "x86_64-apple-darwin" }
run_task = [
{ name = "build-binary" }
]
[tasks.build-universal-binary]
script = { file = "scripts/join_universal_binary.sh"}
dependencies=["build-macos-arm-binary", "build-macos-x86-binary"]
[tasks.create-bundle]
script = { file = "scripts/create_bundle.sh" }
dependencies=["build-binary"]
[tasks.create-universal-bundle]
env = { "EXEC_PATH" = "target/universal/espanso" }
script = { file = "scripts/create_bundle.sh" }
dependencies=["build-universal-binary"]
[tasks.run-bundle]
command="target/mac/Espanso.app/Contents/MacOS/espanso"
args=["${@}"]
dependencies=["create-bundle"]
# Linux
[tasks.create-app-image]
script = { file = "scripts/create_app_image.sh" }
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
[tasks.test-output]
command = "cargo"
args = ["test", "--workspace", "--exclude", "espanso-modulo", "--exclude", "espanso-ipc", "--no-default-features", "--", "--nocapture"]