Skip to content

Commit

Permalink
Merge pull request Qv2ray#971 from Qv2ray/dev
Browse files Browse the repository at this point in the history
Qv2ray v2.7.0-alpha1
  • Loading branch information
QxQ authored Sep 22, 2020
2 parents 912fe1b + 825437c commit 661fa72
Show file tree
Hide file tree
Showing 465 changed files with 16,096 additions and 17,994 deletions.
6 changes: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AlignAfterOpenBracket: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
Expand All @@ -21,7 +21,7 @@ BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: false
BreakInheritanceList: BeforeComma
BreakStringLiterals: false
ColumnLimit: 145
ColumnLimit: 150
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
Cpp11BracedListStyle: false
Expand All @@ -42,7 +42,7 @@ SpaceAfterTemplateKeyword: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpacesInParentheses: false
Standard: Cpp11
Standard: c++17
StatementMacros: [ Q_UNUSED LOG DEBUG ]
TabWidth: 4
UseTab: Never
Expand Down
38 changes: 24 additions & 14 deletions .github/workflows/build-qv2ray-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
matrix:
qt_version: [5.15.0]
platform: [ubuntu-16.04, macos-latest, windows-latest]
build_type: [RelWithDebInfo, Release]
arch: [x86, x64]
include:
- platform: windows-latest
Expand Down Expand Up @@ -88,30 +89,37 @@ jobs:
sudo add-apt-repository ppa:carsten-uppenbrink-net/openssl
sudo apt update
sudo apt install -y libgl-dev libx11-dev libxkbcommon-x11-dev libxcb-image0-dev libxcb-icccm4-dev libssl-dev libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0
sudo apt install -y libprotobuf-dev protobuf-compiler protobuf-c-compiler libgrpc++-dev protobuf-compiler-grpc ninja-build fcitx-frontend-qt5
sudo apt install -y libprotobuf-dev protobuf-compiler protobuf-c-compiler libgrpc++-dev protobuf-compiler-grpc ninja-build fcitx-frontend-qt5 libcurl4-openssl-dev
# --------------------------------------------------------
- name: macOS - ${{ matrix.qt_version }} - Build preparation - Install Packages
if: matrix.platform == 'macos-latest'
run: |
brew install protobuf grpc ninja pkg-config
brew install protobuf grpc ninja pkg-config openssl
# --------------------------------------------------------
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Setup Ninja
if: matrix.platform == 'windows-latest'
uses: ashutoshvarma/setup-ninja@master
with:
# ninja version to download. Default: 1.10.0
version: 1.10.0
version: 1.10.0
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Build preparation - Download Dependencies
shell: bash
if: matrix.platform == 'windows-latest'
run: |
curl -o ./libs/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z -L https://github.com/Qv2ray/Qv2ray-deps/releases/download/release/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z
curl -o ./libs/Qv2ray-deps-curl-${{ matrix.arch }}-windows.7z -L https://github.com/Qv2ray/Qv2ray-deps/releases/download/release/Qv2ray-deps-curl-${{ matrix.arch }}-windows.7z
- name: Win-${{ matrix.arch }} - Build preparation - Extract Dependencies
if: matrix.platform == 'windows-latest'
uses: DuckSoft/[email protected]
with:
pathSource: ./libs/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z
pathTarget: ./libs
- name: Win-${{ matrix.arch }} - Build preparation - Extract Dependencies
if: matrix.platform == 'windows-latest'
uses: DuckSoft/[email protected]
with:
pathSource: ./libs/Qv2ray-deps-curl-${{ matrix.arch }}-windows.7z
pathTarget: ./libs
# ========================================================================================================= Generate MakeFile and Build

- uses: actions/setup-node@v1
Expand All @@ -123,10 +131,12 @@ jobs:
- name: macOS - ${{ matrix.qt_version }} - Generate Dependencies and Build
shell: bash
if: matrix.platform == 'macos-latest'
env:
PKG_CONFIG_PATH: /usr/local/opt/[email protected]/lib/pkgconfig
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DDS_STORE_SCRIPT=ON
cmake .. -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DDS_STORE_SCRIPT=ON
cmake --build . --parallel $(sysctl -n hw.logicalcpu)
sudo cmake --install .
appdmg ../assets/package_dmg.json ../Qv2ray.dmg
Expand All @@ -140,7 +150,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=./deployment -DCMAKE_BUILD_TYPE=Release
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=./deployment -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build . --parallel $(nproc)
cmake --install .
# --------------------------------------------------------
Expand All @@ -153,7 +163,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=./AppDir/usr -DCMAKE_BUILD_TYPE=Release -DQV2RAY_TRANSLATION_PATH=QApplication::applicationDirPath\(\)+"/../share/qv2ray/lang"
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=./AppDir/usr -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DQV2RAY_TRANSLATION_PATH=QApplication::applicationDirPath\(\)+"/../share/qv2ray/lang"
cmake --build . --parallel $(nproc)
cmake --install .
# ========================================================================================================= Deployments
Expand All @@ -179,15 +189,15 @@ jobs:
cd ..
squashfs-root/AppRun AppDir/usr/share/applications/qv2ray.desktop -appimage -no-strip -always-overwrite
mv ./Qv2ray*.AppImage ./Qv2ray.AppImage
- name: Linux - ${{ matrix.qt_version }} - Uploading artifact
- name: Linux - ${{ matrix.qt_version }} - Uploading Artifact
if: matrix.platform == 'ubuntu-16.04'
uses: actions/upload-artifact@master
with:
name: Qv2ray-${{ github.sha }}.linux-${{ matrix.arch }}.qt${{ matrix.qt_version }}.AppImage
name: Qv2ray-${{ github.sha }}.linux-${{ matrix.arch }}.qt${{ matrix.qt_version }}-${{ matrix.build_type }}.AppImage
path: build/Qv2ray.AppImage
- name: Linux - ${{ matrix.qt_version }} - Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: github.event_name == 'release' && matrix.platform == 'ubuntu-16.04' && matrix.qt_version == '5.15.0'
if: github.event_name == 'release' && matrix.platform == 'ubuntu-16.04' && matrix.qt_version == '5.15.0' && matrix.build_type == 'Release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/Qv2ray.AppImage
Expand All @@ -199,11 +209,11 @@ jobs:
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@master
with:
name: Qv2ray-${{ github.sha }}.macOS-${{ matrix.arch }}.qt${{ matrix.qt_version }}.dmg
name: Qv2ray-${{ github.sha }}.macOS-${{ matrix.arch }}.qt${{ matrix.qt_version }}-${{ matrix.build_type }}.dmg
path: Qv2ray.dmg
- name: macOS - ${{ matrix.qt_version }} - Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: github.event_name == 'release' && matrix.platform == 'macos-latest' && matrix.qt_version == '5.15.0'
if: github.event_name == 'release' && matrix.platform == 'macos-latest' && matrix.qt_version == '5.15.0' && matrix.build_type == 'Release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Qv2ray.dmg
Expand All @@ -217,15 +227,15 @@ jobs:
with:
pathSource: ./build/deployment/
pathTarget: ./release.7z
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Uploading artifact
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Uploading Artifact
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@master
with:
name: Qv2ray-${{ github.sha }}.Windows-${{ matrix.arch }}.qt${{ matrix.qt_version }}.7z
name: Qv2ray-${{ github.sha }}.Windows-${{ matrix.arch }}.qt${{ matrix.qt_version }}-${{ matrix.build_type }}.7z
path: release.7z
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: github.event_name == 'release' && matrix.platform == 'windows-latest' && matrix.qt_version == '5.15.0'
if: github.event_name == 'release' && matrix.platform == 'windows-latest' && matrix.qt_version == '5.15.0' && matrix.build_type == 'Release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release.7z
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
- name: Checking out sources
uses: actions/checkout@v2
with:
submodules: 'recursive'
submodules: "recursive"
- name: Install build dependencies
run: |
apt-get install -y build-essential devscripts reprepro debhelper ninja-build libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc qtbase5-dev qttools5-dev cmake pkg-config qtdeclarative5-dev
apt-get install -y build-essential devscripts reprepro debhelper ninja-build libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc qtbase5-dev qttools5-dev cmake pkg-config qtdeclarative5-dev libcurl4-openssl-dev libqt5svg5-dev
- name: Build
run: |
dch -l${{ matrix.distro }} -m 'Build against ${{ matrix.distro }}' -D ${{ matrix.distro }}
Expand Down Expand Up @@ -84,4 +84,3 @@ jobs:
asset_name: ${{ steps.get_package.outputs.NAME }}
tag: ${{ github.ref }}
overwrite: true

11 changes: 9 additions & 2 deletions .github/workflows/nsis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,18 @@ jobs:
shell: bash
run: |
curl -o ./libs/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z -L https://github.com/Qv2ray/Qv2ray-deps/releases/download/release/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z
curl -o ./libs/Qv2ray-deps-curl-${{ matrix.arch }}-windows.7z -L https://github.com/Qv2ray/Qv2ray-deps/releases/download/release/Qv2ray-deps-curl-${{ matrix.arch }}-windows.7z
- name: Win-${{ matrix.arch }} - Build preparation - Extract Dependencies
uses: DuckSoft/[email protected]
with:
pathSource: ./libs/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z
pathTarget: ./libs
pathSource: ./libs/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z
pathTarget: ./libs
- name: Win-${{ matrix.arch }} - Build preparation - Extract Dependencies
if: matrix.platform == 'windows-latest'
uses: DuckSoft/[email protected]
with:
pathSource: ./libs/Qv2ray-deps-curl-${{ matrix.arch }}-windows.7z
pathTarget: ./libs
# ========================================================================================================= Generate MakeFile and Build
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Generate Dependencies and Build
shell: bash
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/pacman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
if: ${{ !contains( needs.check_commit_msg.outputs.commit_message, 'NO_PACMAN') }}
name: Arch Linux
runs-on: ubuntu-latest
container: archlinux:latest
container: archlinux/base:latest

steps:
- name: Setup Basic Environment
run: |
Expand All @@ -34,8 +34,8 @@ jobs:
- name: Checking out sources
uses: actions/checkout@v2
with:
path: 'Qv2ray'
path: "Qv2ray"

- name: Build
run: |
cat <<PKGBUILD > PKGBUILD
Expand All @@ -46,10 +46,10 @@ jobs:
arch=('x86_64')
url='https://github.com/Qv2ray/Qv2ray'
license=('GPL3')
depends=('hicolor-icon-theme' 'qt5-base>5.11.0' 'grpc>=1.27.0' 'zxing-cpp')
depends=('hicolor-icon-theme' 'qt5-base>5.11.0' 'grpc>=1.27.0' 'zxing-cpp' 'qt5-svg')
optdepends=('v2ray: use system v2ray core.')
makedepends=('git' 'make' 'qt5-tools' 'which' 'gcc' 'qt5-declarative'
'grpc-cli>=1.27.0' 'cmake' 'ninja')
'grpc-cli>=1.27.0' 'cmake' 'ninja' 'qt5-svg')
provides=('qv2ray')
conflicts=('qv2ray')
Expand Down Expand Up @@ -96,8 +96,7 @@ jobs:
- name: Get package name
id: get_package
run:
echo ::set-output name=NAME::$(basename qv2ray*.xz)
run: echo ::set-output name=NAME::$(basename qv2ray*.xz)

- name: Upload artifact
uses: actions/upload-artifact@v2-preview
Expand Down
16 changes: 13 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,27 @@ compile_commands.json
.vs/
*.qm
./.vscode

assets/package_dmg.json
CMakeSettings.json
/makespec/qv2ray.spec

SourceTrail/

libs/gen/
libs/x64-windows/
libs/x86-windows/
libs/gen
libs/deps
libs/x64-windows
libs/x86-windows
libs/x86-android
libs/x64-android
libs/arm-android
libs/arm64-android
libs/tools
libs/libqvb-*

assets/android/AndroidManifest*
build**/
out/

# IntelliJ-based IDE Trash
/.idea/
Expand Down
14 changes: 10 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,27 @@
[submodule "3rdparty/QNodeEditor"]
path = 3rdparty/QNodeEditor
url = https://github.com/Qv2ray/QNodeEditor
[submodule "libs/puresource"]
path = libs/puresource
[submodule "3rdparty/puresource"]
path = 3rdparty/puresource
url = https://github.com/Qv2ray/PureSource
[submodule "3rdparty/zxing-cpp"]
path = 3rdparty/zxing-cpp
url = https://github.com/nu-book/zxing-cpp
[submodule "src/plugin-interface"]
path = src/plugin-interface
url = https://github.com/Qv2ray/QvPlugin-Interface
[submodule "libs/QJsonStruct"]
path = libs/QJsonStruct
[submodule "3rdparty/QJsonStruct"]
path = 3rdparty/QJsonStruct
url = https://github.com/Qv2ray/QJsonStruct
[submodule "3rdparty/libuv"]
path = 3rdparty/libuv
url = https://github.com/libuv/libuv.git
[submodule "3rdparty/uvw"]
path = 3rdparty/uvw
url = https://github.com/skypjack/uvw.git
[submodule "3rdparty/backward-cpp"]
path = 3rdparty/backward-cpp
url = https://github.com/Qv2ray/backward-cpp
[submodule "cmake/android"]
path = cmake/android
url = https://github.com/LaurentGomila/qt-android-cmake
1 change: 1 addition & 0 deletions 3rdparty/QJsonStruct
Submodule QJsonStruct added at fb646d
1 change: 1 addition & 0 deletions 3rdparty/backward-cpp
Submodule backward-cpp added at 42c350
1 change: 1 addition & 0 deletions 3rdparty/puresource
Submodule puresource added at a4872c
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
4 changes: 4 additions & 0 deletions 3rdparty/uistyles/uistyles.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(UISTYLE_QRCS
${CMAKE_SOURCE_DIR}/3rdparty/uistyles/flatwhite/flatwhite.qrc
${CMAKE_SOURCE_DIR}/3rdparty/uistyles/psblack/psblack.qrc
)
2 changes: 1 addition & 1 deletion 3rdparty/zxing-cpp
Loading

0 comments on commit 661fa72

Please sign in to comment.