使用简易的无边框窗口,能改变大小和拖动即可。比较麻烦的细节问题不在这里处理了。 #293
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu | |
# Qt官方没有linux平台的x86包 | |
on: | |
# push代码时触发workflow | |
push: | |
paths: | |
- '3rdparty/**' | |
- 'examples/**' | |
- 'mkspecs/**' | |
- 'src/**' | |
- '.qmake.conf' | |
- 'TaoQuick.pro' | |
- '.github/workflows/ubuntu.yml' | |
# pull_request时触发workflow | |
pull_request: | |
paths: | |
- '3rdparty/**' | |
- 'examples/**' | |
- 'mkspecs/**' | |
- 'src/**' | |
- '.qmake.conf' | |
- 'TaoQuick.pro' | |
- '.github/workflows/ubuntu.yml' | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-18.04,ubuntu-20.04,ubuntu-22.04] | |
qt_ver: [5.9.9,5.12.10,5.15.2] | |
qt_arch: [gcc_64] | |
env: | |
targetName: TaoQuickShow | |
steps: | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v2 | |
with: | |
version: ${{ matrix.qt_ver }} | |
cached: 'false' | |
- name: Install QT linux deploy | |
uses: miurahr/install-linuxdeploy-action@v1 | |
with: | |
plugins: qt appimage | |
- name: ubuntu install GL library | |
run: sudo apt-get install -y libglew-dev libglfw3-dev | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
submodules: 'true' | |
- name: build ubuntu | |
run: | | |
qmake | |
make | |
- name: package | |
run: | | |
# make sure Qt plugin finds QML sources so it can deploy the imported files | |
export QML_SOURCES_PATHS=./ | |
# 拷贝依赖 | |
linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --create-desktop-file --icon-file=examples/TaoQuickShow/${targetName}.svg --executable=bin/release/${targetName} --appdir bin/release/ | |
mv ${{ env.targetName }}-*.AppImage ${{ env.targetName }}.AppImage | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}} | |
path: ${{ env.targetName }}.AppImage | |
- name: uploadRelease | |
if: startsWith(github.event.ref, 'refs/tags/') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.targetName }}.AppImage | |
asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}.AppImage | |
tag: ${{ github.ref }} | |
overwrite: true |