2023-07-08 13:31:00 -07:00
|
|
|
#!/bin/bash
|
2023-04-24 15:28:39 -07:00
|
|
|
pushd "$(dirname "$0")"
|
2023-04-24 13:45:06 -07:00
|
|
|
if [ -z "$CXX" ]; then
|
|
|
|
export CXX=g++
|
|
|
|
fi
|
2023-07-20 14:45:35 -07:00
|
|
|
declare -a ASSETS
|
|
|
|
add_basic() {
|
|
|
|
ASSETS+=($2.h)
|
2023-04-24 13:45:06 -07:00
|
|
|
./btcc -nocompress $1 $2 > $2.h
|
|
|
|
}
|
2023-07-24 23:13:47 -07:00
|
|
|
add_base85() {
|
2023-07-20 14:45:35 -07:00
|
|
|
ASSETS+=($2.h)
|
2023-04-24 13:45:06 -07:00
|
|
|
./btcc -base85 $1 $2 > $2.h
|
|
|
|
}
|
2023-04-24 15:28:39 -07:00
|
|
|
$CXX ../imgui/misc/fonts/binary_to_compressed_c.cpp -o btcc
|
2023-07-24 23:13:47 -07:00
|
|
|
add_base85 forkawesome-webfont.ttf forkawesome
|
2023-07-20 14:45:35 -07:00
|
|
|
for i in Noto_Sans/*.ttf; do
|
|
|
|
FONT="$(echo -n "$i" | sed 's/^.*\///g' | sed 's/.ttf$//' | tr '[:upper:]' '[:lower:]' | sed 's/-/_/g')"
|
2023-07-24 23:13:47 -07:00
|
|
|
add_base85 "$i" "$FONT"
|
2023-07-20 14:45:35 -07:00
|
|
|
done
|
2023-07-24 23:13:47 -07:00
|
|
|
for i in Noto_Sans_JP/*.ttf; do
|
|
|
|
FONT="$(echo -n "$i" | sed 's/^.*\///g' | sed 's/.ttf$//' | tr '[:upper:]' '[:lower:]' | sed 's/-/_/g')"
|
|
|
|
add_base85 "$i" "$FONT"
|
|
|
|
done
|
|
|
|
add_base85 'icon.png' 'icon'
|
2023-07-20 14:45:35 -07:00
|
|
|
add_basic 'Noto_Sans/OFL.txt' 'notosans_license'
|
2023-07-24 23:13:47 -07:00
|
|
|
add_basic 'Noto_Sans_JP/OFL.txt' 'notosansjp_license'
|
2024-01-21 15:21:18 -08:00
|
|
|
add_basic '../LICENSE' 'looper_license'
|
2023-07-20 14:45:35 -07:00
|
|
|
add_basic '../subprojects/jsoncpp/LICENSE' 'jsoncpp_license'
|
|
|
|
add_basic '../subprojects/SDL-Mixer-X/COPYING.txt' 'sdl_mixer_x_license'
|
|
|
|
add_basic '../imgui-filebrowser/LICENSE' 'imgui_filebrowser_license'
|
|
|
|
add_basic '../imgui/LICENSE.txt' 'imgui_license'
|
|
|
|
add_basic 'licenses/SoundTouch.txt' 'soundtouch_license'
|
|
|
|
add_basic 'licenses/libportal.txt' 'libportal_license'
|
|
|
|
add_basic 'licenses/ForkAwesome.txt' 'forkawesome_license'
|
2023-07-24 23:13:47 -07:00
|
|
|
add_basic 'licenses/libintl.txt' 'libintl_license'
|
2023-10-16 10:44:25 -07:00
|
|
|
add_basic 'licenses/cli11.txt' 'cli11_license'
|
2023-12-22 14:13:48 -08:00
|
|
|
add_basic 'licenses/TomlPlusPlus.txt' 'tomlplusplus_license'
|
2023-07-20 14:45:35 -07:00
|
|
|
add_basic '../IconFontCppHeaders/licence.txt' 'icnfntcpphdrs_license'
|
|
|
|
echo '#pragma once' > 'assets.h'
|
|
|
|
for i in "${ASSETS[@]}"; do
|
|
|
|
echo "#include \"$i\"" >> 'assets.h'
|
|
|
|
done
|
2023-04-24 13:45:06 -07:00
|
|
|
rm btcc
|
2024-01-21 15:21:18 -08:00
|
|
|
popd
|