-
Notifications
You must be signed in to change notification settings - Fork 287
/
Copy pathappveyor.yml
131 lines (114 loc) · 4.29 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
os: Visual Studio 2019
version: 2020.1.{build}
clone_depth: 5
skip_tags: true
install:
- set /P RESP_VERSION=<version.txt
- set PYTHON_EMBEDDED_VERSION=3.8.10
- set REPO_DIR=%CD%
- set SRC_DIR=C:\projects\RedisDesktopManager
- set RESOURCE_DIR=%SRC_DIR%\build\windows\installer\resources
- set QT_DIR=C:\Qt\5.15\msvc2019_64
- set PY_DIR=C:\Python38-x64
- set PATH=%QT_DIR%\bin;%PY_DIR%;%PATH%
- git clone -q --depth=5 --branch=%RESP_VERSION% https://github.com/uglide/RedisDesktopManager.git %SRC_DIR%
- cd %SRC_DIR%
- git describe --abbrev=0 --tags
- git rev-parse --short HEAD
- git submodule update --init --recursive
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
- qmake -v
- python -VV
build_script:
- cd %SRC_DIR%
- cd 3rdparty
- 7z.exe x "%REPO_DIR%\deps\deps.zip" botan.dll botan.lib libssh2.lib -o./qredisclient/
- nuget install zlib-msvc14-x64 -Version 1.2.11.7795
# build brotli
- cd %SRC_DIR%\3rdparty\brotli
- cmake .
-G "Visual Studio 16 2019" -A x64
-DBUILD_SHARED_LIBS=on
- cmake
--build .
--config "Release"
# build lz4.lib
- cd %SRC_DIR%\3rdparty\lz4\build\cmake
- cmake .
-G "Visual Studio 16 2019" -A x64
-DLZ4_BUNDLED_MODE=on
-DBUILD_SHARED_LIBS=on
- cmake
--build .
--config "Release"
# build snappy
- cd %SRC_DIR%\3rdparty\snappy
- cmake .
-G "Visual Studio 16 2019" -A x64
-DBUILD_SHARED_LIBS=on
-DSNAPPY_BUILD_TESTS=off
-DSNAPPY_BUILD_BENCHMARKS=off
- cmake
--build .
--config "Release"
- cp -f Release/snappy.dll %RESOURCE_DIR%/
# build zstd
- cd %SRC_DIR%\3rdparty\zstd\build\cmake
- cmake .
-G "Visual Studio 16 2019" -A x64
-DBUILD_SHARED_LIBS=on
- cmake
--build .
--config "Release"
# build app
- cd %SRC_DIR%\3rdparty
- nuget install zlib-msvc14-x64 -Version 1.2.11.7795
- cd %SRC_DIR%/src
- lrelease resp.pro
- qmake CONFIG+=release VERSION+=%RESP_VERSION%
- nmake /S /NOLOGO release
- cd %SRC_DIR%
- copy /y .\bin\windows\release\resp.exe %RESOURCE_DIR%\resp.exe
- copy /y .\3rdparty\qredisclient\botan.dll %RESOURCE_DIR%\botan.dll
- cd %RESOURCE_DIR%
- windeployqt --no-angle --no-opengl-sw --no-compiler-runtime --no-translations --release --force --qmldir %SRC_DIR%/src/qml resp.exe
- rmdir /S /Q .\platforminputcontexts
- rmdir /S /Q .\qmltooling
- rmdir /S /Q .\QtGraphicalEffects
- del /Q .\imageformats\qtiff.dll
- del /Q .\imageformats\qwebp.dll
- cd %RESOURCE_DIR%
- powershell -command "(New-Object System.Net.WebClient).DownloadFile('https://www.python.org/ftp/python/%PYTHON_EMBEDDED_VERSION%/python-%PYTHON_EMBEDDED_VERSION%-embed-amd64.zip', 'python-deps.zip')"
- 7z.exe x python-deps.zip python*.zip *.pyd *.dll
- del /Q python-deps.zip python3.dll libcrypto-1_1.dll libssl-1_1.dll _ssl.pyd sqlite3.dll _sqlite3.pyd
- md Lib
- xcopy /s /i %SRC_DIR%\src\py Lib\site-packages
- cd Lib\site-packages
# https://tinyurl.com/y3dm3h86
- python -m pip install --upgrade pip wheel
- python -m pip install -t . -r requirements.txt
- python -m pip list --path .
- python -m compileall -b .
- del /s /q *.py *.exe py.qrc requirements.txt
- FORFILES /P "." /S /M __pycache__ /C "cmd /c IF @ISDIR==TRUE rd /S /Q @FILE 2>nul" 2>nul | EXIT /B 0
- FORFILES /P "." /S /M *.dist-info /C "cmd /c IF @ISDIR==TRUE rd /S /Q @FILE 2>nul" 2>nul | EXIT /B 0
- FORFILES /P "." /S /M *.egg-info /C "cmd /c IF @ISDIR==TRUE rd /S /Q @FILE 2>nul" 2>nul | EXIT /B 0
- cd %SRC_DIR%
- call "C:\\Program Files (x86)\\NSIS\\makensis.exe" /V1 /DVERSION=%RESP_VERSION%.0.0 ./build/windows/installer/installer.nsi
- cd %APPVEYOR_BUILD_FOLDER%
- 7z.exe a resp-%RESP_VERSION%.zip %SRC_DIR%/build/windows/installer/resp-%RESP_VERSION%.0.0.exe
- 7z.exe a -xr"!*\.git\" resp-%RESP_VERSION%-src.zip %SRC_DIR%/*
artifacts:
- path: resp-$(RESP_VERSION).zip
- path: resp-$(RESP_VERSION)-src.zip
deploy:
release: $(RESP_VERSION)
description: "[Thank you RedisDesktopManager](https://github.com/uglide/RedisDesktopManager/releases/tag/$(RESP_VERSION))"
provider: GitHub
auth_token:
secure: e3sDWfihvmg2L+/Fi6VmT6ZBtcLTyKWSoCo0bjfiWBjv/wbR/VTSOqbuGJa4c4uB # your encrypted token from GitHub
artifact: resp-$(RESP_VERSION).zip,resp-$(RESP_VERSION)-src.zip # upload all NuGet packages to release assets
draft: false
prerelease: false
on:
branch: master # release from master branch only