diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 10505267..5bffd8f0 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -3,6 +3,7 @@ name: Qv2ray Push Build on: push jobs: +# ======================================================================================== WINDOWS Windows: name: Push build for win64 runs-on: windows-2019 @@ -20,6 +21,14 @@ jobs: # -------------------------------------------------------- - name: Extracting gRPC and protobuf libs and headers run: tools\grpc_gen.bat +# -------------------------------------------------------- + - name: Download libqvb static library. + uses: Legion2/download-release-action@v2.1.0 + with: + repository: Qv2ray/QvRPCBridge + tag: 'latest' + path: libs + file: libqvb-win64.a # -------------------------------------------------------- - name: Building Qv2ray shell: cmd @@ -46,7 +55,7 @@ jobs: name: Qv2ray.Win64.zip path: build/Qv2ray.zip -# ========================================================================================= +# ========================================================================================= MACOS macOS: name: Push build for macOS @@ -64,6 +73,14 @@ jobs: # -------------------------------------------------------- - name: Extracting gRPC and protobuf libs and headers run: tools/deps_macOS.sh +# -------------------------------------------------------- + - name: Download libqvb static library. + uses: Legion2/download-release-action@v2.1.0 + with: + repository: Qv2ray/QvRPCBridge + tag: 'latest' + path: libs + file: libqvb-darwin.a # -------------------------------------------------------- - name: Building Qv2ray run: | @@ -83,7 +100,7 @@ jobs: with: name: Qv2ray.macOS.app.zip path: build/Qv2ray.app.tar.gz -# =================================================================================== +# =================================================================================== LINUX Linux: name: Push build for Linux @@ -108,6 +125,14 @@ jobs: # -------------------------------------------------------- - name: Extracting gRPC and protobuf libs and headers run: tools/grpc_gen.sh +# -------------------------------------------------------- + - name: Download libqvb static library. + uses: Legion2/download-release-action@v2.1.0 + with: + repository: Qv2ray/QvRPCBridge + tag: 'latest' + path: libs + file: libqvb-linux64.a # -------------------------------------------------------- - name: Generate Makefile run: | diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 4857ac8d..8255a1af 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -22,6 +22,14 @@ jobs: # -------------------------------------------------------- - name: Extracting gRPC and protobuf libs and headers run: tools\grpc_gen.bat +# -------------------------------------------------------- + - name: Download libqvb static library. + uses: Legion2/download-release-action@v2.1.0 + with: + repository: Qv2ray/QvRPCBridge + tag: 'latest' + path: libs + file: libqvb-win64.a # -------------------------------------------------------- - name: Building Qv2ray shell: cmd @@ -74,6 +82,14 @@ jobs: # -------------------------------------------------------- - name: Extracting gRPC and protobuf libs and headers run: tools/deps_macOS.sh +# -------------------------------------------------------- + - name: Download libqvb static library. + uses: Legion2/download-release-action@v2.1.0 + with: + repository: Qv2ray/QvRPCBridge + tag: 'latest' + path: libs + file: libqvb-darwin.a # -------------------------------------------------------- - name: Building Qv2ray run: | @@ -126,6 +142,14 @@ jobs: # -------------------------------------------------------- - name: Extracting gRPC and protobuf libs and headers run: tools/grpc_gen.sh +# -------------------------------------------------------- + - name: Download libqvb static library. + uses: Legion2/download-release-action@v2.1.0 + with: + repository: Qv2ray/QvRPCBridge + tag: 'latest' + path: libs + file: libqvb-linux64.a # -------------------------------------------------------- - name: Building Qv2ray run: | diff --git a/.gitignore b/.gitignore index eb2b653d..11f2ad9c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ SourceTrail/ libs/gen/ +libs/libqvb-* build/ diff --git a/.gitmodules b/.gitmodules index 40d7128c..3819e5b7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "libs/gRPC-win32"] path = libs/gRPC-win32 url = https://github.com/Qv2ray/gRPC-Windows-Packages +[submodule "libs/libqvb"] + path = libs/libqvb + url = https://github.com/Qv2ray/QvRPCBridge diff --git a/Build.Counter b/Build.Counter index c930dca8..b2fffd38 100644 --- a/Build.Counter +++ b/Build.Counter @@ -1 +1 @@ -3038 +3044 diff --git a/Qv2ray.pro b/Qv2ray.pro index a15e26b7..55ce38ac 100644 --- a/Qv2ray.pro +++ b/Qv2ray.pro @@ -84,7 +84,6 @@ INCLUDEPATH += \ libs/gen/ HEADERS += \ - libs/libqvb.h \ src/Qv2rayBase.hpp \ src/Qv2rayFeatures.hpp \ src/QvCoreConfigObjects.hpp \ @@ -235,13 +234,20 @@ win32 { message(" --> Linking against winHTTP and winSock2.") LIBS += -lwinhttp -lwininet -lws2_32 + message(" --> Linking libqvb static library.") + LIBS += -L$$PWD/libs/ -lqvb-win64 } macx { # For Linux and macOS message("Configuring for macOS specific environment") LIBS += -framework Carbon -framework Cocoa + + message(" --> Linking libgpr and libupb.") LIBS += -lgpr -lupb + + message(" --> Linking libqvb static library.") + LIBS += -L$$PWD/libs/ -lqvb-darwin } # Reuse unix for macx as well @@ -252,6 +258,9 @@ unix { message(" --> Linking against gRPC and protobuf library.") LIBS += -L/usr/local/lib -lgrpc++ -lprotobuf -lgrpc + message(" --> Linking libqvb static library.") + unix:!macx: LIBS += -L$$PWD/libs/ -lqvb-linux64 + # macOS homebrew include path message(" --> Adding local include folder to search path") INCLUDEPATH += /usr/local/include/ @@ -283,4 +292,6 @@ message(" ") message("Done configuring Qv2ray project. Build output will be at:" $$OUT_PWD) message("Type `make` or `mingw32-make` to start building Qv2ray") -unix|win32: LIBS += -L$$PWD/libs/ -lqvb + + + diff --git a/libs/libqvb b/libs/libqvb new file mode 160000 index 00000000..5589b7af --- /dev/null +++ b/libs/libqvb @@ -0,0 +1 @@ +Subproject commit 5589b7afe0b8ba56bb3e204f6c106bdd35dc07be diff --git a/src/components/QvKernelInteractions.cpp b/src/components/QvKernelInteractions.cpp index 6205b3d8..b47d9175 100644 --- a/src/components/QvKernelInteractions.cpp +++ b/src/components/QvKernelInteractions.cpp @@ -5,7 +5,7 @@ #include "QvCoreConfigOperations.hpp" #include "QvCore/QvCommandLineArgs.hpp" -#include "libs/libqvb.h" +#include "libs/libqvb/build/libqvb.h" using namespace v2ray::core::app::stats::command; using grpc::Channel;