From 602c6ed43a9ad2d5e8676abf86d48c0684d026c3 Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Sun, 24 Mar 2024 17:36:44 +0800 Subject: [PATCH] add: unix/linux lib support; upload libs --- .github/workflows/autobuild.yml | 8 +++++++- src/lib/libncmdump.cpp | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 1035e18..1c34314 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -53,11 +53,17 @@ jobs: - name: Build run: cmake --build ${{ env.BUILD_PATH }} -j 4 --config ${{ env.BUILD_TYPE }} - - name: Upload artifact + - name: Upload artifact executable uses: actions/upload-artifact@v4 with: name: Windows amd64 Build - MSVC path: ${{ env.BUILD_PATH }}/${{ env.BUILD_TYPE }}/ncmdump.exe + + - name: Upload artifact DLL + uses: actions/upload-artifact@v4 + with: + name: Windows amd64 Build - MSVC DLL + path: ${{ env.BUILD_PATH }}/${{ env.BUILD_TYPE }}/libncmdump.dll build_on_linux: runs-on: ubuntu-latest diff --git a/src/lib/libncmdump.cpp b/src/lib/libncmdump.cpp index 496cb8f..efd5441 100644 --- a/src/lib/libncmdump.cpp +++ b/src/lib/libncmdump.cpp @@ -1,6 +1,10 @@ #include "ncmcrypt.h" +#ifdef _WIN32 #define API __declspec(dllexport) +#else +#define API +#endif extern "C" { API NeteaseCrypt* CreateNeteaseCrypt(const char* path) {