-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
90 lines (71 loc) · 1.9 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
# 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_tauri]
description = "Build the swift code"
script_runner = "@shell"
script = """
cd frontend
npm run tauri build
"""
[tasks.build_installer]
command = "iscc"
args = ["./installer/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)
}
mkdir build/x86 -Force
cp target/$str/ui.exe build
cp target/$str/azookey-server.exe build
cp target/$str/azookey_windows.dll build
cp target/$str/launcher.exe build
cp target/i686-pc-windows-msvc/$str/azookey_windows.dll build/x86
cp server-swift/.build/x86_64-unknown-windows-msvc/release/azookey-server.dll build
cp -Recurse -Force llama_cpu build
cp -Recurse -Force llama_cuda build
cp -Recurse -Force llama_vulkan build
cp $env:APPDATA/../Local/Programs/Swift/Runtimes/*/usr/bin/* build
cp -Recurse -Force server-swift/azooKey_emoji_dictionary_storage/EmojiDictionary build
cp -Recurse -Force server-swift/azooKey_dictionary_storage/Dictionary build
cp zenz.gguf build
icacls build/azookey_windows.dll /grant "*S-1-15-2-1:(RX)"
icacls build/x86/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_tauri",
"post_build",
"build_installer"
]