37 lines
No EOL
1.2 KiB
Bash
Executable file
37 lines
No EOL
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
pushd "$(dirname "$0")"
|
|
if [ -z "$CXX" ]; then
|
|
export CXX=g++
|
|
fi
|
|
declare -a ASSETS
|
|
add_basic() {
|
|
ASSETS+=($2.h)
|
|
./btcc -nocompress $1 $2 > $2.h
|
|
}
|
|
add_font() {
|
|
ASSETS+=($2.h)
|
|
./btcc -base85 $1 $2 > $2.h
|
|
}
|
|
$CXX ../imgui/misc/fonts/binary_to_compressed_c.cpp -o btcc
|
|
add_font forkawesome-webfont.ttf forkawesome
|
|
for i in Noto_Sans/*.ttf; do
|
|
FONT="$(echo -n "$i" | sed 's/^.*\///g' | sed 's/.ttf$//' | tr '[:upper:]' '[:lower:]' | sed 's/-/_/g')"
|
|
add_font "$i" "$FONT"
|
|
done
|
|
add_basic 'icon.png' 'icon'
|
|
add_basic 'Noto_Sans/OFL.txt' 'notosans_license'
|
|
add_basic '../LICENSE' 'nekoplayer_license'
|
|
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'
|
|
add_basic '../IconFontCppHeaders/licence.txt' 'icnfntcpphdrs_license'
|
|
echo '#pragma once' > 'assets.h'
|
|
for i in "${ASSETS[@]}"; do
|
|
echo "#include \"$i\"" >> 'assets.h'
|
|
done
|
|
rm btcc
|
|
popd |