Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staged'
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed May 5, 2024
2 parents 3dddb3b + 09abc38 commit 55293f1
Show file tree
Hide file tree
Showing 180 changed files with 9,362 additions and 4,121 deletions.
8 changes: 8 additions & 0 deletions .github/scripts/windows-publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ function Main() {
# Copy-Item -Path $multimedia -Destination $archiveName\plugins -Recurse
# }

$multimedia_ffmpeg_av_dll="{0}\bin\av*.dll" -f $env:QTDIR.Trim()
$multimedia_ffmpeg_sw_dll="{0}\bin\sw*.dll" -f $env:QTDIR.Trim()
if (Test-Path $multimedia_ffmpeg_av_dll && Test-Path $multimedia_ffmpeg_sw_dll) {
Write-Host "copy multimedia_ffmpeg_dlls $($multimedia_ffmpeg_av_dll) $($multimedia_ffmpeg_sw_dll) from qt"
Copy-Item -Path $multimedia_ffmpeg_av_dll -Destination $archiveName\
Copy-Item -Path $multimedia_ffmpeg_sw_dll -Destination $archiveName\
}

Write-Host "compress zip..."
# 打包zip
Compress-Archive -Path $archiveName -DestinationPath $archiveName'.zip'
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/AutoTag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- dev
- master
- experimental

paths-ignore:
- 'docs/**'
Expand All @@ -21,12 +22,12 @@ jobs:
runs-on: ubuntu-latest

env:
version: 24.01.22
version-suffix: LoongYear
prerelease: false
version: 24.05.05
version-suffix: ${{ !contains(github.ref_name,'master') && 'alpha' || 'LiXia' }}
prerelease: ${{ !contains(github.ref_name,'master') }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: set git short sha
id: vars
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Sonar Cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ jobs:
sudo apt install openjdk-17-jdk openjdk-17-jre
java -version
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install sonar-scanner and build-wrapper
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/auto format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
# - dev
# - master
- staged
- experimental
paths-ignore:
- "docs/**"
# - ".github/**"
Expand All @@ -18,7 +19,7 @@ jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
- uses: actions/checkout@v4
with:

fetch-depth: 2
Expand All @@ -35,10 +36,10 @@ jobs:
css-js-html-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/cmake build check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- dev
- master
- experimental
- staged
paths-ignore:
- 'docs/**'
Expand All @@ -26,7 +27,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
version: 6.6.3
arch: gcc_64

#serialport linuxdeploy need serialport to work.
Expand All @@ -50,7 +51,7 @@ jobs:
sudo make install
cd ..
sudo apt-get install libzim-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: false
Expand All @@ -77,7 +78,7 @@ jobs:
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
setup-python: 'false'
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
Expand All @@ -103,7 +104,7 @@ jobs:
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
setup-python: 'false'
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/macos-homebrew-PR-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches:
- dev
- master
- experimental
- staged
paths-ignore:
- 'docs/**'
Expand All @@ -25,7 +26,7 @@ jobs:
strategy:
matrix:
os: [macos-12]
qt_ver: [6.5.1]
qt_ver: [6.6.3]
qt_arch: [clang_64]
env:
targetName: GoldenDict
Expand All @@ -38,7 +39,7 @@ jobs:
arch: ${{ matrix.qt_arch }}

modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtspeech
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/macos-homebrew-breakpad.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
qt_arch: [clang_64]
env:
targetName: GoldenDict
version: 24.01.22
version-suffix: LoongYear
prerelease: false
version: 24.02.16
version-suffix: alpha
prerelease: true
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand Down Expand Up @@ -123,12 +123,12 @@ jobs:
- name: changelog
id: changelog
run: |
previousTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 2p)
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p)
echo "previousTag : $previousTag"
echo "prev_tag=$previousTag" >> $GITHUB_OUTPUT
echo "curr_tag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 1p)" >> $GITHUB_OUTPUT
echo "curr_tag=$(git tag --sort=-creatordate | grep "^v" | sed -n 1p)" >> $GITHUB_OUTPUT
- name: Set outputs
id: vars
Expand Down Expand Up @@ -191,7 +191,6 @@ jobs:
overwrite: true
release_name: GoldenDict-ng-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }}
prerelease: ${{env.prerelease}}
target_commit: ${{github.ref}}
body: |
#### Install instructions for Windows, macOS and Linux
Expand All @@ -213,10 +212,10 @@ jobs:
#### Build Details
AppImage: Ubuntu-20.04
Flatpak
macOS: macOS-12 and macOS-13
Windows: Visual studio 2019
based on: ${{github.ref}}
based on: ${{github.ref_name}}
Expand Down
97 changes: 24 additions & 73 deletions .github/workflows/macos-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- dev
- master
- experimental
# - staged
paths-ignore:
- 'docs/**'
Expand All @@ -21,17 +22,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12,macos-13]
qt_ver: [ 6.6.1 ]
os: [macos-12,macos-14]
qt_ver: [ 6.7.0 ]
qt_arch: [clang_64]
env:
targetName: GoldenDict
version: 24.01.22
version-suffix: LoongYear
prerelease: false
version: 24.02.16
version-suffix: ${{ !contains(github.ref_name,'master') && 'alpha' || 'LiXia' }}
prerelease: ${{ !contains(github.ref_name,'master') }}
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand All @@ -43,41 +43,20 @@ jobs:
- name: install deps on macos
run: |
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=TRUE
brew install cmake ninja
brew install automake
brew install autoconf
brew install libtool
brew install opencc
brew install automake git lame libass libtool shtool texi2html theora wget xvid nasm
brew install libiconv
brew install lzo bzip2
brew install libogg
brew install zstd lzip
brew install libvorbis
brew install hunspell
brew install cmake ninja pkg-config create-dmg \
opencc libzim hunspell xapian \
libiconv libogg libvorbis \
lzo bzip2 zstd lzip
git clone https://github.com/xiaoyifang/eb.git
cd eb && ./configure && make -j 8 && sudo make install && cd ..
# brew install xz
brew install pkg-config
brew install create-dmg
brew install xapian
brew install libzim
# brew install dylibbundler
git clone https://github.com/xiaoyifang/macdylibbundler.git
cd macdylibbundler
cmake -B build -DCMAKE_BUILD_TYPE=release
cmake --build build --config release
sudo make install
# find /usr/local -name libzstd.1.dylib
# find /usr/local -name liblzma.5.dylib
- name: version-file
shell: bash
env:
VAR_SUFFIX: ${{env.version-suffix}}
VAR_VERSION: ${{env.version}}
run: |
run: |
current_tag=$(git rev-parse --short=8 HEAD)
release_date=$(date +'%Y%m%d')
echo "$VAR_VERSION-$VAR_SUFFIX.$release_date.$current_tag">version.txt
Expand All @@ -92,43 +71,22 @@ jobs:
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech

- name: compile
run: |
qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=use_xapian CONFIG+=no_ffmpeg_player CONFIG+=no_tts_support
make -j8
run: |
mkdir build_dir
cmake -S . -B build_dir -G Ninja -DWITH_FFMPEG_PLAYER=OFF -DWITH_TTS=OFF -DCMAKE_BUILD_TYPE=Release
cmake --build build_dir
- name: package
run: |
macdeployqt ${targetName}.app -qmldir=. -verbose=1
otool -L GoldenDict.app/Contents/MacOS/GoldenDict
ls -al GoldenDict.app/Contents/Frameworks
find /usr/local/Cellar -name "libicudata.73.dylib" -exec cp {} GoldenDict.app/Contents/Frameworks/ \;
find GoldenDict.app/Contents/Frameworks/ -maxdepth 1 -name "libicu*" -exec ls -al {} \;
find GoldenDict.app/Contents/Frameworks/ -maxdepth 1 -type f -name "libicu*" -exec ls -al {} \;
find GoldenDict.app/Contents/Frameworks/ -maxdepth 1 -type f -name "libzim*" -exec dylibbundler -of -b -x {} -d GoldenDict.app/Contents/Frameworks/ -p @executable_path/../Frameworks -s /usr/local/ -s /opt/ \;
find GoldenDict.app/Contents/Frameworks/ -maxdepth 1 -name "libicu*" -exec dylibbundler -of -b -x {} -d GoldenDict.app/Contents/Frameworks/ -p @executable_path/../Frameworks -s /usr/local/ -s /opt/ \;
otool -L GoldenDict.app/Contents/Frameworks/libicu*
otool -L GoldenDict.app/Contents/Frameworks/libzim*
codesign --force --deep -s - GoldenDict.app
ls -al GoldenDict.app/Contents/Frameworks
mkdir tmp
mv ${targetName}.app ./tmp
# --background "installer_background.png"
create-dmg --hdiutil-verbose --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/
cmake --install build_dir/
- name: changelog
id: changelog
run: |
previousTag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 2p)
run: |
previousTag=$(git tag --sort=-creatordate | grep "^v" | sed -n 2p)
echo "previousTag : $previousTag"
echo "prev_tag=$previousTag" >> $GITHUB_OUTPUT
echo "curr_tag=$(git tag --sort=-creatordate | grep "^v" | grep -v "alpha" | sed -n 1p)" >> $GITHUB_OUTPUT
echo "curr_tag=$(git tag --sort=-creatordate | grep "^v" | sed -n 1p)" >> $GITHUB_OUTPUT
- name: Set outputs
id: vars
Expand Down Expand Up @@ -184,23 +142,19 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.targetName }}.dmg
asset_name: ${{ matrix.qt_ver }}-${{ env.targetName }}_${{ matrix.os }}_homebrew_${{steps.vars.outputs.release_date}}.dmg

file: "*.dmg"
file_glob: true
tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.sha_short }}
overwrite: true
release_name: GoldenDict-ng-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }}
prerelease: ${{env.prerelease}}
target_commit: ${{github.ref}}
body: |
#### Install instructions for Windows, macOS and Linux
<https://xiaoyifang.github.io/goldendict-ng/install/>.
#### Filename pattern (文件名模式): **[Qt version]-GoldenDict-ng-[OS]-[release-date].[ext]**
Qt6.X is recommended for various enhancements.
Windows users can use either `****-installer.exe` (for installer) or `****.zip` (unzip and run).
The `goldendict.exe` can be dropped into previous installation's folder (if dependencies aren't changed).
Expand All @@ -213,13 +167,10 @@ jobs:
#### Build Details
AppImage: Ubuntu-20.04
macOS: macOS-12 and macOS-13
macOS: macOS-12 (x86_64) and macOS-14 (Arm)
Windows: Visual studio 2019
based on: ${{github.ref_name}}
#### Changes
${{steps.build_changelog.outputs.changelog}}
Loading

0 comments on commit 55293f1

Please sign in to comment.