Browse Source

add npc sdk dll

unknown 5 năm trước cách đây
mục cha
commit
50180e5b7f
2 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 1 0
      .travis.yml
  2. 5 0
      build.sh

+ 1 - 0
.travis.yml

@@ -51,6 +51,7 @@ deploy:
   - win_amd64_client.tar.gz
   - win_amd64_server.tar.gz
   - npc_$VERSION.spk
+  - npc_sdk.tar.gz
   on:
     tags: true
     all_branches: true

+ 5 - 0
build.sh

@@ -173,3 +173,8 @@ docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f
 docker buildx create --use --name mybuilder
 docker buildx build --tag ffdfgdfg/nps:$VERSION --output type=image,push=true --file Dockerfile.nps --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
 docker buildx build --tag ffdfgdfg/npc:$VERSION --output type=image,push=true --file Dockerfile.npc --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
+
+
+apt-get install gcc-mingw-w64-i686
+env GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc go build -buildmode=c-shared -o npc_sdk.dll cmd/npc/sdk.go
+tar -czvf npc_sdk.tar.gz -xvf npc_sdk.dll npc_sdk.h