From 3cdd228d36307825a74b7fc6cf996c2e2dbf04c4 Mon Sep 17 00:00:00 2001 From: ffdfgdfg Date: Sat, 7 Mar 2020 23:17:38 +0800 Subject: [PATCH] add npc linux sdk --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 6a915df..c727fa6 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,10 @@ #/bash/sh export VERSION=0.26.5 -sudo apt-get install gcc-mingw-w64-i686 +sudo apt-get install gcc-mingw-w64-i686 gcc-multilib env GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc go build -ldflags "-s -w -extldflags -static -extldflags -static" -buildmode=c-shared -o npc_sdk.dll cmd/npc/sdk.go -tar -czvf npc_sdk.tar.gz npc_sdk.dll npc_sdk.h +env GOOS=linux GOARCH=386 CGO_ENABLED=1 CC=gcc go build -ldflags "-s -w -extldflags -static -extldflags -static" -buildmode=c-shared -o npc_sdk.so cmd/npc/sdk.go +tar -czvf npc_sdk.tar.gz npc_sdk.dll npc_sdk.so npc_sdk.h wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz tar -xvf upx-3.95-amd64_linux.tar.xz