Skip to content

Commit f1e87dd

Browse files
committed
Add libssh2 dependency and update paths in build
scripts Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
1 parent e1da981 commit f1e87dd

File tree

4 files changed

+65
-2
lines changed

4 files changed

+65
-2
lines changed

.github/workflows/test.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [ dev-ssh2 ]
6+
paths-ignore:
7+
- 'doc/**'
8+
- 'docs/**'
9+
- 'README.md'
10+
- 'README_zh_CN.md'
11+
- 'DEVELOPNOTE.md'
12+
- 'CHANGELOG.md'
13+
- '.readthedocs.yaml'
14+
pull_request:
15+
branches: [ main ]
16+
paths-ignore:
17+
- 'doc/**'
18+
- 'docs/**'
19+
- 'README.md'
20+
- 'README_zh_CN.md'
21+
- 'DEVELOPNOTE.md'
22+
- 'CHANGELOG.md'
23+
- '.readthedocs.yaml'
24+
workflow_dispatch:
25+
26+
jobs:
27+
windows_msvc2019:
28+
runs-on: windows-2022
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Install prerequisites
34+
run: |
35+
Choco-Install -PackageName innosetup --force
36+
Choco-Install -PackageName cmake --force
37+
38+
- name: Setup MSVC
39+
uses: ilammy/msvc-dev-cmd@v1
40+
with:
41+
arch: x64
42+
toolset: 14.29
43+
44+
- name: Build libssh2
45+
run: |
46+
cd depend
47+
./build_libssh2_msvc.bat
48+
mkdir D:\\libssh2
49+
mkdir D:\\libssh2\\include
50+
mkdir D:\\libssh2\\lib
51+
mkdir D:\\libssh2\\bin
52+
cp -r ./output/include/* D:\\libssh2\\include/
53+
cp -r ./output/lib/* D:\\libssh2\\lib/
54+
cp -r ./output/bin/* D:\\libssh2\\bin/
55+
56+
- name: Upload build asserts
57+
uses: actions/upload-artifact@v3.1.3
58+
with:
59+
name: libssh2
60+
path: |
61+
D:\\libssh2
62+

.github/workflows/windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ jobs:
153153
./tools/sed/sed.exe -i "s/QT_DIR=C:\/Qt\/Qt6.2.0\/6.2.0\/msvc64\/bin/QT_DIR=%Qt6_DIR%/g" ./build_setup_msvc.bat
154154
./tools/sed/sed.exe -i "s/QT_TOOLS_DIR=C:\/Qt\/Qt6.2.0\/Tools\/msvc64\/bin/QT_TOOLS_DIR=C:\/ProgramData\/Chocolatey\/lib\/mingw\/tools\/install\/msvc64\/bin/g" ./build_setup_msvc.bat
155155
./tools/sed/sed.exe -i "s/WINPTY_DIR=D:\\quardCRT\\depend\\winpty/WINPTY_DIR=D:\\winpty/g" ./lib/ptyqt/ptyqt.pri
156+
./tools/sed/sed.exe -i "s/LIBSSH2_DIR=\/libssh2/LIBSSH2_DIR=D:\\libssh2/g" ./lib/qtssh/qtssh.pri
156157
./build_setup_msvc.bat
157158
cp ./InnoSetup/quardCRT_setup.exe ./InnoSetup/quardCRT_setup_msvc.exe
158159

build_setup_msvc.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ del /f /q /a .\sed*
3838
xcopy /y .\build_release\out\quardCRT.exe .\InnoSetup\build\
3939
:: 使用windeployqt拷贝依赖dll库到打包目录
4040
windeployqt --dir .\InnoSetup\build .\InnoSetup\build\quardCRT.exe
41+
xcopy /y "D:\libssh2\bin\*.dll" ".\InnoSetup\build\"
4142
xcopy /y "D:\winpty\bin\winpty.dll" ".\InnoSetup\build\"
4243
xcopy /y "D:\winpty\bin\winpty-agent.exe" ".\InnoSetup\build\"
4344
xcopy /y .\scripts\Profile.ps1 .\InnoSetup\build\

depend/build_libssh2_msvc.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/bin/bash
22
set -e
33

4-
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
54
tar -xzvf libssh2-1.11.0.tar.gz
65
mkdir output
7-
cd $SHELL_FOLDER/libssh2-1.11.0
6+
cd ./libssh2-1.11.0
87
cmake -DCRYPTO_BACKEND=WinCNG -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=../output --build .
98
cmake --build . --target install

0 commit comments

Comments
 (0)