Skip to content

update translation #652

update translation

update translation #652

Workflow file for this run

name: CI
on:
push:
paths:
- "*.pro"
- "package/**"
- "src/**"
- ".github/workflows/ci.yml"
pull_request:
paths:
- "*.pro"
- "package/**"
- "src/**"
- ".github/workflows/ci.yml"
jobs:
create-release:
if: ${{ !startsWith(github.event.ref, 'refs/tags/') }}
name: Create Pre-Release
runs-on: ubuntu-latest
needs:
- build-on-ubuntu
- build-on-win-mingw
- build-on-osx
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: recursive
- name: Set Env
shell: bash
run: |
export VERSION=$(grep -o '".*"' src/version.h | sed 's/"//g')-build.$GITHUB_RUN_NUMBER
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
merge-multiple: true
- name: Get short commit sha
id: get_short_sha
run: |
short_sha=$(echo ${GITHUB_SHA} | cut -c1-7)
echo "::set-output name=short_sha::$short_sha"
- name: Create Github pre-release
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.VERSION }}"
prerelease: true
title: "Mod Manager Dev ${{ env.VERSION }} (${{ steps.get_short_sha.outputs.short_sha }})"
files: |
artifacts/**
build-on-ubuntu:
name: Build On Ubuntu
runs-on: ubuntu-24.04 # for libquazip1-qt5 available
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 5.15.2
modules: qtwebengine
- name: ubuntu install packages
run: |
sudo apt update
sudo apt-get install -y libglew-dev libglfw3-dev
sudo apt-get install -y libaria2-0-dev libquazip1-qt5-dev
sudo apt install -y libgl-dev libx11-dev libxkbcommon-x11-dev libxcb-util1 libxcb-image0-dev libxcb-icccm4-dev libssl-dev libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0
sudo apt install -y libprotobuf-dev protobuf-compiler protobuf-c-compiler libgrpc++-dev protobuf-compiler-grpc ninja-build fcitx-frontend-qt5 libcurl4-openssl-dev
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set Env
run: |
export ARCH=x86_64
export RAW_VERSION=$(grep -o '".*"' src/version.h | sed 's/"//g')
export VERSION=$RAW_VERSION-build.$GITHUB_RUN_NUMBER
export RELEASE_TEXT=$(grep -Pzo "### ${VERSION}\n(\n|.)+?\n##" Changelog.md | sed '$ d')
echo "RAW_VERSION=${RAW_VERSION}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "RELEASE_TEXT<<EOF" >> $GITHUB_ENV
echo "${RELEASE_TEXT}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Modify version number
if: ${{ !startsWith(github.event.ref, 'refs/tags/') }}
shell: bash
run: |
sed -i "s/$RAW_VERSION/$VERSION/" src/version.h
- name: build ubuntu
run: |
export PKG_CONFIG_PATH='/usr/lib/x86_64-linux-gnu/pkgconfig/'
qmake
make
- name: package
run: |
make INSTALL_ROOT=AppDir -j2 install ; find AppDir/
wget -c -nv https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) #Thanks to github page change.
chmod +x appimagetool-*.AppImage
sudo mkdir -p /home/qt/work/install
sudo ln -s $QT_PLUGIN_PATH /home/qt/work/install/plugins
./appimagetool-*.AppImage -s deploy AppDir/usr/share/applications/*.desktop
./appimagetool-*.AppImage AppDir
- uses: actions/upload-artifact@v4
with:
name: ModManager-${{ env.VERSION }}-x86_64.AppImage
path: Mod_Manager*.AppImage
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Mod_Manager-${{ env.VERSION }}-x86_64.AppImage
asset_name: ModManager-${{ env.VERSION }}-x86_64.AppImage
tag: ${{ github.ref }}
body: ${{ env.RELEASE_TEXT }}
overwrite: true
build-on-win-mingw:
name: Build On Windows Mingw
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
# - qt_arch: win64_mingw
# qt_ver: 6.7.1
# modules: qt5compat
- qt_arch: win64_mingw81
qt_ver: 5.15.2
qt_tools_mingw_install: mingw810_64
modules:
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
host: 'windows'
target: 'desktop'
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
modules: ${{ matrix.modules }}
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Set Env
shell: bash
run: |
export RAW_VERSION=$(grep -o '".*"' src/version.h | sed 's/"//g')
export VERSION=$RAW_VERSION-build.$GITHUB_RUN_NUMBER
echo "RAW_VERSION=${RAW_VERSION}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Modify version number
if: ${{ !startsWith(github.event.ref, 'refs/tags/') }}
shell: bash
run: |
sed -i "s/$RAW_VERSION/$VERSION/" src/version.h
- name: Install dependencies for Qt 5
if: ${{ startsWith( matrix.qt_ver, 5 ) }}
shell: powershell
run: |
C:/msys64/usr/bin/pacman -S mingw-w64-x86_64-aria2 --noconfirm
C:/msys64/usr/bin/pacman -S mingw-w64-x86_64-quazip-qt5 --noconfirm
C:/msys64/usr/bin/pacman -S mingw-w64-x86_64-pkg-config --noconfirm
C:/msys64/usr/bin/pacman -Q
- name: Install dependencies for Qt 6
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
shell: powershell
run: |
C:/msys64/usr/bin/pacman -S mingw-w64-x86_64-aria2 --noconfirm
C:/msys64/usr/bin/pacman -S mingw-w64-x86_64-quazip-qt6 --noconfirm
C:/msys64/usr/bin/pacman -S mingw-w64-x86_64-pkg-config --noconfirm
- name: environment configuration
shell: pwsh
run: |
Write-Output "${{ env.QT_ROOT_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Write-Output "${{ env.QT_ROOT_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: where is qmake & where is mingw32-make
shell: pwsh
run: |
Get-Command -Name 'qmake' | Format-List
Get-Command -Name 'mingw32-make' | Format-List
- name: mingw-build
id: build
shell: pwsh
env:
PKG_CONFIG_PATH: 'C:/msys64/mingw64/lib/pkgconfig'
run: |
cp C:/msys64/mingw64/bin/pkg-config.exe ${{ env.QT_ROOT_DIR }}/bin/
qmake
mingw32-make.exe qmake_all
mingw32-make.exe
- name: list msys dll
shell: pwsh
run : |
ls C:/msys64/mingw64/bin
ls ${{ env.QT_ROOT_DIR }}/bin
- name: package Qt5
if: ${{ startsWith( matrix.qt_ver, 5 ) }}
id: package-qt5
shell: pwsh
run: |
mkdir deploy
mv release/modmanager.exe deploy
windeployqt.exe --no-translations --no-opengl-sw --no-system-d3d-compiler --no-quick-import --qmldir "${{ env.QT_ROOT_DIR }}/qml" deploy/modmanager.exe
iwr "https://github.com/kaniol-lck/modmanager/releases/download/v1.1.1-build.543/ModManager-v1.1.1-build.543-x64-packed.zip" -OutFile ModManager-v1.1.1-build.543-x64-packed.zip
unzip *.zip -d old
cp old/libaria2-0.dll deploy/
cp old/libcares-5.dll deploy/
cp old/libcrypto-1_1-x64.dll deploy/
cp old/libssl-1_1-x64.dll deploy/
cp C:/msys64/mingw64/bin/libquazip1-qt5.dll deploy/
cp C:/msys64/mingw64/bin/libcrypto-3-x64.dll deploy/
cp C:/msys64/mingw64/bin/libbz2-1.dll deploy/
cp C:/msys64/mingw64/bin/libiconv-2.dll deploy/
cp C:/msys64/mingw64/bin/liblzma-5.dll deploy/
cp C:/msys64/mingw64/bin/libintl-8.dll deploy/
cp C:/msys64/mingw64/bin/zlib1.dll deploy/
cp C:/msys64/mingw64/bin/libstdc++-6.dll deploy/
cp C:/msys64/mingw64/bin/libsqlite3-0.dll deploy/
cp C:/msys64/mingw64/bin/libssh2-1.dll deploy/
cp C:/msys64/mingw64/bin/libxml2-2.dll deploy/
cp C:/msys64/mingw64/bin/libgcc_s_seh-1.dll deploy/
- name: package Qt6
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
id: package-qt6
shell: pwsh
run: |
mkdir deploy
mv release/modmanager.exe deploy
windeployqt6.exe --no-translations --no-opengl-sw --no-system-d3d-compiler --no-quick-import --qmldir "${{ env.QT_ROOT_DIR }}/qml" deploy/modmanager.exe
cp C:/msys64/mingw64/bin/Qt6Core5Compat.dll deploy/
cp C:/msys64/mingw64/bin/libaria2-0.dll deploy/
cp C:/msys64/mingw64/bin/libb2-1.dll deploy/
cp C:/msys64/mingw64/bin/libbrotlicommon.dll deploy/
cp C:/msys64/mingw64/bin/libbrotlidec.dll deploy/
cp C:/msys64/mingw64/bin/libbz2-1.dll deploy/
cp C:/msys64/mingw64/bin/libcares-2.dll deploy/
# cp C:/msys64/mingw64/bin/libcrypto-1_1-x64.dll deploy/
cp C:/msys64/mingw64/bin/libcrypto-3-x64.dll deploy/
cp C:/msys64/mingw64/bin/libdouble-conversion.dll deploy/
cp C:/msys64/mingw64/bin/libfreetype-6.dll deploy/
cp C:/msys64/mingw64/bin/libglib-2.0-0.dll deploy/
cp C:/msys64/mingw64/bin/libgraphite2.dll deploy/
cp C:/msys64/mingw64/bin/libharfbuzz-0.dll deploy/
cp C:/msys64/mingw64/bin/libiconv-2.dll deploy/
cp C:/msys64/mingw64/bin/libicudt75.dll deploy/
cp C:/msys64/mingw64/bin/libicuin75.dll deploy/
cp C:/msys64/mingw64/bin/libicuuc75.dll deploy/
cp C:/msys64/mingw64/bin/libintl-8.dll deploy/
cp C:/msys64/mingw64/bin/liblzma-5.dll deploy/
cp C:/msys64/mingw64/bin/libmd4c.dll deploy/
cp C:/msys64/mingw64/bin/libpcre2-16-0.dll deploy/
cp C:/msys64/mingw64/bin/libpcre2-8-0.dll deploy/
cp C:/msys64/mingw64/bin/libpng16-16.dll deploy/
cp C:/msys64/mingw64/bin/libquazip1-qt6.dll deploy/
cp C:/msys64/mingw64/bin/libsqlite3-0.dll deploy/
cp C:/msys64/mingw64/bin/libssh2-1.dll deploy/
# cp C:/msys64/mingw64/bin/libssl-1_1-x64.dll deploy/
cp C:/msys64/mingw64/bin/libxml2-2.dll deploy/
cp C:/msys64/mingw64/bin/libzstd.dll deploy/
cp C:/msys64/mingw64/bin/zlib1.dll deploy/
- name: Modify NSIS for x64
shell: pwsh
run: |
(Get-Content package/modmanager.nsi).replace('PROGRAMFILES', 'PROGRAMFILES64') | Set-Content package/modmanager.nsi
- name: Create installer
shell: pwsh
run: |
makensis package/modmanager.nsi
mv package/ModManager-Installer.exe ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-x64-Installer.exe
Compress-Archive -DestinationPath ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-x64-packed.zip -Path deploy/*
- uses: actions/upload-artifact@v4
with:
name: ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-x64-Installer.exe
path: ${{github.workspace}}/ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-x64-Installer.exe
- uses: actions/upload-artifact@v4
with:
name: ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-x64-packed
path: ${{github.workspace}}/ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-x64-packed.zip
- name: Upload Release
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: package/ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-Installer.exe
asset_name: ModManager-${{ env.VERSION }}-${{ matrix.qt_ver }}-x64-Installer.exe
tag: ${{ github.ref }}
overwrite: true
build-on-osx:
name: Build On OSX
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-13]
qt_ver: [6.7.1]
qt_arch: [clang_64]
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_ver }}
host: 'mac'
target: 'desktop'
arch: ${{ matrix.qt_arch }}
modules: 'qt5compat'
- name: Install libaria2
run: |
wget "https://github.com/kaniol-lck/aria2/releases/download/1.36.0/libaria2-libs-clang-macos-13-openssl-with-bt.zip"
unzip *.zip
csrutil status
sudo cp -r lib/ /usr/local/lib/
sudo cp -r include/ /usr/local/include/
rm -rf lib/ include/ *.zip
- name: Install dependencies
run: |
brew install quazip gnu-sed aria2
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set Env
shell: bash
run: |
export RAW_VERSION=$(grep -o '".*"' src/version.h | sed 's/"//g')
export VERSION=$RAW_VERSION-build.$GITHUB_RUN_NUMBER
echo "RAW_VERSION=${RAW_VERSION}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Modify version number
if: ${{ !startsWith(github.event.ref, 'refs/tags/') }}
shell: bash
run: |
gsed -i "s/$RAW_VERSION/$VERSION/" src/version.h
- name: build macos
run: |
qmake
make
- name: package
run: |
macdeployqt modmanager.app -qmldir=. -verbose=1 -dmg
mv modmanager.dmg ModManager-${{ env.VERSION }}.dmg
shell: sh
- uses: actions/upload-artifact@v4
with:
name: ModManager-${{ env.VERSION }}.dmg
path: ModManager-${{ env.VERSION }}.dmg
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ModManager-${{ env.VERSION }}.dmg
asset_name: ModManager-${{ env.VERSION }}.dmg
tag: ${{ github.ref }}
overwrite: true