Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/actions/get_mo_files/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Copy mo files from artifacts"

runs:
using: "composite"
steps:
- name: Copy mo files
uses: actions/download-artifact@v4
with:
name: mo-files
path: bin
25 changes: 20 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'

jobs:
generate-mo-files:
uses: ./.github/workflows/generate_mo_files.yml

build-ubuntu:
runs-on: ubuntu-22.04
needs: generate-mo-files
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
Expand Down Expand Up @@ -74,12 +78,15 @@ jobs:

- name: Prepare artifact
run: mv bin/Cemu_release bin/Cemu


- name: Copy MO files
uses: ./.github/actions/get_mo_files

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cemu-bin-linux-x64
path: ./bin/Cemu
path: ./bin

build-appimage:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -112,6 +119,7 @@ jobs:

build-windows:
runs-on: windows-2022
needs: generate-mo-files
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
Expand Down Expand Up @@ -168,15 +176,19 @@ jobs:

- name: Prepare artifact
run: Rename-Item bin/Cemu_release.exe Cemu.exe


- name: Copy MO files
uses: ./.github/actions/get_mo_files

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cemu-bin-windows-x64
path: ./bin/Cemu.exe
path: ./bin

build-macos:
runs-on: macos-14
needs: generate-mo-files
strategy:
matrix:
arch: [x86_64, arm64]
Expand All @@ -185,7 +197,10 @@ jobs:
uses: actions/checkout@v4
with:
submodules: "recursive"


- name: Copy MO files
uses: ./.github/actions/get_mo_files

- name: Setup release mode parameters
run: |
echo "BUILD_MODE=release" >> $GITHUB_ENV
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ jobs:

- name: Create release from windows-bin
run: |
ls ./
ls ./bin/
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
mv cemu-bin-windows-x64 ./${{ env.CEMU_FOLDER_NAME }}
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
rm -r ./${{ env.CEMU_FOLDER_NAME }}

Expand All @@ -129,10 +126,7 @@ jobs:

- name: Create release from linux-bin
run: |
ls ./
ls ./bin/
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
mv cemu-bin-linux-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
mv cemu-bin-linux-x64 ./${{ env.CEMU_FOLDER_NAME }}
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-22.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
rm -r ./${{ env.CEMU_FOLDER_NAME }}

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/generate_mo_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Generate mo files
on: workflow_call

jobs:
generate-mo-files:
runs-on: ubuntu-latest

steps:
- name: Checkout Cemu-Language repo
uses: actions/checkout@v2
with:
repository: Cemu-Project/Cemu-Language
path: Cemu-Language

- name: Install gettext
run: sudo apt-get install -y gettext

- name: Convert .po to .mo
working-directory: Cemu-Language
run: |
for po_file in $(find . -name "*.po"); do
mo_file="${po_file%.po}.mo"
msgfmt $po_file -o $mo_file || true # skip invalid .po files
done
mkdir mo-files
find -name "*.mo" | xargs cp --parents -t mo-files

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: mo-files
path: Cemu-Language/mo-files
43 changes: 0 additions & 43 deletions .github/workflows/generate_pot.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/update_language_repository.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Update language repository

on:
workflow_dispatch:
push:
paths-ignore:
- "*.md"
branches:
- main

jobs:
update-language-repository:
runs-on: ubuntu-latest
steps:
- name: Checkout main repo
uses: actions/checkout@v3
with:
path: Cemu

- name: Install gettext
run: |
sudo apt update -qq
sudo apt install -y gettext

- name: Generate POT file using xgettext
working-directory: Cemu
run: >
find src -name *.cpp -o -name *.hpp -o -name *.h |
xargs xgettext --from-code=utf-8 -w 100
--keyword="_" --keyword="wxTRANSLATE" --keyword="wxPLURAL:1,2"
--keyword="_tr" --keyword="TR_NOOP"
--check=space-ellipsis --omit-header
-o cemu.pot

- name: Checkout language repo
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/Cemu-Language
path: Cemu-Language
token: ${{ secrets.CI_CEMU_LANG_PUSH_TOKEN }}

- name: Copy POT file
run: |
mkdir -p Cemu-Language/resources/en
cp Cemu/cemu.pot Cemu-Language/resources/en

- name: Commit and push POT file
run: |
cd Cemu-Language
git config user.name "Cemu-Language CI"
git config user.email "[email protected]"
git add resources/en/cemu.pot
git commit -m "Update POT file" || exit 0 # Don't fail if no changes
git push
Binary file removed bin/resources/ar/‏‏cemu.mo
Binary file not shown.
Binary file removed bin/resources/ca/cemu.mo
Binary file not shown.
Binary file removed bin/resources/de/cemu.mo
Binary file not shown.
Binary file removed bin/resources/es/cemu.mo
Binary file not shown.
Binary file removed bin/resources/fr/cemu.mo
Binary file not shown.
Binary file removed bin/resources/he/cemu.mo
Binary file not shown.
Binary file removed bin/resources/hu/cemu.mo
Binary file not shown.
Binary file removed bin/resources/it/cemu.mo
Binary file not shown.
Binary file removed bin/resources/ja/cemu.mo
Binary file not shown.
Binary file removed bin/resources/ko/cemu.mo
Binary file not shown.
Binary file removed bin/resources/nb/cemu.mo
Binary file not shown.
Binary file removed bin/resources/nl/cemu.mo
Binary file not shown.
Binary file removed bin/resources/pl/cemu.mo
Binary file not shown.
Binary file removed bin/resources/pt/cemu.mo
Binary file not shown.
Binary file removed bin/resources/ru/cemu.mo
Binary file not shown.
Binary file removed bin/resources/sv/cemu.mo
Binary file not shown.
Binary file removed bin/resources/tr/cemu.mo
Binary file not shown.
Binary file removed bin/resources/uk/cemu.mo
Binary file not shown.
Binary file removed bin/resources/zh/cemu.mo
Binary file not shown.
Loading