mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 13:04:37 +03:00
use Qt5.15 for win7
This commit is contained in:
50
.github/workflows/build-qv2ray-cmake.yml
vendored
50
.github/workflows/build-qv2ray-cmake.yml
vendored
@@ -58,8 +58,16 @@ jobs:
|
|||||||
build-cpp:
|
build-cpp:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ windows-2022, ubuntu-20.04 ]
|
include:
|
||||||
arch: [ x64 ]
|
- platform: windows-2022
|
||||||
|
arch: x64
|
||||||
|
qt_version: "5.15"
|
||||||
|
- platform: windows-2022
|
||||||
|
arch: x64
|
||||||
|
qt_version: "6.5"
|
||||||
|
- platform: ubuntu-20.04
|
||||||
|
arch: x64
|
||||||
|
qt_version: "5.12"
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
@@ -78,15 +86,12 @@ jobs:
|
|||||||
toolset: 14.2
|
toolset: 14.2
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
# ========================================================================================================= Qt Install
|
# ========================================================================================================= Qt Install
|
||||||
- name: Windows - Download Custom Qt 5.15 SDK
|
- name: Windows - Download Custom Qt ${{ matrix.qt_version }} SDK
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.platform == 'windows-2022'
|
if: matrix.platform == 'windows-2022'
|
||||||
run: |
|
env:
|
||||||
mkdir qtsdk ; cd qtsdk
|
DL_QT_VER: ${{ matrix.qt_version }}
|
||||||
curl -LSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/Qt6.5.0-Windows-x86_64-VS2022-17.5.5-20230507.7z
|
run: bash ./libs/download_qtsdk_win.sh
|
||||||
7z x *.7z
|
|
||||||
rm *.7z
|
|
||||||
mv Qt* Qt
|
|
||||||
# ========================================================================================================= 编译与 Qt 无关的依赖
|
# ========================================================================================================= 编译与 Qt 无关的依赖
|
||||||
- name: Install ninja-build tool
|
- name: Install ninja-build tool
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v3
|
uses: seanmiddleditch/gha-setup-ninja@v3
|
||||||
@@ -95,12 +100,11 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: libs/deps
|
path: libs/deps
|
||||||
key: DepsCache-${{ matrix.platform }}-${{ matrix.arch }}-${{ hashFiles('libs/build_deps_*.sh') }}
|
key: DepsCache-${{ matrix.platform }}-${{ matrix.arch }}-${{ hashFiles('libs/build_deps_*.sh') }}-Qt${{ matrix.qt_version }}
|
||||||
- name: Build Dependencies
|
- name: Build Dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
if: steps.cache-deps.outputs.cache-hit != 'true' && matrix.platform != 'ubuntu-20.04'
|
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)
|
- name: Build Dependencies (Docker)
|
||||||
shell: bash
|
shell: bash
|
||||||
if: steps.cache-deps.outputs.cache-hit != 'true' && matrix.platform == 'ubuntu-20.04'
|
if: steps.cache-deps.outputs.cache-hit != 'true' && matrix.platform == 'ubuntu-20.04'
|
||||||
@@ -115,13 +119,18 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.platform == 'windows-2022'
|
if: matrix.platform == 'windows-2022'
|
||||||
env:
|
env:
|
||||||
|
DL_QT_VER: ${{ matrix.qt_version }}
|
||||||
CC: cl.exe
|
CC: cl.exe
|
||||||
CXX: cl.exe
|
CXX: cl.exe
|
||||||
run: |
|
run: |
|
||||||
source libs/env_qtsdk.sh $PWD/qtsdk/Qt
|
source libs/env_qtsdk.sh $PWD/qtsdk/Qt
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release ..
|
if [ "$DL_QT_VER" == "5.15" ]; then
|
||||||
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
else
|
||||||
|
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
fi
|
||||||
ninja
|
ninja
|
||||||
cd ..
|
cd ..
|
||||||
./libs/deploy_windows64.sh
|
./libs/deploy_windows64.sh
|
||||||
@@ -141,7 +150,7 @@ jobs:
|
|||||||
- name: Uploading Artifact
|
- name: Uploading Artifact
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: NekoRay-${{ github.sha }}-${{ matrix.platform }}-${{ matrix.arch }}
|
name: NekoRay-${{ github.sha }}-${{ matrix.platform }}-${{ matrix.arch }}-Qt${{ matrix.qt_version }}
|
||||||
path: artifacts.tgz
|
path: artifacts.tgz
|
||||||
publish:
|
publish:
|
||||||
name: Pack & Publish Release
|
name: Pack & Publish Release
|
||||||
@@ -167,6 +176,9 @@ jobs:
|
|||||||
cd deployment
|
cd deployment
|
||||||
cp -r public_res/* linux64
|
cp -r public_res/* linux64
|
||||||
cp -r public_res/* windows64
|
cp -r public_res/* windows64
|
||||||
|
cp -r public_res/* windows7-x64
|
||||||
|
cp windows64/neko*core.exe windows7-x64
|
||||||
|
cp windows64/updater.exe windows7-x64
|
||||||
rm -rf public_res *.pdb
|
rm -rf public_res *.pdb
|
||||||
####
|
####
|
||||||
mv linux64 nekoray
|
mv linux64 nekoray
|
||||||
@@ -176,6 +188,10 @@ 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 windows7-x64 nekoray
|
||||||
|
zip -r $version_standalone-windows7-x64.zip nekoray
|
||||||
|
rm -rf nekoray
|
||||||
- name: Pack Debian
|
- name: Pack Debian
|
||||||
if: github.event.inputs.publish != 'y'
|
if: github.event.inputs.publish != 'y'
|
||||||
run: |
|
run: |
|
||||||
@@ -183,8 +199,6 @@ jobs:
|
|||||||
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
||||||
cd deployment
|
cd deployment
|
||||||
cp -r public_res/* linux64
|
cp -r public_res/* linux64
|
||||||
cp -r public_res/* windows64
|
|
||||||
rm -rf public_res *.pdb
|
|
||||||
####
|
####
|
||||||
bash ../libs/package_debian.sh ${{ github.event.inputs.tag }}
|
bash ../libs/package_debian.sh ${{ github.event.inputs.tag }}
|
||||||
mv nekoray.deb $version_standalone-debian-x64.deb
|
mv nekoray.deb $version_standalone-debian-x64.deb
|
||||||
@@ -195,7 +209,6 @@ jobs:
|
|||||||
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
||||||
cd deployment
|
cd deployment
|
||||||
cp -r public_res/* linux64
|
cp -r public_res/* linux64
|
||||||
rm -rf public_res *.pdb
|
|
||||||
####
|
####
|
||||||
bash ../libs/package_appimage.sh
|
bash ../libs/package_appimage.sh
|
||||||
mv nekoray-x86_64.AppImage $version_standalone-linux-x64.AppImage
|
mv nekoray-x86_64.AppImage $version_standalone-linux-x64.AppImage
|
||||||
@@ -204,6 +217,9 @@ jobs:
|
|||||||
cd deployment
|
cd deployment
|
||||||
rm -rf linux64
|
rm -rf linux64
|
||||||
rm -rf windows64
|
rm -rf windows64
|
||||||
|
rm -rf windows7-x64
|
||||||
|
rm -rf public_res
|
||||||
|
rm -rf *.pdb
|
||||||
- name: Uploading Artifact
|
- name: Uploading Artifact
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ func (s *BaseServer) Update(ctx context.Context, in *gen.UpdateReq) (*gen.Update
|
|||||||
var search string
|
var search string
|
||||||
if runtime.GOOS == "windows" && runtime.GOARCH == "amd64" {
|
if runtime.GOOS == "windows" && runtime.GOARCH == "amd64" {
|
||||||
search = "windows64"
|
search = "windows64"
|
||||||
|
// check Qt5 update after nekoray v3.3
|
||||||
|
if _, err := os.Stat("../Qt5Core.dll"); err == nil {
|
||||||
|
search = "windows7-x64"
|
||||||
|
}
|
||||||
} else if runtime.GOOS == "linux" && runtime.GOARCH == "amd64" {
|
} else if runtime.GOOS == "linux" && runtime.GOARCH == "amd64" {
|
||||||
search = "linux64"
|
search = "linux64"
|
||||||
} else if runtime.GOOS == "darwin" {
|
} else if runtime.GOOS == "darwin" {
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
source libs/deploy_common.sh
|
source libs/deploy_common.sh
|
||||||
DEST=$DEPLOYMENT/windows64
|
if [ "$DL_QT_VER" == "5.15" ]; then
|
||||||
|
DEST=$DEPLOYMENT/windows7-x64
|
||||||
|
else
|
||||||
|
DEST=$DEPLOYMENT/windows64
|
||||||
|
fi
|
||||||
rm -rf $DEST
|
rm -rf $DEST
|
||||||
mkdir -p $DEST
|
mkdir -p $DEST
|
||||||
|
|
||||||
@@ -14,8 +18,12 @@ pushd $DEST
|
|||||||
windeployqt nekoray.exe --no-compiler-runtime --no-system-d3d-compiler --no-opengl-sw --verbose 2
|
windeployqt nekoray.exe --no-compiler-runtime --no-system-d3d-compiler --no-opengl-sw --verbose 2
|
||||||
rm -rf translations
|
rm -rf translations
|
||||||
rm -rf libEGL.dll libGLESv2.dll Qt6Pdf.dll
|
rm -rf libEGL.dll libGLESv2.dll Qt6Pdf.dll
|
||||||
curl -fLSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/libcrypto-3-x64.dll
|
|
||||||
curl -fLSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/libssl-3-x64.dll
|
if [ "$DL_QT_VER" != "5.15" ]; then
|
||||||
|
curl -fLSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/libcrypto-3-x64.dll
|
||||||
|
curl -fLSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/libssl-3-x64.dll
|
||||||
|
fi
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#### prepare deployment ####
|
#### prepare deployment ####
|
||||||
|
|||||||
10
libs/download_qtsdk_win.sh
Normal file
10
libs/download_qtsdk_win.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
mkdir qtsdk
|
||||||
|
cd qtsdk
|
||||||
|
if [ "$DL_QT_VER" == "5.15" ]; then
|
||||||
|
curl -LSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/Qt5.15.7-Windows-x86_64-VS2019-16.11.20-20221103.7z
|
||||||
|
else
|
||||||
|
curl -LSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/Qt6.5.0-Windows-x86_64-VS2022-17.5.5-20230507.7z
|
||||||
|
fi
|
||||||
|
7z x *.7z
|
||||||
|
rm *.7z
|
||||||
|
mv Qt* Qt
|
||||||
Reference in New Issue
Block a user