mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
github action: package locale to zip
This commit is contained in:
parent
5b16f1f5b9
commit
c25657e3c0
2
.github/scripts/windows-publish.ps1
vendored
2
.github/scripts/windows-publish.ps1
vendored
|
@ -26,6 +26,7 @@ Write-Host "scriptDir" $scriptDir
|
|||
function Main() {
|
||||
|
||||
New-Item -ItemType Directory $archiveName
|
||||
New-Item -ItemType Directory $archiveName\locale
|
||||
# 拷贝exe
|
||||
Copy-Item release\$targetName $archiveName\
|
||||
Write-Host "copy item finished..."
|
||||
|
@ -45,6 +46,7 @@ function Main() {
|
|||
Write-Host "copy sdk dll$($sdkDll)"
|
||||
Copy-Item $sdkDll $archiveName\
|
||||
Copy-Item winlibs\lib\msvc\*.dll $archiveName\
|
||||
Copy-Item locale\*.qm $archiveName\locale\
|
||||
Copy-Item qtsingleapplication\lib\*.dll $archiveName\
|
||||
Write-Host "compress zip..."
|
||||
# 打包zip
|
||||
|
|
16
.github/workflows/windows.yml
vendored
16
.github/workflows/windows.yml
vendored
|
@ -7,7 +7,7 @@ on:
|
|||
- dev
|
||||
paths:
|
||||
- '*.pro'
|
||||
- '.github/**'
|
||||
# - '.github/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
@ -67,6 +67,7 @@ jobs:
|
|||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
|
||||
qmake "CONFIG+=zim_support"
|
||||
nmake
|
||||
tree /f
|
||||
|
||||
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
||||
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
||||
|
@ -78,11 +79,12 @@ jobs:
|
|||
run: |
|
||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
echo "::set-output name=release_date::$(date +'%Y%m%d')"
|
||||
echo "::set-output name=release_time::$(date +'%H%M%S')"
|
||||
# 打包
|
||||
- name: package
|
||||
id: package
|
||||
env:
|
||||
archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }}-${{ github.ref_name }}.${{ steps.vars.outputs.sha_short }}
|
||||
archiveName: ${{ matrix.qt_arch }}-${{ github.ref_name }}.${{ steps.vars.outputs.sha_short }}-${{ steps.vars.outputs.release_time }}
|
||||
msvcArch: ${{ matrix.msvc_arch }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
|
@ -91,10 +93,10 @@ jobs:
|
|||
echo "::set-output name=packageName::$name"
|
||||
# tag 查询github-Release
|
||||
# 上传artifacts
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.package.outputs.packageName }}
|
||||
path: ${{ steps.package.outputs.packageName }}.zip
|
||||
# - uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: ${{ steps.package.outputs.packageName }}
|
||||
# path: ${{ steps.package.outputs.packageName }}.zip
|
||||
# tag 上传Release
|
||||
- name: uploadRelease
|
||||
# if: startsWith(github.event.ref, 'refs/tags/')
|
||||
|
@ -107,4 +109,4 @@ jobs:
|
|||
overwrite: true
|
||||
release_name: ${{ steps.package.outputs.packageName }}
|
||||
prerelease: true
|
||||
body: "${{steps.vars.outputs.release_date}} \n This is a prerelease version ,auto build by github action. use on your on risk:-)"
|
||||
body: "release on ${{steps.vars.outputs.release_date}} ${{steps.vars.outputs.release_time}} \n arch: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }} branch:${{ github.ref_name }}, commit:${{ steps.vars.outputs.sha_short }} \n This is a prerelease version ,auto build by github action. use on your on risk:-)"
|
||||
|
|
|
@ -44,7 +44,9 @@ QT += sql
|
|||
CONFIG += exceptions \
|
||||
rtti \
|
||||
stl \
|
||||
c++11
|
||||
lrelease #lrelease generate qm under target folder.
|
||||
|
||||
QM_FILES_INSTALL_PATH = /locale/
|
||||
OBJECTS_DIR = build
|
||||
UI_DIR = build
|
||||
MOC_DIR = build
|
||||
|
@ -645,15 +647,20 @@ TRANSLATIONS += locale/ru_RU.ts \
|
|||
|
||||
# This makes qmake generate translations
|
||||
|
||||
win32:# Windows doesn't seem to have *-qt4 symlinks
|
||||
|
||||
isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
||||
isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease-qt4
|
||||
|
||||
|
||||
# The *.qm files might not exist when qmake is run for the first time,
|
||||
# causing the standard install rule to be ignored, and no translations
|
||||
# will be installed. With this, we create the qm files during qmake run.
|
||||
!win32 {
|
||||
system($${QMAKE_LRELEASE} -silent $${_PRO_FILE_} 2> /dev/null)
|
||||
message("$${QMAKE_LRELEASE} -silent $${_PRO_FILE_} 2> /dev/null")
|
||||
}
|
||||
else{
|
||||
system($${QMAKE_LRELEASE} -silent $${_PRO_FILE_})
|
||||
message("$${QMAKE_LRELEASE} -silent $${_PRO_FILE_}")
|
||||
}
|
||||
|
||||
updateqm.input = TRANSLATIONS
|
||||
|
|
Loading…
Reference in a new issue