├── .github └── workflows │ └── main.yml ├── LICENSE └── README.md /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # http://docs.redisdesktop.com/en/latest/install/ 2 | # https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md 3 | # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions 4 | 5 | # This is a basic workflow to help you get started with Actions 6 | name: CI for redis desktop manager 7 | 8 | # Controls when the action will run. Triggers the workflow on push or pull request 9 | # events but only for the master branch 10 | on: 11 | push: 12 | branches: [ pre-release ] 13 | paths-ignore: 14 | - 'README.md' 15 | - 'LICENSE' 16 | pull_request: 17 | branches: [ pre-release ] 18 | paths-ignore: 19 | - 'README.md' 20 | - 'LICENSE' 21 | schedule: 22 | # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule 23 | # - cron: '0 22 * * *' # Runs at 22:00 UTC every day 24 | - cron: '0 22 * * 6' # Runs at 22:00 UTC every saturday 25 | 26 | env: 27 | RDM_REF: 2022 28 | VERSION: 2022.99.0 29 | PY_LIB_VERSION: 38 30 | PYTHON_EMBEDDED_VERSION: 3.8.10 31 | CMAKE_VS: Visual Studio 16 2019 32 | 33 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 34 | jobs: 35 | create_release: 36 | runs-on: windows-2019 37 | # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs 38 | # Map a step output to a job output 39 | outputs: 40 | upload_url: ${{ steps.create_release.outputs.upload_url }} 41 | steps: 42 | # - name: checkout 43 | # uses: actions/checkout@v2 44 | # with: 45 | # fetch-depth: 0 46 | 47 | # delete old release 48 | - uses: dev-drprasad/delete-tag-and-release@v0.2.1 49 | with: 50 | delete_release: true # default: false 51 | tag_name: ${{ env.RDM_REF }}-weekly # tag name to delete 52 | env: 53 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 54 | 55 | - name: Create Release 56 | id: create_release 57 | uses: actions/create-release@v1 58 | env: 59 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token 60 | with: 61 | tag_name: ${{ env.RDM_REF }}-weekly 62 | release_name: v${{ env.RDM_REF }}-weekly 63 | body: | 64 | ${{ env.RDM_REF }}-weekly 65 | draft: false 66 | prerelease: true 67 | 68 | build_on_windows: 69 | needs: create_release 70 | runs-on: windows-2019 71 | 72 | # Steps represent a sequence of tasks that will be executed as part of the job 73 | steps: 74 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 75 | - uses: actions/checkout@v2 76 | with: 77 | repository: uglide/RedisDesktopManager 78 | path: rdm 79 | submodules: 'recursive' 80 | ref: ${{ env.RDM_REF }} 81 | 82 | # install QT 83 | - name: install QT 84 | uses: jurplel/install-qt-action@v2 85 | with: 86 | version: '5.15.1' 87 | modules: 'qtcharts' 88 | 89 | # - name : fix compilation 90 | # run: | 91 | # cd rdm/3rdparty/qredisclient/3rdparty/hiredis 92 | # git apply ../hiredis-win.patch 93 | 94 | - name: install zlib 95 | run: | 96 | cd rdm/3rdparty 97 | nuget install zlib-msvc14-x64 -Version 1.2.11.7795 98 | 99 | # from https://github.com/lework/RedisDesktopManager-Windows 100 | - name: build lz4 101 | run: | 102 | cd rdm/3rdparty/lz4/build/cmake 103 | cmake -G "${{ env.CMAKE_VS }}" -A x64 -DLZ4_BUNDLED_MODE=ON -DBUILD_SHARED_LIBS=ON -B . 104 | cmake --build . --config Release 105 | 106 | - name: build zstd 107 | run: | 108 | cd rdm/3rdparty/zstd/build/cmake 109 | cmake -G "${{ env.CMAKE_VS }}" -A x64 -B . 110 | cmake --build . --config Release 111 | 112 | - name: build snappy 113 | run: | 114 | cd rdm/3rdparty/snappy 115 | cmake -G "${{ env.CMAKE_VS }}" -A x64 -B . 116 | cmake --build . --config Release 117 | 118 | - name: build brotli 119 | run: | 120 | cd rdm/3rdparty/brotli 121 | cmake -G "${{ env.CMAKE_VS }}" -A x64 -B . 122 | cmake -DCMAKE_BUILD_TYPE=Release 123 | cmake --build . --config Release 124 | 125 | # # install python3 126 | # - name: install Python3 127 | # uses: actions/setup-python@v2 128 | # with: 129 | # python-version: '3.7' 130 | # architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified 131 | 132 | # install python3 133 | - name: install python3 134 | shell: cmd 135 | run: mklink /d C:\Python${{ env.PY_LIB_VERSION }}-x64 C:\hostedtoolcache\windows\python\${{ env.PYTHON_EMBEDDED_VERSION }}\x64 136 | 137 | # pip install 138 | - name: pip install 139 | shell: cmd 140 | run: | 141 | cd rdm\build\windows\installer\resources 142 | xcopy %GITHUB_WORKSPACE%\rdm\src\py . /s /i 143 | mkdir Lib\site-packages 144 | pip3 install -t Lib\site-packages -r requirements.txt 145 | python -m compileall -b . 146 | del /s /q *.py 147 | forfiles /p "." /s /m __pycache__ /c "cmd /c if @isdir==TRUE rd /s /q @file 2>nul" 2>nul | exit /b 0 148 | forfiles /p "." /s /m *.dist-info /c "cmd /c if @isdir==TRUE rd /s /q @file 2>nul" 2>nul | exit /b 0 149 | forfiles /p "." /s /m *.egg-info /c "cmd /c if @isdir==TRUE rd /s /q @file 2>nul" 2>nul | exit /b 0 150 | 151 | # https://doc.qt.io/qt-5/linguist-manager.html 152 | # lupdate resp.pro 153 | - name: translations 154 | shell: cmd 155 | run: | 156 | cd rdm\src 157 | lupdate resp.pro 158 | lrelease -verbose resp.pro 159 | xcopy resources\translations\*.qm ..\build\windows\installer\resources\translations /s /i 160 | 161 | # Runs a single command using the runners shell 162 | - name: build 163 | shell: cmd 164 | env: 165 | vc_arch: x64 166 | run: | 167 | python rdm\build\utils\set_version.py ${{ env.VERSION }} > rdm\src\version.h 168 | cd rdm\src 169 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %vc_arch% 170 | qmake resp.pro CONFIG-=debug "VERSION=${{ env.VERSION }}" 171 | nmake 172 | 173 | # 缺少python3.dll 174 | # fix formatter error, unicodedata _bz2 175 | - name: add python3.dll 176 | shell: powershell 177 | # env: 178 | # PYTHON_EMBEDDED_VERSION: ${{ env.PYTHON_EMBEDDED_VERSION }} 179 | run: | 180 | cd rdm\build\windows\installer\resources 181 | wget "https://www.python.org/ftp/python/${{ env.PYTHON_EMBEDDED_VERSION }}/python-${{ env.PYTHON_EMBEDDED_VERSION }}-embed-amd64.zip" -outfile "python-embed.zip" 182 | 7z.exe x python-embed.zip python${{ env.PY_LIB_VERSION }}.zip python3.dll python${{ env.PY_LIB_VERSION }}.dll unicodedata.pyd _bz2.pyd 183 | del python-embed.zip 184 | 185 | # windeployqt 186 | # https://doc.qt.io/qt-5/windows-deployment.html 187 | # windeployqt.exe --force --qmldir ${{ env.QML2_IMPORT_PATH }} resp.exe 188 | - name: package 189 | id: package 190 | shell: cmd 191 | run: | 192 | cd rdm 193 | copy /y bin\windows\release\resp.exe build\windows\installer\resources\resp.exe 194 | copy /y bin\windows\release\resp.exp build\windows\installer\resources\resp.exp 195 | copy /y bin\windows\release\resp.lib build\windows\installer\resources\resp.lib 196 | cd build\windows\installer\resources 197 | windeployqt.exe --no-angle --no-opengl-sw --no-compiler-runtime --no-translations --release --force --qmldir ../../../../src/qml resp.exe 198 | makensis.exe /V1 /DVERSION=${{ env.VERSION }} ../installer.nsi 199 | 200 | - name: Upload Release Asset 201 | id: upload-release-asset 202 | uses: actions/upload-release-asset@v1 203 | env: 204 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 205 | with: 206 | # upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps 207 | upload_url: ${{ needs.create_release.outputs.upload_url }} 208 | asset_path: rdm/build/windows/installer/resp-${{ env.VERSION }}.exe 209 | asset_name: resp-${{ env.VERSION }}.exe 210 | asset_content_type: application/vnd.microsoft.portable-executable 211 | 212 | build_on_osx: 213 | needs: create_release 214 | # runs-on: macos-latest 215 | runs-on: macos-12 216 | 217 | # Steps represent a sequence of tasks that will be executed as part of the job 218 | steps: 219 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 220 | - uses: actions/checkout@v2 221 | with: 222 | repository: uglide/RedisDesktopManager 223 | path: rdm 224 | submodules: 'recursive' 225 | ref: ${{ env.RDM_REF }} 226 | 227 | # - name: update submodules 228 | # run: | 229 | # cd rdm 230 | # git submodule update --remote 231 | 232 | - name: build lz4 233 | run: | 234 | cd rdm/3rdparty/lz4/build/cmake 235 | cmake -DLZ4_BUNDLED_MODE=ON -DBUILD_SHARED_LIBS=ON 236 | ls 237 | make -s -j 8 238 | 239 | - name: build zstd 240 | run: | 241 | cd rdm/3rdparty/zstd/build/cmake 242 | cmake . && make 243 | 244 | - name: build snappy 245 | run: | 246 | cd rdm/3rdparty/snappy 247 | git submodule update --remote 248 | cmake . && make 249 | 250 | - name: build brotli 251 | run: | 252 | cd rdm/3rdparty/brotli 253 | cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF 254 | sudo cmake --build . --config Release --target install 255 | 256 | # - name: setup python 257 | # run: | 258 | # brew unlink python@3.11 259 | # brew unlink python@3.10 260 | # brew reinstall python@3.9 261 | # brew link --overwrite python@3.9 262 | # brew link python3 263 | 264 | # install QT 265 | - name: install QT 266 | uses: jurplel/install-qt-action@v3 267 | with: 268 | version: '5.15.1' 269 | modules: 'qtcharts' 270 | setup-python: 'false' 271 | 272 | - name: copy info.plist 273 | run: | 274 | cd rdm 275 | cd ./src && cp ./resources/Info.plist.sample ./resources/Info.plist 276 | 277 | # - name: setup python 278 | # run: | 279 | # brew unlink python@3.10 280 | # brew install python@3.9 281 | # brew link --overwrite python@3.9 282 | 283 | # 使用私有库,egg-links时-t不能同时使用,--user解决权限问题 284 | # https://github.com/UnitedIncome/serverless-python-requirements/issues/240 285 | # https://github.com/pypa/pip/issues/4390 286 | # https://github.com/pypa/pip/issues/4139 287 | # https://github.com/pypa/pip/issues/562 288 | # sudo pip3 install --prefix . -r $GITHUB_WORKSPACE/rdm/src/py/requirements.txt 289 | # sudo pip3 install -t . -r $GITHUB_WORKSPACE/rdm/src/py/requirements.txt 290 | - name: pip install 291 | run: | 292 | cd rdm 293 | mkdir -p bin/osx/release && cd bin/osx/release 294 | cp -Rf $GITHUB_WORKSPACE/rdm/src/py . 295 | cd py 296 | echo six >> requirements.txt 297 | sudo pip3 install -t . -r requirements.txt 298 | sudo python3 -m compileall -b . 299 | sudo find . -name "*.py" | sudo xargs rm -rf 300 | sudo find . -name "__pycache__" | sudo xargs rm -rf 301 | sudo find . -name "*.dist-info" | sudo xargs rm -rf 302 | sudo find . -name "*.egg-info" | sudo xargs rm -rf 303 | 304 | - name: release translations 305 | run: | 306 | cd rdm/src 307 | lupdate resp.pro 308 | lrelease -verbose resp.pro 309 | 310 | # brew install tree && tree -a 311 | # 去掉initUpdater不然报Please download new version of Redis Desktop Manager,不能使用 312 | # sed -i '.back' 's/initUpdater();/\/\/initUpdater();/g' ./app/app.cpp 313 | # macdeployqt 314 | # https://doc.qt.io/qt-5/macos-deployment.html 315 | # Qt Translations are not being copied 316 | # https://github.com/probonopd/linuxdeployqt/issues/115 317 | - name: build 318 | id: build 319 | run: | 320 | cd rdm/src 321 | qmake resp.pro CONFIG-=debug "VERSION=${{ env.VERSION }}" 322 | make -s -j 8 323 | 324 | - name: copy translations 325 | run: | 326 | cd rdm/src 327 | mkdir ../bin/osx/release/RESP.app/Contents/translations 328 | cp -f ./resources/translations/*.qm ../bin/osx/release/RESP.app/Contents/translations 329 | 330 | - name: package 331 | id: package 332 | run: | 333 | cd rdm/bin/osx/release 334 | zip -q -r release.zip . 335 | cp -Rf py ./RESP.app/Contents/Resources/ 336 | python_version=$(python3 -c "import sys; print('.'.join(map(str, sys.version_info[:2])))") 337 | echo ${python_version} 338 | brew install python@${python_version} 339 | cp -Rf /usr/local/Cellar/python@${python_version}/*/Frameworks/ ./RESP.app/Contents/Frameworks/ 340 | install_name_tool -change /Library/Frameworks/Python.framework/Versions/${python_version}/Python @rpath/Python.framework/Versions/${python_version}/Python ./RESP.app/Contents/MacOS/RESP 341 | otool -L ./RESP.app/Contents/MacOS/RESP 342 | macdeployqt ./RESP.app -qmldir=../../../src/qml -always-overwrite -dmg 343 | 344 | - name: Upload Release Asset 345 | id: upload-release-asset 346 | uses: actions/upload-release-asset@v1 347 | env: 348 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 349 | with: 350 | upload_url: ${{ needs.create_release.outputs.upload_url }} 351 | asset_path: rdm/bin/osx/release/RESP.dmg 352 | asset_name: RESP.dmg 353 | asset_content_type: application/dmg 354 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 FuckDoctors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![CI for redis desktop manager](https://github.com/FuckDoctors/rdm-builder/workflows/CI%20for%20redis%20desktop%20manager/badge.svg) 2 | 3 | # rdm-builder 4 | 5 | Redis Desktop Manager Builder for windows and macOS 6 | 7 | Official Download: [https://resp.app](https://resp.app) 8 | 9 | 一个编译Windows版和macOS版Redis Desktop Manager的Github Action。 10 | 11 | 有条件的同学请支持官方版本: [https://resp.app](https://resp.app) 12 | 13 | 其他版本: 14 | 15 | - [RedisDesktopManager-Windows](https://github.com/lework/RedisDesktopManager-Windows) 16 | - [RedisDesktopManager-Mac](https://github.com/onewe/RedisDesktopManager-Mac) 17 | 18 | ## Release & Pre-release 19 | 20 | - [windows](https://github.com/FuckDoctors/rdm-builder/releases) 21 | - [macOS](https://github.com/FuckDoctors/rdm-builder/releases) 22 | - [Pre-release](https://github.com/FuckDoctors/rdm-builder/releases/tag/2022-weekly) [___Weekly___] 🎉 23 | 24 | ## Credits & 感谢 25 | 26 | - [RedisDesktopManager](https://github.com/uglide/RedisDesktopManager) 27 | - [Build from source](http://docs.redisdesktop.com/en/latest/install/) 28 | - [rdm编译打包的github Action配置](https://onew.me/2020/07/01/rdm-action/) 29 | - [Qt使用github-Actions自动化发行](https://zhuanlan.zhihu.com/p/95926317) 30 | - [源码编译Redis Desktop Manager](https://kany.me/2019/10/10/compile-redis-desktop-manager/) 31 | - [JetBrains Open Source Support](https://www.jetbrains.com/community/opensource/#support) 32 | --------------------------------------------------------------------------------