update
parent
e7f6ad8b26
commit
96ad06c2e4
|
@ -1,87 +0,0 @@
|
||||||
name: Windows MinGW
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.pro'
|
|
||||||
- 'src/**'
|
|
||||||
- '.github/workflows/windows-mingw.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.pro'
|
|
||||||
- 'src/**'
|
|
||||||
- '.github/workflows/windows-mingw.yml'
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: windows-2019
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- qt_arch: win32_mingw81
|
|
||||||
qt_ver: 5.15.2
|
|
||||||
qt_tools: "tools_mingw,8.1.0-1-202004170606,qt.tools.win32_mingw810"
|
|
||||||
qt_tools_mingw_install: mingw810_32
|
|
||||||
- qt_arch: win64_mingw81
|
|
||||||
qt_ver: 5.15.2
|
|
||||||
qt_tools: "tools_mingw,8.1.0-1-202004170606,qt.tools.win64_mingw810"
|
|
||||||
qt_tools_mingw_install: mingw810_64
|
|
||||||
env:
|
|
||||||
targetName: example.exe
|
|
||||||
fileName: example
|
|
||||||
steps:
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v2
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
aqtversion: '==2.0.5'
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
tools: ${{ matrix.qt_tools }}
|
|
||||||
cached: 'false'
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
- name: Qt 5 environment configuration
|
|
||||||
if: ${{ startsWith( matrix.qt_ver, 5 ) }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Write-Output "${{ env.Qt5_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
Write-Output "${{ env.Qt5_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
- name: Qt 6 environment configuration
|
|
||||||
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
- name: where is qmake & where is mingw32-make
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Get-Command -Name 'qmake' | Format-List
|
|
||||||
Get-Command -Name 'mingw32-make' | Format-List
|
|
||||||
- name: mingw-build
|
|
||||||
id: build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
qmake
|
|
||||||
mingw32-make
|
|
||||||
- name: package
|
|
||||||
id: package
|
|
||||||
env:
|
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
|
||||||
$name = ${env:archiveName}
|
|
||||||
echo "::set-output name=packageName::$name"
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
|
||||||
path: ${{ steps.package.outputs.packageName }}
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
asset_name: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,35 +0,0 @@
|
||||||
[CmdletBinding()]
|
|
||||||
param (
|
|
||||||
[string] $archiveName, [string] $targetName
|
|
||||||
)
|
|
||||||
# 外部环境变量包括:
|
|
||||||
# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
|
||||||
|
|
||||||
|
|
||||||
# archiveName: 5.15.2-win64_mingw81
|
|
||||||
|
|
||||||
$scriptDir = $PSScriptRoot
|
|
||||||
$currentDir = Get-Location
|
|
||||||
Write-Host "currentDir" $currentDir
|
|
||||||
Write-Host "scriptDir" $scriptDir
|
|
||||||
|
|
||||||
function Main() {
|
|
||||||
|
|
||||||
New-Item -ItemType Directory $archiveName
|
|
||||||
# 拷贝exe
|
|
||||||
Copy-Item bin\release\* $archiveName\
|
|
||||||
# 拷贝依赖
|
|
||||||
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName
|
|
||||||
# 删除不必要的文件
|
|
||||||
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
|
|
||||||
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
|
|
||||||
# 打包zip
|
|
||||||
Compress-Archive -Path $archiveName $archiveName'.zip'
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($null -eq $archiveName || $null -eq $targetName) {
|
|
||||||
Write-Host "args missing, archiveName is" $archiveName ", targetName is" $targetName
|
|
||||||
return
|
|
||||||
}
|
|
||||||
Main
|
|
||||||
|
|
|
@ -138,6 +138,8 @@ Item {
|
||||||
}else if(pos.x>tab_nav.width-itemWidth){
|
}else if(pos.x>tab_nav.width-itemWidth){
|
||||||
timer.isIncrease = true
|
timer.isIncrease = true
|
||||||
timer.restart()
|
timer.restart()
|
||||||
|
}else{
|
||||||
|
timer.stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Timer{
|
Timer{
|
||||||
|
@ -150,12 +152,12 @@ Item {
|
||||||
if(tab_nav.contentX>=tab_nav.contentWidth-tab_nav.width){
|
if(tab_nav.contentX>=tab_nav.contentWidth-tab_nav.width){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
tab_nav.contentX = tab_nav.contentX+1
|
tab_nav.contentX = tab_nav.contentX+2
|
||||||
}else{
|
}else{
|
||||||
if(tab_nav.contentX<=0){
|
if(tab_nav.contentX<=0){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
tab_nav.contentX = tab_nav.contentX-1
|
tab_nav.contentX = tab_nav.contentX-2
|
||||||
}
|
}
|
||||||
item_mouse_drag.updatePosition(tab_nav.mapFromItem(item_container, 0, 0))
|
item_mouse_drag.updatePosition(tab_nav.mapFromItem(item_container, 0, 0))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue