From f99b83390294f1ed502b2861a7599a1b0395923b Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Mon, 24 Jun 2024 12:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=BC=8F=E6=89=93=E5=8C=85?= =?UTF-8?q?=E7=9A=84lib=E6=96=87=E4=BB=B6=E5=A4=B9=20=E6=B7=BB=E5=8A=A0deb?= =?UTF-8?q?ug=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 2 +- assets/fmod20221/init.lua | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5bbfee76..b972ca81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,7 +67,7 @@ jobs: - name: Build core love package uses: 26F-Studio/love-actions-core@v1 with: - build-list: ./assets/ ./Zenitha/ ./conf.lua ./main.lua ./version.lua + build-list: ./assets/ ./Zenitha/ ./libAndroid/ ./conf.lua ./main.lua ./version.lua package-path: ${{ env.CORE_LOVE_PACKAGE_PATH }} - name: Upload core love package uses: actions/upload-artifact@v3 diff --git a/assets/fmod20221/init.lua b/assets/fmod20221/init.lua index f55c391f..06723681 100644 --- a/assets/fmod20221/init.lua +++ b/assets/fmod20221/init.lua @@ -22,8 +22,12 @@ if SYSTEM=='Android' then end love.filesystem.write('lib/libfmod.so',love.filesystem.read('data','libAndroid/fmod/'..platform..'/libfmod.so')) love.filesystem.write('lib/libfmodstudio.so',love.filesystem.read('data','libAndroid/fmod/'..platform..'/libfmodstudio.so')) - M.C=ffi.load(love.filesystem.getSaveDirectory()..'/lib/libfmod.so') - M.C2=ffi.load(love.filesystem.getSaveDirectory()..'/lib/libfmodstudio.so') + local suc + suc,M.C=pcall(ffi.load,love.filesystem.getSaveDirectory()..'/lib/libfmod.so') + suc,M.C2=pcall(ffi.load,love.filesystem.getSaveDirectory()..'/lib/libfmodstudio.so') + if not suc then + MSG.new('error',tostring(M.C) or "?") + end else -- search for fmod shared libraries in package.cpath local fmodPath=package.searchpath('fmod',package.cpath)