feat(assets): moved all static assets to assets in prep for resource manager

This commit is contained in:
2025-03-20 07:30:38 -04:00
parent b2d9429312
commit 7ad8d609fb
4 changed files with 29 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ Codata Internationally Recommended 2022 Values of the Fundamental Physical Const
Symbol Name Value Unit Uncertainty Source
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
weinK Wien displacement law constant 2.89776850e-01 K cm 5.10000000e-07 CODATA2022
wienK Wien displacement law constant 2.89776850e-01 K cm 5.10000000e-07 CODATA2022
au1Hyper atomic unit of 1st hyperpolarizablity 3.20636151e-53 C^3 m^3 J^-2 2.80000000e-60 CODATA2022
au2Hyper atomic unit of 2nd hyperpolarizablity 6.23538080e-65 C^4 m^4 J^-3 1.10000000e-71 CODATA2022
auEDip atomic unit of electric dipole moment 8.47835309e-30 C m 7.30000000e-37 CODATA2022

10
assets/const/format.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <input_file> <output_file>"
exit 1
fi
input_file="$1"
output_file="$2"
printf 'const char embeddedConstants[] = R"(' > "$output_file"
cat "$input_file" >> "$output_file"
printf ')";\n' >> "$output_file"

17
assets/const/meson.build Normal file
View File

@@ -0,0 +1,17 @@
data_file = files('const.dat')
command_file = files('format.sh')
output_file = meson.current_build_dir() + '/embedded_constants.h'
embedded_constants_h = custom_target('embed_constants',
input: data_file,
output: 'embedded_constants.h',
command: ['sh', '-c', command_file[0].full_path()+' @INPUT@ ' + output_file, '@INPUT@', '@OUTPUT@']
)
# Ensure the generated header is included
const_data_header = include_directories('.')
const_data_dep = declare_dependency(
include_directories: const_data_header,
sources: embedded_constants_h
)

BIN
assets/mesh/sphere.msh Normal file

Binary file not shown.