@@ -15,18 +15,20 @@ if [[ "$1" == "" ]]; then
15
15
# Nightly Build
16
16
LINUX_ARM=" https://github.com/webui-dev/webui/releases/download/nightly/webui-linux-gcc-arm.zip"
17
17
LINUX_ARM64=" https://github.com/webui-dev/webui/releases/download/nightly/webui-linux-gcc-arm64.zip"
18
- LINUX_X64=" https://github.com/webui-dev/webui/releases/download/nightly/webui-linux-gcc-x64.zip"
18
+ LINUX_GCC_X64=" https://github.com/webui-dev/webui/releases/download/nightly/webui-linux-gcc-x64.zip"
19
+ LINUX_CLANG_X64=" https://github.com/webui-dev/webui/releases/download/nightly/webui-linux-clang-x64.zip"
19
20
MACOS_ARM64=" https://github.com/webui-dev/webui/releases/download/nightly/webui-macos-clang-arm64.zip"
20
21
MACOS_X64=" https://github.com/webui-dev/webui/releases/download/nightly/webui-macos-clang-x64.zip"
21
22
WINDOWS_MSVC_X64=" https://github.com/webui-dev/webui/releases/download/nightly/webui-windows-msvc-x64.zip"
22
23
23
24
# Release
24
- # LINUX_ARM="https://github.com/webui-dev/webui/releases/download/2.4.2/webui-linux-gcc-arm.zip"
25
- # LINUX_ARM64="https://github.com/webui-dev/webui/releases/download/2.4.2/webui-linux-gcc-arm64.zip"
26
- # LINUX_X64="https://github.com/webui-dev/webui/releases/download/2.4.2/webui-linux-gcc-x64.zip"
27
- # MACOS_ARM64="https://github.com/webui-dev/webui/releases/download/2.4.2/webui-macos-clang-arm64.zip"
28
- # MACOS_X64="https://github.com/webui-dev/webui/releases/download/2.4.2/webui-macos-clang-x64.zip"
29
- # WINDOWS_MSVC_X64="https://github.com/webui-dev/webui/releases/download/2.4.2/webui-windows-msvc-x64.zip"
25
+ # LINUX_ARM="https://github.com/webui-dev/webui/releases/download/2.5.0-beta.2/webui-linux-gcc-arm.zip"
26
+ # LINUX_ARM64="https://github.com/webui-dev/webui/releases/download/2.5.0-beta.2/webui-linux-gcc-arm64.zip"
27
+ # LINUX_GCC_X64="https://github.com/webui-dev/webui/releases/download/2.5.0-beta.2/webui-linux-gcc-x64.zip"
28
+ # LINUX_CLANG_X64="https://github.com/webui-dev/webui/releases/download/2.5.0-beta.2/webui-linux-clang-x64.zip"
29
+ # MACOS_ARM64="https://github.com/webui-dev/webui/releases/download/2.5.0-beta.2/webui-macos-clang-arm64.zip"
30
+ # MACOS_X64="https://github.com/webui-dev/webui/releases/download/2.5.0-beta.2/webui-macos-clang-x64.zip"
31
+ # WINDOWS_MSVC_X64="https://github.com/webui-dev/webui/releases/download/2.5.0-beta.2/webui-windows-msvc-x64.zip"
30
32
31
33
# Download and extract archives
32
34
download_and_extract () {
@@ -49,7 +51,8 @@ if [[ "$1" == "" ]]; then
49
51
50
52
download_and_extract $LINUX_ARM " webui-linux-gcc-arm" " webui-2.so"
51
53
download_and_extract $LINUX_ARM64 " webui-linux-gcc-arm64" " webui-2.so"
52
- download_and_extract $LINUX_X64 " webui-linux-gcc-x64" " webui-2.so"
54
+ download_and_extract $LINUX_GCC_X64 " webui-linux-gcc-x64" " webui-2.so"
55
+ download_and_extract $LINUX_CLANG_X64 " webui-linux-clang-x64" " webui-2.so"
53
56
download_and_extract $MACOS_ARM64 " webui-macos-clang-arm64" " webui-2.dylib"
54
57
download_and_extract $MACOS_X64 " webui-macos-clang-x64" " webui-2.dylib"
55
58
download_and_extract $WINDOWS_MSVC_X64 " webui-windows-msvc-x64" " webui-2.dll"
@@ -66,14 +69,14 @@ if [[ "$1" == "minimal" ]]; then
66
69
# Download WebUI library for only the current OS.
67
70
68
71
# Nightly Build
69
- # BASE_URL="https://github.com/webui-dev/webui/releases/download/nightly/"
72
+ BASE_URL=" https://github.com/webui-dev/webui/releases/download/nightly/"
70
73
71
74
# Release
72
- BASE_URL=" https://github.com/webui-dev/webui/releases/download/2.4 .2/"
75
+ # BASE_URL="https://github.com/webui-dev/webui/releases/download/2.5.0-beta .2/"
73
76
74
77
# Detect OS (macOS / Linux)
75
78
OS=" linux"
76
- CC=" gcc"
79
+ CC=" clang " # " gcc"
77
80
EXT=" so"
78
81
if [[ " $OSTYPE " == " darwin" * ]]; then
79
82
OS=" macos"
@@ -97,6 +100,9 @@ if [[ "$1" == "minimal" ]]; then
97
100
elif [ " $ARCH " = " aarch64" ]; then
98
101
# ARM 64Bit
99
102
FILENAME=" webui-${OS} -${CC} -arm64"
103
+ elif [ " $ARCH " = " arm64" ]; then
104
+ # ARM 64bit - apple
105
+ FILENAME=" webui-${OS} -${CC} -arm64"
100
106
else
101
107
echo " Error: Unknown architecture '$ARCH '"
102
108
exit 1
@@ -106,7 +112,11 @@ if [[ "$1" == "minimal" ]]; then
106
112
mkdir -p " cache/$FILENAME " 2> /dev/null
107
113
108
114
# Download the archive using wget
109
- wget -q " $BASE_URL$FILENAME .zip" -O " cache/$FILENAME .zip"
115
+ if [ " $ARCH " = " arm64" ]; then
116
+ curl -sL " $BASE_URL$FILENAME .zip" -o " cache/$FILENAME .zip"
117
+ else
118
+ wget -q " $BASE_URL$FILENAME .zip" -O " cache/$FILENAME .zip"
119
+ fi
110
120
111
121
# Extract archive
112
122
unzip -q " cache/$FILENAME .zip" -d " cache"
0 commit comments