mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
update build
This commit is contained in:
62
.github/workflows/build-qv2ray-cmake.yml
vendored
62
.github/workflows/build-qv2ray-cmake.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
build-go:
|
build-go:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
cross_os: [ windows, linux, darwin ]
|
cross_os: [ windows, linux ]
|
||||||
cross_arch: [ amd64 ]
|
cross_arch: [ amd64 ]
|
||||||
include:
|
include:
|
||||||
- cross_os: public_res
|
- cross_os: public_res
|
||||||
@@ -58,15 +58,13 @@ jobs:
|
|||||||
build-cpp:
|
build-cpp:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ windows-2022, ubuntu-20.04, macos-10.15 ]
|
platform: [ windows-2022, ubuntu-20.04 ]
|
||||||
arch: [ x64 ]
|
arch: [ x64 ]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
needs:
|
|
||||||
- build-go
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checking out sources
|
- name: Checking out sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -79,22 +77,7 @@ jobs:
|
|||||||
# 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo
|
# 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo
|
||||||
toolset: 14.2
|
toolset: 14.2
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
- name: Download Artifacts for macOS
|
|
||||||
if: matrix.platform == 'macos-10.15'
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
path: download-artifact
|
|
||||||
# ========================================================================================================= Qt Install
|
# ========================================================================================================= Qt Install
|
||||||
- name: macOS - Install Qt 5.15
|
|
||||||
if: matrix.platform == 'macos-10.15'
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: 5.15.2
|
|
||||||
py7zrversion: ' '
|
|
||||||
aqtversion: ' '
|
|
||||||
setup-python: false
|
|
||||||
cache: true
|
|
||||||
cache-key-prefix: QtCache-${{ matrix.platform }}-${{ matrix.arch }}
|
|
||||||
- name: Windows - Download Custom Qt 5.15 SDK
|
- name: Windows - Download Custom Qt 5.15 SDK
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.platform == 'windows-2022'
|
if: matrix.platform == 'windows-2022'
|
||||||
@@ -104,12 +87,6 @@ jobs:
|
|||||||
7z x *.7z
|
7z x *.7z
|
||||||
rm *.7z
|
rm *.7z
|
||||||
mv Qt* Qt
|
mv Qt* Qt
|
||||||
- name: Linux - Install Qt 5.12 via apt
|
|
||||||
shell: bash
|
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y zlib1g-dev fcitx-frontend-qt5 qtbase5-dev qttools5-dev libqt5svg5-dev libqt5x11extras5-dev
|
|
||||||
# ========================================================================================================= 编译与 Qt 无关的依赖
|
# ========================================================================================================= 编译与 Qt 无关的依赖
|
||||||
- name: Install ninja-build tool
|
- name: Install ninja-build tool
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v3
|
uses: seanmiddleditch/gha-setup-ninja@v3
|
||||||
@@ -121,9 +98,18 @@ jobs:
|
|||||||
key: DepsCache-${{ matrix.platform }}-${{ matrix.arch }}-${{ hashFiles('libs/build_deps_*.sh') }}
|
key: DepsCache-${{ matrix.platform }}-${{ matrix.arch }}-${{ hashFiles('libs/build_deps_*.sh') }}
|
||||||
- name: Build Dependencies
|
- name: Build Dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
if: steps.cache-deps.outputs.cache-hit != 'true' && matrix.platform != 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
./libs/build_deps_all.sh
|
./libs/build_deps_all.sh
|
||||||
|
- name: Build Dependencies (Docker)
|
||||||
|
shell: bash
|
||||||
|
if: steps.cache-deps.outputs.cache-hit != 'true' && matrix.platform == 'ubuntu-20.04'
|
||||||
|
run: |
|
||||||
|
docker run --rm \
|
||||||
|
-v $PWD:/nekoray \
|
||||||
|
-w /nekoray \
|
||||||
|
ghcr.io/matsuridayo/debian10-qt5:20230131 \
|
||||||
|
bash -c "./libs/build_deps_all.sh"
|
||||||
# ========================================================================================================= Generate MakeFile and Build
|
# ========================================================================================================= Generate MakeFile and Build
|
||||||
- name: Windows - Generate MakeFile and Build
|
- name: Windows - Generate MakeFile and Build
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -143,22 +129,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
if: matrix.platform == 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
docker run --rm \
|
||||||
cd build
|
-v $PWD:/nekoray \
|
||||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
|
-w /nekoray \
|
||||||
ninja
|
ghcr.io/matsuridayo/debian10-qt5:20230131 \
|
||||||
cd ..
|
bash -c "mkdir build && pushd build && cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. && ninja && popd &&./libs/deploy_linux64.sh"
|
||||||
./libs/deploy_linux64.sh
|
|
||||||
- name: macOS - Generate MakeFile and Build
|
|
||||||
shell: bash
|
|
||||||
if: matrix.platform == 'macos-10.15'
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 ..
|
|
||||||
ninja
|
|
||||||
cd ..
|
|
||||||
./libs/deploy_macos.sh
|
|
||||||
# ========================================================================================================= Deployments
|
# ========================================================================================================= Deployments
|
||||||
- name: Tar files
|
- name: Tar files
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -200,9 +175,6 @@ jobs:
|
|||||||
mv windows64 nekoray
|
mv windows64 nekoray
|
||||||
zip -r $version_standalone-windows64.zip nekoray
|
zip -r $version_standalone-windows64.zip nekoray
|
||||||
rm -rf nekoray
|
rm -rf nekoray
|
||||||
####
|
|
||||||
mv macos-amd64/nekoray.dmg $version_standalone-macos-amd64.dmg
|
|
||||||
rm -rf macos-amd64
|
|
||||||
- name: Uploading Artifact
|
- name: Uploading Artifact
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -66,6 +66,12 @@ https://matsuridayo.github.io
|
|||||||
|
|
||||||
[Linux 运行教程](docs/Run_Linux.md)
|
[Linux 运行教程](docs/Run_Linux.md)
|
||||||
|
|
||||||
|
## macOS
|
||||||
|
|
||||||
|
由于缺乏维护,不再提供 macOS 版本下载。最后包含 dmg 的版本是 2.12。
|
||||||
|
|
||||||
|
仍可以参照下方教程自行编译,常见问题请参考历史 Issue,欢迎 Pull Request 修复。
|
||||||
|
|
||||||
## 编译教程 / Compile Tutorial
|
## 编译教程 / Compile Tutorial
|
||||||
|
|
||||||
[Linux](docs/Build_Linux.md)
|
[Linux](docs/Build_Linux.md)
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ cp $USR_LIB/libQt5Svg.so.5 .
|
|||||||
cp $USR_LIB/libQt5Widgets.so.5 .
|
cp $USR_LIB/libQt5Widgets.so.5 .
|
||||||
cp $USR_LIB/libQt5X11Extras.so.5 .
|
cp $USR_LIB/libQt5X11Extras.so.5 .
|
||||||
cp $USR_LIB/libQt5XcbQpa.so.5 .
|
cp $USR_LIB/libQt5XcbQpa.so.5 .
|
||||||
cp $USR_LIB/libxcb-util.so.1 .
|
cp $USR_LIB/libdouble-conversion.so.? .
|
||||||
|
cp $USR_LIB/libxcb-util.so.? .
|
||||||
cp $USR_LIB/libicuuc.so.?? .
|
cp $USR_LIB/libicuuc.so.?? .
|
||||||
cp $USR_LIB/libicui18n.so.?? .
|
cp $USR_LIB/libicui18n.so.?? .
|
||||||
cp $USR_LIB/libicudata.so.?? .
|
cp $USR_LIB/libicudata.so.?? .
|
||||||
|
|||||||
@@ -41,12 +41,13 @@ void MainWindow::setup_grpc() {
|
|||||||
inline bool speedtesting = false;
|
inline bool speedtesting = false;
|
||||||
|
|
||||||
void MainWindow::speedtest_current_group(int mode) {
|
void MainWindow::speedtest_current_group(int mode) {
|
||||||
if (speedtesting) return;
|
|
||||||
auto profiles = get_selected_or_group();
|
auto profiles = get_selected_or_group();
|
||||||
if (profiles.isEmpty()) return;
|
if (profiles.isEmpty()) return;
|
||||||
auto group = NekoRay::profileManager->CurrentGroup();
|
auto group = NekoRay::profileManager->CurrentGroup();
|
||||||
if (group->archive) return;
|
if (group->archive) return;
|
||||||
|
|
||||||
|
#ifndef NKR_NO_GRPC
|
||||||
|
if (speedtesting) return;
|
||||||
QStringList full_test_flags;
|
QStringList full_test_flags;
|
||||||
if (mode == libcore::FullTest) {
|
if (mode == libcore::FullTest) {
|
||||||
bool ok;
|
bool ok;
|
||||||
@@ -60,9 +61,8 @@ void MainWindow::speedtest_current_group(int mode) {
|
|||||||
full_test_flags = s.trimmed().split(",");
|
full_test_flags = s.trimmed().split(",");
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
speedtesting = true;
|
speedtesting = true;
|
||||||
#ifndef NKR_NO_GRPC
|
|
||||||
runOnNewThread([this, profiles, mode, full_test_flags]() {
|
runOnNewThread([this, profiles, mode, full_test_flags]() {
|
||||||
QMutex lock_write;
|
QMutex lock_write;
|
||||||
QMutex lock_return;
|
QMutex lock_return;
|
||||||
|
|||||||
Reference in New Issue
Block a user