From 45dd0aeb41117965bad23be299fbfafae2bbccdc Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Sun, 3 Jan 2021 17:28:02 -0800 Subject: [PATCH 1/3] Add Translation flag -DENABLE_QT_TRANSLATION=ON --- .github/workflows/docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.sh b/.github/workflows/docker.sh index 5bb3f364d..007494245 100644 --- a/.github/workflows/docker.sh +++ b/.github/workflows/docker.sh @@ -16,7 +16,7 @@ find . -name "CMakeLists.txt" -exec sed -i 's/-Werror/-W/g' {} + mkdir build && cd build -cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DTITLE_BAR_FORMAT_IDLE="$title" -DTITLE_BAR_FORMAT_RUNNING="$title | {3}" -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DGIT_BRANCH="HEAD" -DGIT_DESC="$msvc" -DUSE_DISCORD_PRESENCE=ON +cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DTITLE_BAR_FORMAT_IDLE="$title" -DTITLE_BAR_FORMAT_RUNNING="$title | {3}" -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DGIT_BRANCH="HEAD" -DGIT_DESC="$msvc" -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON ninja From ddf1ee70faccecb1fd6334093dba01b8149f3ae7 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Sun, 3 Jan 2021 17:29:56 -0800 Subject: [PATCH 2/3] fix .desktop file replace Exec=yuzu %f with Exec=env QT_QPA_PLATFORMTHEME=gtk3 yuzu %f using sed --- .github/workflows/appimage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/appimage.sh b/.github/workflows/appimage.sh index c8933c76e..3d88d4fc2 100644 --- a/.github/workflows/appimage.sh +++ b/.github/workflows/appimage.sh @@ -25,6 +25,7 @@ cp -P "$BUILDBIN"/yuzu $HOME/squashfs-root/usr/bin/ curl -sL https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/dist/yuzu.svg -o ./squashfs-root/yuzu.svg curl -sL https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/dist/yuzu.desktop -o ./squashfs-root/yuzu.desktop + sed -i -e 's#Exec=yuzu %f#Exec=env QT_QPA_PLATFORMTHEME=gtk3 yuzu %f#g' ./squashfs-root/yuzu.desktop curl -sL https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64 -o ./squashfs-root/runtime mkdir -p squashfs-root/usr/share/applications && cp ./squashfs-root/yuzu.desktop ./squashfs-root/usr/share/applications mkdir -p squashfs-root/usr/share/icons && cp ./squashfs-root/yuzu.svg ./squashfs-root/usr/share/icons From 7fc5baf96631b22171b541fca7eac1b3469ba7e6 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Sun, 3 Jan 2021 18:14:12 -0800 Subject: [PATCH 3/3] Create icon.patch --- patches/icon.patch | 95 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 patches/icon.patch diff --git a/patches/icon.patch b/patches/icon.patch new file mode 100644 index 000000000..5d415f8a5 --- /dev/null +++ b/patches/icon.patch @@ -0,0 +1,95 @@ +From a1a3e1e46676c382332f5acb79888cb092e4e177 Mon Sep 17 00:00:00 2001 +From: pineappleEA <67879877+pineappleEA@users.noreply.github.com> +Date: Fri, 1 Jan 2021 22:36:54 +0200 +Subject: [PATCH 1/4] Add Qt Resource Collection File + +This points the main.ui file to the location of yuzu.ico +--- + src/yuzu/yuzu.qrc | 5 +++++ + 1 file changed, 5 insertions(+) + create mode 100644 src/yuzu/yuzu.qrc + +diff --git a/src/yuzu/yuzu.qrc b/src/yuzu/yuzu.qrc +new file mode 100644 +index 00000000000..5733cac988e +--- /dev/null ++++ b/src/yuzu/yuzu.qrc +@@ -0,0 +1,5 @@ ++ ++ ++ ../../dist/yuzu.ico ++ ++ + +From 162b497251accfc1ee7c51ebc30a1022202e7c33 Mon Sep 17 00:00:00 2001 +From: pineappleEA <67879877+pineappleEA@users.noreply.github.com> +Date: Fri, 1 Jan 2021 22:38:41 +0200 +Subject: [PATCH 2/4] Add yuzu.qrc to CMakeLists.txt + +Include the Qt Resource Collection File to CMakeLists so that its built. +--- + src/yuzu/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt +index e1bab2112e6..b75f711af1f 100644 +--- a/src/yuzu/CMakeLists.txt ++++ b/src/yuzu/CMakeLists.txt +@@ -147,6 +147,7 @@ add_executable(yuzu + util/util.h + compatdb.cpp + compatdb.h ++ yuzu.qrc + yuzu.rc + ) + + +From 3c069c279f0c5c1bdd869853143b1841c5e537c6 Mon Sep 17 00:00:00 2001 +From: pineappleEA <67879877+pineappleEA@users.noreply.github.com> +Date: Fri, 1 Jan 2021 22:42:15 +0200 +Subject: [PATCH 3/4] Point main.ui to the right location + +Main.ui will look for yuzu.ico inside the binary, on the location we set at yuzu.qrc. +--- + src/yuzu/main.ui | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui +index e2ad5baf69f..8862fe293b1 100644 +--- a/src/yuzu/main.ui ++++ b/src/yuzu/main.ui +@@ -14,8 +14,8 @@ + yuzu + + +- +- ../dist/yuzu.ico../dist/yuzu.ico ++ ++ :/img/yuzu.ico:/img/yuzu.ico + + + QTabWidget::Rounded + +From 5d3a6cda9d0cc85070927238f85f2ca5d6a7a618 Mon Sep 17 00:00:00 2001 +From: pineappleEA <67879877+pineappleEA@users.noreply.github.com> +Date: Fri, 1 Jan 2021 22:43:32 +0200 +Subject: [PATCH 4/4] Point main.ui to yuzu.qrc + +--- + src/yuzu/main.ui | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui +index 8862fe293b1..0488706875e 100644 +--- a/src/yuzu/main.ui ++++ b/src/yuzu/main.ui +@@ -303,6 +303,8 @@ + + + +- ++ ++ ++ + +