mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 08:34:08 +00:00
commit
a84febafcc
195
.github/workflows/PR-check-cmake.yml
vendored
195
.github/workflows/PR-check-cmake.yml
vendored
|
@ -11,132 +11,115 @@ on:
|
||||||
- experimental
|
- experimental
|
||||||
- staged
|
- staged
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- "docs/**"
|
||||||
# - ".github/**"
|
|
||||||
- "howto/**"
|
|
||||||
- "*.md"
|
- "*.md"
|
||||||
- "locale/**"
|
- "locale/**"
|
||||||
|
- "website/**"
|
||||||
jobs:
|
jobs:
|
||||||
job1:
|
job_ubuntu_build_check:
|
||||||
name: ubuntu Build and analyze
|
name: ubuntu Build and analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v3
|
- name: Install dependencies
|
||||||
with:
|
|
||||||
python-version: '3.9'
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
# Qt6.4 for testing ubuntu LTS
|
|
||||||
version: 6.4.3
|
|
||||||
arch: gcc_64
|
|
||||||
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
|
|
||||||
setup-python: 'false'
|
|
||||||
|
|
||||||
- name: ubuntu install thirdparty dependencies
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install git pkg-config build-essential
|
sudo apt-get install build-essential ninja-build \
|
||||||
sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev
|
libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
|
||||||
sudo apt-get install libxtst-dev liblzo2-dev libbz2-dev
|
libxtst-dev liblzo2-dev libbz2-dev \
|
||||||
sudo apt-get install libavutil-dev libavformat-dev libeb16-dev
|
libavutil-dev libavformat-dev libeb16-dev \
|
||||||
sudo apt-get install doxygen libzstd-dev libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0
|
libzstd-dev libxkbcommon-dev \
|
||||||
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld
|
libxapian-dev libzim-dev libopencc-dev \
|
||||||
sudo apt install libxapian-dev
|
qt6-5compat-dev \
|
||||||
|
qt6-base-dev \
|
||||||
#build opencc
|
qt6-multimedia-dev \
|
||||||
git clone https://github.com/BYVoid/OpenCC
|
qt6-speech-dev \
|
||||||
cd OpenCC/
|
qt6-svg-dev \
|
||||||
make PREFIX=/usr -j$(nproc)
|
qt6-tools-dev \
|
||||||
sudo make install
|
qt6-tools-dev-tools \
|
||||||
cd ..
|
qt6-webchannel-dev \
|
||||||
sudo apt-get install libzim-dev
|
qt6-webengine-dev
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
submodules: false
|
submodules: false
|
||||||
|
- name: Run build
|
||||||
- name: Run build-wrapper
|
|
||||||
run: |
|
run: |
|
||||||
cmake .
|
mkdir build_dir
|
||||||
cmake --build .
|
cmake -S . \
|
||||||
|
-B ./build_dir \
|
||||||
|
-G Ninja
|
||||||
|
cmake --build ./build_dir
|
||||||
|
job_macos_build_check:
|
||||||
|
name: macos Build and analyze
|
||||||
|
runs-on: macos-12
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
|
submodules: false
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
brew install \
|
||||||
|
ninja \
|
||||||
|
opencc \
|
||||||
|
ffmpeg \
|
||||||
|
libao \
|
||||||
|
libiconv \
|
||||||
|
bzip2 \
|
||||||
|
lzip \
|
||||||
|
libvorbis \
|
||||||
|
hunspell \
|
||||||
|
xapian \
|
||||||
|
libzim \
|
||||||
|
qt
|
||||||
|
|
||||||
job2:
|
wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2
|
||||||
|
tar xvjf eb-4.4.3.tar.bz2
|
||||||
|
cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd ..
|
||||||
|
|
||||||
|
- name: Run build
|
||||||
|
run: |
|
||||||
|
mkdir build_dir
|
||||||
|
cmake -S . \
|
||||||
|
-B ./build_dir \
|
||||||
|
-G Ninja
|
||||||
|
cmake --build ./build_dir
|
||||||
|
|
||||||
|
job_window_build_check:
|
||||||
name: windows Build and analyze
|
name: windows Build and analyze
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: '3.9'
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
version: 6.5.1
|
version: 6.7.2
|
||||||
arch: win64_msvc2019_64
|
arch: win64_msvc2019_64
|
||||||
|
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
|
||||||
#serialport linuxdeploy need serialport to work.
|
|
||||||
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
|
|
||||||
setup-python: 'false'
|
setup-python: 'false'
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
submodules: true
|
submodules: true
|
||||||
|
- name: Setup vcpkg github caches variables
|
||||||
- name: Run build-wrapper
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
|
- name: Run build
|
||||||
|
id: build
|
||||||
|
env:
|
||||||
|
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -DWITH_FFMPEG_PLAYER=OFF
|
# Launch-VsDevShell also provides Ninja
|
||||||
cmake --build . --config Release
|
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' `
|
||||||
job3:
|
-SkipAutomaticLocation -Arch amd64 -HostArch amd64
|
||||||
name: macos Build and analyze
|
|
||||||
runs-on: macos-12
|
|
||||||
steps:
|
|
||||||
- uses: actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: '3.9'
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: 6.5.1
|
|
||||||
arch: clang_64
|
|
||||||
|
|
||||||
#serialport linuxdeploy need serialport to work.
|
New-Item -Path './build_dir' -ItemType Directory
|
||||||
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech qtserialport
|
cmake -S . -B "./build_dir" `
|
||||||
setup-python: 'false'
|
-G Ninja `
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
-DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" `
|
||||||
- uses: actions/checkout@v4
|
-DWITH_FFMPEG_PLAYER=OFF `
|
||||||
with:
|
-DUSE_VCPKG=ON `
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" `
|
||||||
submodules: false
|
-DWITH_VCPKG_BREAKPAD=ON
|
||||||
- name: install dependencies
|
cmake --build "./build_dir"
|
||||||
run: |
|
|
||||||
brew install pcre2 harfbuzz freetype
|
|
||||||
brew install cmake ninja python
|
|
||||||
brew install automake
|
|
||||||
brew install autoconf
|
|
||||||
brew install libtool
|
|
||||||
brew install opencc
|
|
||||||
|
|
||||||
brew install speex
|
|
||||||
brew tap homebrew-ffmpeg/ffmpeg
|
|
||||||
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-speex
|
|
||||||
brew install libao
|
|
||||||
brew install libiconv
|
|
||||||
brew install lzo bzip2
|
|
||||||
brew install libogg
|
|
||||||
brew install zstd lzip
|
|
||||||
brew install libvorbis --force
|
|
||||||
brew install hunspell
|
|
||||||
wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2
|
|
||||||
tar xvjf eb-4.4.3.tar.bz2
|
|
||||||
cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd ..
|
|
||||||
#brew install qt # or use official offline installer
|
|
||||||
brew install xz lzo
|
|
||||||
brew install pkg-config
|
|
||||||
brew install xapian
|
|
||||||
brew install libzim
|
|
||||||
brew install icu4c
|
|
||||||
- name: Run build-wrapper
|
|
||||||
run: |
|
|
||||||
cmake .
|
|
||||||
cmake --build .
|
|
||||||
|
|
||||||
|
|
6
.github/workflows/release-macos-homebrew.yml
vendored
6
.github/workflows/release-macos-homebrew.yml
vendored
|
@ -157,14 +157,14 @@ jobs:
|
||||||
file_glob: true
|
file_glob: true
|
||||||
tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.sha_short }}
|
tag: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.sha_short }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
release_name: GoldenDict-ng-v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }}
|
release_name: v${{env.version}}-${{env.version-suffix}}.${{ steps.vars.outputs.release_hm }}.${{ steps.vars.outputs.sha_short }}
|
||||||
prerelease: ${{env.prerelease}}
|
prerelease: ${{env.prerelease}}
|
||||||
body: |
|
body: |
|
||||||
[Install instructions for Windows, macOS and Linux](https://xiaoyifang.github.io/goldendict-ng/install/).
|
[Install instructions for Windows, macOS and Linux](https://xiaoyifang.github.io/goldendict-ng/install/).
|
||||||
|
|
||||||
Filaname pattern: GoldenDict-[version]-[Qt version]-[system name]-...
|
Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]-...
|
||||||
|
|
||||||
For Linux, released vesion is on Flathub -> [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
||||||
|
|
||||||
Based on branch: ${{github.ref_name}}
|
Based on branch: ${{github.ref_name}}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: Release Windows Vcpkg CMake
|
name: Release Windows CMake
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
@ -147,9 +147,9 @@ jobs:
|
||||||
$changeNotes = "
|
$changeNotes = "
|
||||||
[Install instructions for Windows, macOS and Linux](https://xiaoyifang.github.io/goldendict-ng/install/).
|
[Install instructions for Windows, macOS and Linux](https://xiaoyifang.github.io/goldendict-ng/install/).
|
||||||
|
|
||||||
Filaname pattern: GoldenDict-[version]-[Qt version]-[system name]-...
|
Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]-...
|
||||||
|
|
||||||
For Linux, released vesion is on Flathub -> [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng).
|
||||||
|
|
||||||
Based on branch: ${{github.ref_name}}
|
Based on branch: ${{github.ref_name}}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ jobs:
|
||||||
|
|
||||||
# file name after # is display label
|
# file name after # is display label
|
||||||
|
|
||||||
$namePrefix="GoldenDict-${{env.version}}-Qt${{matrix.qt_ver}}"
|
$namePrefix="GoldenDict-ng-${{env.version}}-Qt${{matrix.qt_ver}}"
|
||||||
|
|
||||||
cd './build_dir'
|
cd './build_dir'
|
||||||
gh release upload "${tagName}" "${namePrefix}.7z#${namePrefix}-Windows.7z" --clobber
|
gh release upload "${tagName}" "${namePrefix}.7z#${namePrefix}-Windows.7z" --clobber
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: Windows-PR-check
|
name: Windows-qmake-PR-check
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
@ -6,19 +6,19 @@ on:
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
pull_request:
|
# pull_request:
|
||||||
branches:
|
# branches:
|
||||||
- dev
|
# - dev
|
||||||
- master
|
# - master
|
||||||
- experimental
|
# - experimental
|
||||||
- staged
|
# - staged
|
||||||
paths-ignore:
|
# paths-ignore:
|
||||||
- 'docs/**'
|
# - 'docs/**'
|
||||||
# - ".github/**"
|
# # - ".github/**"
|
||||||
- "howto/**"
|
# - "howto/**"
|
||||||
- "*.md"
|
# - "*.md"
|
||||||
- "locale/**"
|
# - "locale/**"
|
||||||
- "website/**"
|
# - "website/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
|
@ -270,7 +270,7 @@ if (APPLE)
|
||||||
--volicon ${CMAKE_SOURCE_DIR}/icons/macicon.icns \
|
--volicon ${CMAKE_SOURCE_DIR}/icons/macicon.icns \
|
||||||
--icon \"${App_Name}\" 100 100
|
--icon \"${App_Name}\" 100 100
|
||||||
--app-drop-link 300 100 \
|
--app-drop-link 300 100 \
|
||||||
\"GoldenDict-${CMAKE_PROJECT_VERSION}-Qt${Qt6_VERSION}-macOS-${CMAKE_SYSTEM_PROCESSOR}.dmg\" \
|
\"GoldenDict-ng-${CMAKE_PROJECT_VERSION}-Qt${Qt6_VERSION}-macOS-${CMAKE_SYSTEM_PROCESSOR}.dmg\" \
|
||||||
\"${Assembling_Dir}\")"
|
\"${Assembling_Dir}\")"
|
||||||
)
|
)
|
||||||
else ()
|
else ()
|
||||||
|
@ -353,7 +353,7 @@ if (WIN32)
|
||||||
PATTERN "*.ilk" EXCLUDE)
|
PATTERN "*.ilk" EXCLUDE)
|
||||||
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_FILE_NAME "GoldenDict-${PROJECT_VERSION}-Qt${Qt6Widgets_VERSION}")
|
set(CPACK_PACKAGE_FILE_NAME "GoldenDict-ng-${PROJECT_VERSION}-Qt${Qt6Widgets_VERSION}")
|
||||||
set(CPACK_GENERATOR "7Z;NSIS64")
|
set(CPACK_GENERATOR "7Z;NSIS64")
|
||||||
|
|
||||||
# override the default install path, which is $PROGRAMFILES64\${project-name} ${project-version} in NSIS
|
# override the default install path, which is $PROGRAMFILES64\${project-name} ${project-version} in NSIS
|
||||||
|
|
Loading…
Reference in a new issue