forked from Macoron/whisper.unity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_cpp_linux.sh
More file actions
37 lines (27 loc) · 848 Bytes
/
build_cpp_linux.sh
File metadata and controls
37 lines (27 loc) · 848 Bytes
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
#!/bin/bash
whisper_path="$1"
unity_project="$PWD"
build_path="$1/build"
clean_build(){
rm -rf "$build_path"
mkdir "$build_path"
cd "$build_path"
}
build() {
clean_build
echo "Starting building..."
cmake -DCMAKE_BUILD_TYPE=Release -DGGML_VULKAN=ON \
-DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_EXAMPLES=OFF ../
make
echo "Build complete!"
rm $unity_project/Packages/com.whisper.unity/Plugins/Linux/*.so
artifact_path="$build_path/src/libwhisper.so"
target_path="$unity_project/Packages/com.whisper.unity/Plugins/Linux/libwhisper.so"
cp "$artifact_path" "$target_path"
artifact_path=$build_path/ggml/src
target_path=$unity_project/Packages/com.whisper.unity/Plugins/Linux/
cp "$artifact_path"/*.so "$target_path"
cp "$artifact_path"/*/*.so "$target_path"
echo "Build files copied to $target_path"
}
build