mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 13:27:24 +00:00
33 lines
654 B
Bash
33 lines
654 B
Bash
if [ -d "./cxx/" ];then
|
|
rm -r ./cxx
|
|
fi
|
|
|
|
mkdir ./cxx
|
|
|
|
sed 's/\#include \"quickjs\/quickjs.h\"/\#include \"quickjs.h\"/g' ../cxx/ffi.h > ./cxx/ffi.h
|
|
cp ../cxx/ffi.cpp ./cxx/ffi.cpp
|
|
|
|
quickjs_version=$(cat ../cxx/quickjs/VERSION)
|
|
|
|
sed '1i\
|
|
\#define CONFIG_VERSION \"'$quickjs_version'\"\
|
|
' ../cxx/quickjs/quickjs.c > ./cxx/quickjs.c
|
|
|
|
quickjs_src=(
|
|
"list.h"
|
|
"cutils.c"
|
|
"libregexp.c"
|
|
"libunicode.c"
|
|
"cutils.h"
|
|
"libregexp.h"
|
|
"libunicode.h"
|
|
"quickjs.h"
|
|
"quickjs-atom.h"
|
|
"quickjs-opcode.h"
|
|
"libregexp-opcode.h"
|
|
"libunicode-table.h"
|
|
)
|
|
for item in ${quickjs_src[*]}
|
|
do
|
|
cp ../cxx/quickjs/$item ./cxx/$item
|
|
done |