Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Oct 30, 2024
1 parent 62f614b commit 4c0b57d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/web-interface-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,11 @@ jobs:
- name: Apply emscripten patches
run: |
echo "Save bind.cpp ..."
echo "--------------------------------- Save bind.cpp ---------------------------------"
cp $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp.bak
echo "Apply embind bind.cpp patches ..."
echo "--------------------------------- Apply embind bind.cpp patches ---------------------------------"
cp -f ./engine-HEAD/.github/workflows/emscripten-patches/embind/bind.cpp $EMSDK/upstream/emscripten/system/lib/embind/
echo "Apply patches DONE!"
cat $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
echo "Restore patches ..."
rm $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
mv $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp.bak $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
echo "Restore patches DONE!"
echo "--------------------------------- Apply patches DONE! ---------------------------------"
cat $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
- name: Install ninja
Expand Down Expand Up @@ -148,6 +143,14 @@ jobs:
npm install
node ./.github/workflows/package-size-check.js
- name: Restore patches
run: |
echo "-------------------------- Restore patches ---------------------------------"
rm $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
mv $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp.bak $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
echo "-------------------------- Restore patches DONE! ---------------------------------"
cat $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
- uses: LouisBrunner/[email protected]
with:
old: ./engine/bin/.declarations/cc.d.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mkdir build
cd build
cp ../CMakeLists.header.txt ./CMakeLists.txt
emcmake cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja \
-DCMAKE_CXX_FLAGS="-I${EMSDK}/upstream/emscripten/system/include -I${EMSDK}/upstream/include/c++/v1"
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -I${EMSDK}/upstream/emscripten/system/include -I${EMSDK}/upstream/include/c++/v1"

cp ./compile_commands.json ../..
cd ..
Expand Down
2 changes: 1 addition & 1 deletion native/cocos/editor-support/spine/Json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ THE SOFTWARE.
#endif

#ifdef __EMSCRIPTEN__
bool parseHex(const char *str, unsigned int *result_) {
static bool parseHex(const char *str, unsigned int *result_) {
auto &result = *result_;
result = 0;
for (int i = 0; i < 4; ++i) {
Expand Down

0 comments on commit 4c0b57d

Please sign in to comment.