加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
appveyor.yml 3.85 KB
一键复制 编辑 原始数据 按行查看 历史
lework 提交于 2020-10-21 21:43 . fix output file name
os: Visual Studio 2019
version: 2020.1.{build}
clone_depth: 5
skip_tags: true
install:
- set /P RDM_VERSION=<version.txt
- set PYTHON_EMBEDDED_VERSION=3.7.7
- 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:\Python37-x64
- set PATH=%QT_DIR%\bin;%PY_DIR%;%PATH%
- git clone -q --depth=5 --branch=%RDM_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%
- python ./build/utils/set_version.py %RDM_VERSION% > ./src/version.h
- 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
- cd qredisclient/3rdparty/hiredis
- git apply -v ../hiredis-win.patch
# 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
--build .
- 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 rdm.pro
- qmake CONFIG+=release VERSION+=%RDM_VERSION%
- nmake /S /NOLOGO release
- cd %SRC_DIR%
- copy /y .\bin\windows\release\rdm.exe %RESOURCE_DIR%\rdm.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 rdm.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 python37.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
- powershell -Command "(gc requirements.txt) -replace '-e ', '' | Out-File -encoding ASCII requirements.txt"
- python -m pip install --upgrade pip wheel
- python -m pip install -t . -r requirements.txt
- python -m compileall -b .
- del /s /q *.py 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=%RDM_VERSION%.0.0 ./build/windows/installer/installer.nsi
- cd %APPVEYOR_BUILD_FOLDER%
- 7z.exe a rdm-%RDM_VERSION%.zip %SRC_DIR%/build/windows/installer/rdm-%RDM_VERSION%.0.0.exe
- 7z.exe a -xr"!*\.git\" rdm-%RDM_VERSION%-src.zip %SRC_DIR%/*
artifacts:
- path: rdm-$(RDM_VERSION).zip
- path: rdm-$(RDM_VERSION)-src.zip
deploy:
release: $(RDM_VERSION)
description: "[Thank you RedisDesktopManager](https://github.com/uglide/RedisDesktopManager/releases/tag/$(RDM_VERSION))"
provider: GitHub
auth_token:
secure: e3sDWfihvmg2L+/Fi6VmT6ZBtcLTyKWSoCo0bjfiWBjv/wbR/VTSOqbuGJa4c4uB # your encrypted token from GitHub
artifact: rdm-$(RDM_VERSION).zip,rdm-$(RDM_VERSION)-src.zip # upload all NuGet packages to release assets
draft: false
prerelease: false
on:
branch: master # release from master branch only
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化