2024-01-21 18:02:51 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
function gen-theme() {
|
|
|
|
local file="$1"
|
|
|
|
local bn="$(basename $file)"
|
2024-03-31 08:47:37 +08:00
|
|
|
local out="RedPandaIDE/resources/themes/${bn%.tl}.lua"
|
2024-01-21 18:02:51 +08:00
|
|
|
echo -e "\033[1;33mChecking $file\033[0m"
|
|
|
|
tl check --include-dir addon --global-env-def defs/theme --quiet "$file"
|
|
|
|
echo -e "\033[1;32mCompiling $file\033[0m"
|
|
|
|
tl gen --include-dir addon --global-env-def defs/theme --gen-compat off --gen-target 5.4 -o "$out" "$file"
|
|
|
|
}
|
|
|
|
|
|
|
|
for file in addon/theme/*.tl; do
|
|
|
|
gen-theme "$file"
|
|
|
|
done
|
|
|
|
|
|
|
|
function gen-compiler-hint() {
|
|
|
|
local file="$1"
|
|
|
|
local out="$2"
|
|
|
|
echo -e "\033[1;33mChecking $file\033[0m"
|
|
|
|
tl check --include-dir addon --global-env-def defs/compiler_hint --quiet "$file"
|
|
|
|
echo -e "\033[1;32mCompiling $file\033[0m"
|
|
|
|
tl gen --include-dir addon --global-env-def defs/compiler_hint --gen-compat off --gen-target 5.4 -o "$out" "$file"
|
|
|
|
}
|
|
|
|
|
|
|
|
gen-compiler-hint addon/compiler_hint/windows_domain.tl packages/msys/domain/compiler_hint.lua
|
|
|
|
gen-compiler-hint addon/compiler_hint/archlinux.tl packages/archlinux/compiler_hint.lua
|
2024-02-19 18:24:29 +08:00
|
|
|
gen-compiler-hint addon/compiler_hint/debian.tl packages/debian/compiler_hint.lua
|