From c5112a31201b4c77eb97330f0555386ca762ee63 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Wed, 1 Feb 2023 23:23:23 +0800 Subject: [PATCH] action:modify action to support iconv --- .github/workflows/macos-homebrew-PR-check.yml | 3 ++- .github/workflows/ubuntu-PR-check.yml | 4 ++-- .github/workflows/windows-6.x-xapian.yml | 2 +- .github/workflows/windows-6.x.yml | 2 +- .github/workflows/windows-PR-check.yml | 2 +- .github/workflows/windows.yml | 2 +- README.md | 9 +++++++++ 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/macos-homebrew-PR-check.yml b/.github/workflows/macos-homebrew-PR-check.yml index 9d16745c..1b729b11 100644 --- a/.github/workflows/macos-homebrew-PR-check.yml +++ b/.github/workflows/macos-homebrew-PR-check.yml @@ -73,9 +73,10 @@ jobs: #brew install qt # or use official offline installer brew install xz lzo brew install pkg-config + brew install libiconv - name: compile run: | - qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=no_extra_tiff_handler #CONFIG+=no_epwing_support # CONFIG+=no_ffmpeg_player #CONFIG+=no_qtmultimedia_player + qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=no_extra_tiff_handler CONFIG+=use_iconv #CONFIG+=no_epwing_support # CONFIG+=no_ffmpeg_player #CONFIG+=no_qtmultimedia_player make diff --git a/.github/workflows/ubuntu-PR-check.yml b/.github/workflows/ubuntu-PR-check.yml index 26da90b6..c463622a 100644 --- a/.github/workflows/ubuntu-PR-check.yml +++ b/.github/workflows/ubuntu-PR-check.yml @@ -57,7 +57,7 @@ jobs: 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 doxygen libzstd-dev #libopencc-dev - sudo apt-get install libxkbcommon-dev + sudo apt-get install libxkbcommon-dev libc6-dev sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld git clone https://github.com/BYVoid/OpenCC pwd @@ -71,7 +71,7 @@ jobs: - name: build goldendict run: | - qmake CONFIG+=release CONFIG+=no_extra_tiff_handler PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support + qmake CONFIG+=release CONFIG+=no_extra_tiff_handler PREFIX=/usr CONFIG+=zim_support CONFIG+=chinese_conversion_support CONFIG+=use_iconv make INSTALL_ROOT=appdir -j`nproc` install; find appdir/ #copy missing shared dll to appdir. diff --git a/.github/workflows/windows-6.x-xapian.yml b/.github/workflows/windows-6.x-xapian.yml index 66034e06..ed7cf43a 100644 --- a/.github/workflows/windows-6.x-xapian.yml +++ b/.github/workflows/windows-6.x-xapian.yml @@ -90,7 +90,7 @@ jobs: id: build shell: cmd run: | - qmake "CONFIG+=zim_support" CONFIG+=release CONFIG+=use_xapian + qmake "CONFIG+=zim_support" CONFIG+=release CONFIG+=use_xapian CONFIG+=use_iconv nmake echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% diff --git a/.github/workflows/windows-6.x.yml b/.github/workflows/windows-6.x.yml index 0d4fc10b..89fecf95 100644 --- a/.github/workflows/windows-6.x.yml +++ b/.github/workflows/windows-6.x.yml @@ -91,7 +91,7 @@ jobs: id: build shell: cmd run: | - qmake "CONFIG+=zim_support" CONFIG+=release + qmake "CONFIG+=zim_support" CONFIG+=release CONFIG+=use_iconv nmake echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% diff --git a/.github/workflows/windows-PR-check.yml b/.github/workflows/windows-PR-check.yml index 11fd327e..7948260b 100644 --- a/.github/workflows/windows-PR-check.yml +++ b/.github/workflows/windows-PR-check.yml @@ -60,5 +60,5 @@ jobs: id: build shell: cmd run: | - qmake "CONFIG+=zim_support" CONFIG+=release + qmake "CONFIG+=zim_support" CONFIG+=release CONFIG+=use_iconv nmake diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 52ed92f8..887b6993 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -92,7 +92,7 @@ jobs: 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" CONFIG+=release + qmake "CONFIG+=zim_support" CONFIG+=release CONFIG+=use_iconv nmake echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% diff --git a/README.md b/README.md index ffa6f534..90639061 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,15 @@ use `CONFIG+=use_xapian` to enable this feature. when enabled ,xapian will be us qmake "CONFIG+=use_xapian" ``` +use `CONFIG+=use_iconv` to enable this feature. when enabled ,iconv will be used to convert encoding other than the QTextCodec(which will be deprecated in future Qt version) + +``` +qmake "CONFIG+=use_iconv" +``` + +when enabled ,iconv should be installed on the platform at the same time. + + ## Contributing All kinds of help like answering questions, bug reporting, testing translation and coding are welcomed.