add: unix/linux lib support; upload libs

This commit is contained in:
TaurusXin 2024-03-24 17:36:44 +08:00
parent d8a0944810
commit 602c6ed43a
Signed by: taurusxin
GPG Key ID: C334DCA04AC2D2CC
2 changed files with 11 additions and 1 deletions

View File

@ -53,12 +53,18 @@ 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

View File

@ -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) {