-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
390 changed files
with
27,524 additions
and
34,882 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[CmdletBinding()] | ||
param ( | ||
[string] $archiveName, [string] $targetName | ||
) | ||
# 外部环境变量包括: | ||
# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }} | ||
# winSdkDir: ${{ steps.build.outputs.winSdkDir }} | ||
# winSdkVer: ${{ steps.build.outputs.winSdkVer }} | ||
# vcToolsInstallDir: ${{ steps.build.outputs.vcToolsInstallDir }} | ||
# vcToolsRedistDir: ${{ steps.build.outputs.vcToolsRedistDir }} | ||
# msvcArch: ${{ matrix.msvc_arch }} | ||
|
||
|
||
# winSdkDir: C:\Program Files (x86)\Windows Kits\10\ | ||
# winSdkVer: 10.0.19041.0\ | ||
# vcToolsInstallDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\ | ||
# vcToolsRedistDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.28.29325\ | ||
# archiveName: 5.9.9-win32_msvc2015 | ||
# msvcArch: x86 | ||
|
||
$scriptDir = $PSScriptRoot | ||
$currentDir = Get-Location | ||
Write-Host "currentDir" $currentDir | ||
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..." | ||
# 拷贝依赖 | ||
windeployqt --qmldir . --plugindir $archiveName\plugins --compiler-runtime $archiveName\$targetName | ||
# 删除不必要的文件 | ||
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb") | ||
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force | ||
Write-Host "remove item finished..." | ||
# 拷贝vcRedist dll | ||
$redistDll="{0}{1}\*.CRT\*.dll" -f $env:vcToolsRedistDir.Trim(),$env:msvcArch | ||
Write-Host "redist dll $($redistDll)" | ||
Copy-Item $redistDll $archiveName\ | ||
Write-Host "copy redist dll..." | ||
Copy-Item "LICENSE.txt" $archiveName\ | ||
Write-Host "copy license.." | ||
# 拷贝WinSDK dll | ||
$sdkDll="{0}Redist\{1}ucrt\DLLs\{2}\*.dll" -f $env:winSdkDir.Trim(),$env:winSdkVer.Trim(),$env:msvcArch | ||
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 | ||
Compress-Archive -Path $archiveName -DestinationPath $archiveName'.zip' | ||
} | ||
|
||
if ($null -eq $archiveName || $null -eq $targetName) { | ||
Write-Host "args missing, archiveName is" $archiveName ", targetName is" $targetName | ||
return | ||
} | ||
Main | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ dev ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ dev ] | ||
schedule: | ||
- cron: '40 15 * * 6' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'cpp', 'javascript' ] | ||
os: [ubuntu-20.04] | ||
qt_ver: [5.15.2] | ||
qt_arch: [gcc_64] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v2.13.0 | ||
with: | ||
version: ${{ matrix.qt_ver }} | ||
cached: 'false' | ||
modules: qtwebengine | ||
- name: ubuntu install thirdparty dependencies | ||
run: | | ||
sudo apt-get install git pkg-config build-essential qt5-qmake | ||
sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev | ||
sudo apt-get install qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev | ||
sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev | ||
sudo apt-get install libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev | ||
sudo apt-get install qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins libopencc-dev libzstd-dev | ||
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
- run: | | ||
qmake CONFIG+=release PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support | ||
make INSTALL_ROOT=appdir -j`nproc` ; # find appdir/ | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Ubuntu | ||
# Qt官方没有linux平台的x86包 | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- dev | ||
# paths: | ||
# - '*.pro' | ||
# - '.github/**' | ||
pull_request: | ||
branches: | ||
- dev | ||
# paths: | ||
# - '*.pro' | ||
# - '.github/**' | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
qt_ver: [5.15.2] | ||
qt_arch: [gcc_64] | ||
steps: | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v2.13.0 | ||
with: | ||
version: ${{ matrix.qt_ver }} | ||
cached: 'false' | ||
modules: qtwebengine | ||
- name: ubuntu install thirdparty dependencies | ||
run: | | ||
sudo apt-get install git pkg-config build-essential qt5-qmake | ||
sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev | ||
sudo apt-get install qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev | ||
sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev | ||
sudo apt-get install libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev | ||
sudo apt-get install qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins libopencc-dev libzstd-dev | ||
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
# - name: build singleapplication | ||
# run: | | ||
# cd qtsingleapplication | ||
# qmake | ||
# make | ||
- name: build goldendict | ||
run: | | ||
qmake CONFIG+=release PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support | ||
make INSTALL_ROOT=appdir -j`nproc` install; find appdir/ | ||
ls -al | ||
- name: Build AppImage | ||
run: | | ||
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" | ||
chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage | ||
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" | ||
chmod a+x linuxdeploy-x86_64.AppImage | ||
./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.goldendict.GoldenDict.desktop | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: AppImage | ||
path: './*.AppImage*' | ||
- name: Set outputs | ||
id: vars | ||
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')" | ||
echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" | ||
echo "::set-output name=appname::$(ls *.AppImage*)" | ||
- name: uploadRelease | ||
# if: startsWith(github.event.ref, 'refs/tags/') | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ steps.vars.outputs.appname }} | ||
asset_name: ${{ steps.vars.outputs.appname }} | ||
tag: prerelease-${{steps.vars.outputs.release_date}} | ||
overwrite: true | ||
release_name: Ubuntu-Windows-${{ github.ref_name }}.${{ steps.vars.outputs.sha_short }} built on ${{steps.vars.outputs.release_date}} ${{steps.vars.outputs.release_time_clock}} | ||
prerelease: true | ||
body: | | ||
release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} | ||
branch: ${{ github.ref_name }} | ||
commit: ${{ steps.vars.outputs.sha_short }} | ||
Qt version: ${{ matrix.qt_ver }} ${{ matrix.qt_arch }} | ||
Windows built with: msvc64 Visual studio 2019 | ||
AppImage built with: Ubuntu-20.04 ,latest gcc | ||
This is a prerelease version ,auto build by github action. use on your on risk:-) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Windows | ||
on: | ||
workflow_dispatch: | ||
# push代码时触发workflow | ||
push: | ||
branches: | ||
- dev | ||
# paths: | ||
# - '*.pro' | ||
# - '.github/**' | ||
pull_request: | ||
branches: | ||
- dev | ||
# paths: | ||
# - '*.pro' | ||
# - '.github/**' | ||
jobs: | ||
build: | ||
name: Build | ||
# 运行平台, windows-latest目前是windows server 2019 | ||
# 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md | ||
runs-on: windows-2019 | ||
strategy: | ||
# 矩阵配置 | ||
matrix: | ||
include: | ||
# 5.15.2 参考 https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/windows_x86/desktop/qt5_5152/ | ||
- qt_ver: 5.15.2 | ||
qt_arch: win64_msvc2019_64 | ||
msvc_arch: x64 | ||
qt_target: x64 | ||
qt_arch_install: msvc2019_64 | ||
env: | ||
targetName: GoldenDict.exe | ||
# 步骤 | ||
steps: | ||
# 安装Qt | ||
- name: Install Qt | ||
# 使用外部action。这个action专门用来安装Qt | ||
uses: jurplel/install-qt-action@v2.13.0 | ||
with: | ||
# Version of Qt to install | ||
version: ${{ matrix.qt_ver }} | ||
# Target platform for build | ||
# target: ${{ matrix.qt_target }} | ||
arch: ${{ matrix.qt_arch }} | ||
cached: 'false' | ||
modules: qtwebengine | ||
# 拉取代码 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
# msvc编译 | ||
- name: msvc-build goldendict | ||
id: build | ||
shell: cmd | ||
run: | | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} | ||
qmake "CONFIG+=zim_support" | ||
nmake | ||
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% | ||
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV% | ||
echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV% | ||
echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV% | ||
- name: Set outputs | ||
id: vars | ||
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')" | ||
echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')" | ||
# 打包 | ||
- name: package | ||
id: package | ||
env: | ||
archiveName: GoldenDict-${{ github.ref_name }}.${{ steps.vars.outputs.sha_short }}-${{ steps.vars.outputs.release_time }} | ||
msvcArch: ${{ matrix.msvc_arch }} | ||
shell: pwsh | ||
run: | | ||
& .github\scripts\windows-publish.ps1 ${env:archiveName} ${env:targetName} | ||
$name = ${env:archiveName} | ||
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 | ||
# tag 上传Release | ||
- 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: prerelease-${{steps.vars.outputs.release_date}} | ||
overwrite: true | ||
release_name: Ubuntu-Windows-${{ github.ref_name }}.${{ steps.vars.outputs.sha_short }} built on ${{steps.vars.outputs.release_date}} ${{steps.vars.outputs.release_time_clock}} | ||
prerelease: true | ||
body: | | ||
release on date: ${{steps.vars.outputs.release_date}} time: ${{steps.vars.outputs.release_time_clock}} | ||
branch: ${{ github.ref_name }} | ||
commit: ${{ steps.vars.outputs.sha_short }} | ||
Qt version: ${{ matrix.qt_ver }} ${{ matrix.qt_arch }} | ||
Windows built with: msvc64 Visual studio 2019 | ||
AppImage built with: Ubuntu-20.04 ,latest gcc | ||
This is a prerelease version ,auto build by github action. use on your on risk:-) |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# all the changes: | ||
- replace webkit with webenginewidgets | ||
- clean old code. | ||
- remove old `if 0` code section | ||
- qt_version check | ||
- remove IS_QT_5 check | ||
rename qt4x5.hh to utils.hh,for the name is not proper now. | ||
- QString::SkipEmptyParts=>Qt::SkipEmptyParts | ||
- remove "CONFIG+=old_hunspell" | ||
- remove iconv partly,use qtextcodec instead. | ||
- when parse mdx dictionary ,use qtextcodec | ||
- when parse dsl dictionary ,use qtextcodec instead of iconv | ||
|
||
fix the old bug https://github.com/goldendict/goldendict/issues/1322 by the way | ||
- remove dependency of iconv lib completely,use qtextcodec instead. has not merge into this PR yet. in this branch https://github.com/xiaoyifang/goldendict/tree/remove-iconv-lib | ||
- bug, found dictionaries panel show all the dictionaries which is not correct. | ||
- bug,F12 inspect function. | ||
- bug ,double click event.in webengineview widget. the mouse event was eated by child widget. | ||
- bug,bword link (hunspell dictionary) navigation error. | ||
- single click to select the word ~(**work inside iframe**)~ | ||
- Fix:open image url in external viewer. (only worked with external images) | ||
- bug:relative url cause about:blank#block in GD. | ||
- bug:Right context menu not display the dictionary list | ||
- improvement: include jquery | ||
- improvement: add webchannel. | ||
- improvement:stylesheet css file.use external link instead of embed. | ||
by using external file syntax.the browser can cache the file.improve web performance in a way. | ||
- improvement:seperate javascript file from cpp code. | ||
- improvement:mediawiki request will hang forever,if can not access . | ||
- improvement:large mdd file support on windows from @csg2008 | ||
- fix: a mdd file chunk overlap problem from @csg2008 (this is an old bug also existed in official release). | ||
- imp. add high dpi support replace png icon with svg | ||
- fix: improper maked mdx file embed css files in which embed font's url such as './font.woff' can not be parsed. | ||
- imp. add clear:both articleseperator in the article css style. to avoid collapse banner overlap with dictionary content. | ||
- imp. zoomfactor cause web page flicker during loading the content. ease this situation in some way. | ||
- remove mouseover32 folder | ||
the mouseover32 folder is old and not crossplatform. see also https://github.com/goldendict/goldendict/issues/1444 | ||
remove all the obsolete entries from ts files. |
Oops, something went wrong.