mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-13 17:48:10 +08:00
27 lines
703 B
Bash
Executable File
27 lines
703 B
Bash
Executable File
#!/usr/bin/env bash
|
|
(cd /usr/src/doslib/tool/dsxmenu && ./make.sh) || exit 1
|
|
|
|
filename="DSXMENU.EXE"
|
|
bfb_sym="bfb_DSXMENU_EXE_PC"
|
|
src_sym="_usr_src_doslib_tool_dsxmenu_dos86s_dsxmenu_exe"
|
|
dst_sym="bin_dsxmenu_exe_pc"
|
|
cppfile="dsxmenu_exe_pc.cpp"
|
|
|
|
cat >$cppfile <<_EOF
|
|
|
|
#include "dos_inc.h"
|
|
|
|
_EOF
|
|
xxd -i /usr/src/doslib/tool/dsxmenu/dos86s/dsxmenu.exe | sed -e 's/unsigned char/static const unsigned char/' | sed -e 's/unsigned int/static const unsigned int/' | sed -e "s/$src_sym/$dst_sym/" | grep -v "$dst_sym"_len >>$cppfile || exit 1
|
|
|
|
cat >>$cppfile <<_EOF
|
|
|
|
struct BuiltinFileBlob $bfb_sym = {
|
|
/*recommended file name*/ "$filename",
|
|
/*data*/ $dst_sym,
|
|
/*length*/ sizeof($dst_sym)
|
|
};
|
|
|
|
_EOF
|
|
|