-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
68 lines (55 loc) · 1.5 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
# makefile for cargo
[config]
default_to_workspace = false
[tasks.format]
command = "cargo"
args = ["fmt"]
[tasks.build_swift]
description = "Build the swift code"
script_runner = "@shell"
script = """
cd server-swift
swift build -c release
cp .build/release/azookey-server.lib ../
"""
[tasks.build_x64]
command = "cargo"
args = ["build", "${@}"]
[tasks.build_x86]
command = "cargo"
args = ["build", "-p", "azookey-windows", "--target=i686-pc-windows-msvc", "${@}"]
[tasks.build_installer]
command = "iscc"
args = ["./installer.iss"]
[tasks.post_build]
description = "Copy necessary files"
script_runner = "powershell"
script_extension = "ps1"
script = """
$str=$args[0]
if ([string]::IsNullOrEmpty($str)) {
$str = "debug"
} else {
$str=$str.Substring(2)
}
cp server-swift/.build/x86_64-unknown-windows-msvc/release/azookey-server.dll target/$str/
cp server-swift/llama.dll target/$str/
cp $env:APPDATA/../Local/Programs/Swift/Runtimes/*/usr/bin/* target/$str/
cp -Recurse -Force server-swift/azooKey_emoji_dictionary_storage/EmojiDictionary target/$str/
cp -Recurse -Force server-swift/azooKey_dictionary_storage/Dictionary target/$str/
cp zenz.gguf target/$str/
icacls target/$str/azookey_windows.dll /grant "*S-1-15-2-1:(RX)"
icacls target/i686-pc-windows-msvc/$str/azookey_windows.dll /grant "*S-1-15-2-1:(RX)"
"""
args = ["${@}"]
[tasks.build]
clear = true
description = "Run the flow"
dependencies = [
"format",
"build_swift",
"build_x64",
"build_x86",
"build_installer",
"post_build"
]