From 6483df302b7e677ed4e1a6edf01668f21d333b8b Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Thu, 27 Jul 2023 21:50:55 +1000 Subject: [PATCH] Support Windows on arm64 --- .github/workflows/win.yml | 10 +- .../desktop/com.vicr123.thebeat/en.json | 8 +- .../com.vicr123.thebeat_blueprint/en.json | 8 +- plugins/PodcastPlugin/models/podcastmodel.cpp | 3 +- plugins/PodcastPlugin/translations/en_US.ts | 16 +- plugins/PodcastPlugin/translations/vi_VN.ts | 311 +++++++++--------- .../widgets/podcastlistingwidget.cpp | 7 +- plugins/WinIntegration/CMakeLists.txt | 2 + 8 files changed, 189 insertions(+), 176 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index b71d9b10..8c2bd925 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -13,6 +13,12 @@ jobs: strategy: matrix: os: [windows-latest] + arch: [amd64, amd64_arm64] + include: + - arch: amd64 + qtArch: win64_msvc2019_64 + - arch: amd64_arm64 + qtArch: win64_msvc2019_arm64 runs-on: ${{ matrix.os }} steps: - uses: vicr123/libcontemporary/prepare-vars@actions @@ -24,15 +30,17 @@ jobs: uses: jurplel/install-qt-action@v3 with: version: ${{ steps.vars.outputs.qtVersion }} - arch: win64_msvc2019_64 + arch: ${{ win64_msvc2019_64 }} modules: addons.qtmultimedia addons.qtwebsockets qt5compat - name: Set up MSVC uses: ilammy/msvc-dev-cmd@v1.12.0 with: sdk: 10.0.22000.0 + arch: ${{ matrix.arch }} - uses: vicr123/libcontemporary/install-libcontemporary@actions with: qcoroVersion: ${{ steps.vars.outputs.qcoroVersion }} + commitish: features/win-aarch64 - uses: vicr123/libcontemporary/build-project@actions name: "Build contemporary-theme" with: diff --git a/application/translations/desktop/com.vicr123.thebeat/en.json b/application/translations/desktop/com.vicr123.thebeat/en.json index 6b9af4b8..db589aa7 100644 --- a/application/translations/desktop/com.vicr123.thebeat/en.json +++ b/application/translations/desktop/com.vicr123.thebeat/en.json @@ -1,12 +1,12 @@ { "GenericName": { - "message": "Audio Player" + "message": "Audio Player\r" }, "Keywords": { - "description": "A list of words that can be searched for. Please ensure that the list also ends with a semicolon!", - "message": "audio;music;cd;player;" + "description": "A list of words that can be searched for. Please ensure that the list also ends with a semicolon!\r", + "message": "audio;music;cd;player;\r" }, "Name": { - "message": "theBeat" + "message": "theBeat\r" } } diff --git a/application/translations/desktop/com.vicr123.thebeat_blueprint/en.json b/application/translations/desktop/com.vicr123.thebeat_blueprint/en.json index b22e7022..28b0fd75 100644 --- a/application/translations/desktop/com.vicr123.thebeat_blueprint/en.json +++ b/application/translations/desktop/com.vicr123.thebeat_blueprint/en.json @@ -1,12 +1,12 @@ { "GenericName": { - "message": "Audio Player" + "message": "Audio Player\r" }, "Keywords": { - "description": "A list of words that can be searched for. Please ensure that the list also ends with a semicolon!", - "message": "audio;music;cd;player;" + "description": "A list of words that can be searched for. Please ensure that the list also ends with a semicolon!\r", + "message": "audio;music;cd;player;\r" }, "Name": { - "message": "theBeat Blueprint" + "message": "theBeat Blueprint\r" } } diff --git a/plugins/PodcastPlugin/models/podcastmodel.cpp b/plugins/PodcastPlugin/models/podcastmodel.cpp index f9ecf7bd..e10f7bc5 100644 --- a/plugins/PodcastPlugin/models/podcastmodel.cpp +++ b/plugins/PodcastPlugin/models/podcastmodel.cpp @@ -7,9 +7,10 @@ #include #include #include +#include struct PodcastModelPrivate { - QPointer podcast; + QPointer podcast; }; PodcastModel::PodcastModel(QObject* parent) : diff --git a/plugins/PodcastPlugin/translations/en_US.ts b/plugins/PodcastPlugin/translations/en_US.ts index ca436a71..d17ad39e 100644 --- a/plugins/PodcastPlugin/translations/en_US.ts +++ b/plugins/PodcastPlugin/translations/en_US.ts @@ -71,17 +71,17 @@ PodcastItemDelegate - + New - + Listened - + %1 remaining @@ -137,21 +137,21 @@ - + %n episodes - - + + Up to date - - + + You've listened to every episode in this podcast. diff --git a/plugins/PodcastPlugin/translations/vi_VN.ts b/plugins/PodcastPlugin/translations/vi_VN.ts index 6e6eb6e5..63467b56 100644 --- a/plugins/PodcastPlugin/translations/vi_VN.ts +++ b/plugins/PodcastPlugin/translations/vi_VN.ts @@ -1,251 +1,252 @@ - + + - + Podcast - Cho %1 - - For %1 + + For %1 + Cho %1 - Hủy đăng ký - - - Unsubscribe + + + Unsubscribe + Hủy đăng ký - Có chắc chắn không? - - Are you sure? + + Are you sure? + Có chắc chắn không? - - + + PodcastItem - Tải xuống tập Podcast - - Download Podcast Episode + + Download Podcast Episode + Tải xuống tập Podcast - Đang tải xuống %1 - - Downloading %1 + + Downloading %1 + Đang tải xuống %1 - Không thể tải xuống %1 - - Failed to download %1 + + Failed to download %1 + Không thể tải xuống %1 - Đã tải xuống %1 - - Downloaded %1 + + Downloaded %1 + Đã tải xuống %1 - Cho %1 - - For %1 + + For %1 + Cho %1 - Xóa bản tải xuống - - Remove Download + + Remove Download + Xóa bản tải xuống - Tải xuống - - Download + + Download + Tải xuống - Đánh dấu là chưa nghe - - Mark as unplayed + + Mark as unplayed + Đánh dấu là chưa nghe - Đánh dấu là đã nghe - - Mark as complete + + Mark as complete + Đánh dấu là đã nghe - - + + PodcastItemDelegate - Mới - - New + + New + Mới - Đã nghe - - Listened + + Listened + Đã nghe - %1 còn lại - - %1 remaining + + %1 remaining + %1 còn lại - - + + PodcastItemWidget - - - Form + + Form + - Bài trong thư viện - - Tracks in Library + + Tracks in Library + Bài trong thư viện - Phát - - Play + + Play + Phát - Đang tải xuống... - - Download in progress... + + Download in progress... + Đang tải xuống... - Xóa bản tải xuống - - Remove Download + + Remove Download + Xóa bản tải xuống - Tải xuống - - Download + + Download + Tải xuống - - + + PodcastListingWidget - - - Form + + Form + - Đật bài chưa nghe vào hàng phát - - Enqueue All Incomplete + + Enqueue All Incomplete + Đật bài chưa nghe vào hàng phát - Phát bài chưa nghe - - Play All Incomplete + + Play All Incomplete + Phát bài chưa nghe - - %n tập - - - %n episodes + + %n episodes + + %n tập + - Bạn đã cập nhật - - - Up to date + + + Up to date + Bạn đã cập nhật - Bạn đã nghe các tập trong podcast này rồi. - - - You've listened to every episode in this podcast. + + + You've listened to every episode in this podcast. + Bạn đã nghe các tập trong podcast này rồi. - - + + PodcastManager - Đang cập nhật podcast - - Updating Podcasts + + Updating Podcasts + Đang cập nhật podcast - Đang cập nhật %1 - - Updating %1 + + Updating %1 + Đang cập nhật %1 - Đã cập nhật podcast - - Updated Podcasts + + Updated Podcasts + Đã cập nhật podcast - - + + PodcastPane - - - Form + + Form + - Podcast - - Podcasts + + Podcasts + Podcast - - + + PodcastSettingsPane - - - Form + + Form + - Tự động tải xuống các tập podcast - - Download new podcast episodes automatically + + Download new podcast episodes automatically + Tự động tải xuống các tập podcast - Podcast - - Podcasts + + Podcasts + Podcast - - + + SubscribedPodcastsWidget - - - Form + + Form + - Podcast - - Podcasts + + Podcasts + Podcast - Cập nhật tất cả - - Update All + + Update All + Cập nhật tất cả - Đăng ký - - Add Subscription + + Add Subscription + Đăng ký - Đăng ký podcast mới - - - Subscribe to new podcast + + + Subscribe to new podcast + Đăng ký podcast mới - Địa chỉ nguồn cấp là gì? - - What's the address of the feed? + + What's the address of the feed? + Địa chỉ nguồn cấp là gì? - URL không hợp lệ - - Invalid URL + + Invalid URL + URL không hợp lệ - Rất tiếc, URL đó không phải URL nguồn cấp hợp lệ - - Sorry, that URL is not a valid feed URL + + Sorry, that URL is not a valid feed URL + Rất tiếc, URL đó không phải URL nguồn cấp hợp lệ - - \ No newline at end of file + + diff --git a/plugins/PodcastPlugin/widgets/podcastlistingwidget.cpp b/plugins/PodcastPlugin/widgets/podcastlistingwidget.cpp index 39f50f65..4af318e7 100644 --- a/plugins/PodcastPlugin/widgets/podcastlistingwidget.cpp +++ b/plugins/PodcastPlugin/widgets/podcastlistingwidget.cpp @@ -12,11 +12,12 @@ #include #include #include +#include struct PodcastListingWidgetPrivate { - QPointer podcast; - HeaderBackgroundController* backgroundController; - PodcastModel* model; + QPointer podcast; + HeaderBackgroundController* backgroundController; + PodcastModel* model; }; PodcastListingWidget::PodcastListingWidget(QWidget* parent) : diff --git a/plugins/WinIntegration/CMakeLists.txt b/plugins/WinIntegration/CMakeLists.txt index 23b02010..66a8ce76 100644 --- a/plugins/WinIntegration/CMakeLists.txt +++ b/plugins/WinIntegration/CMakeLists.txt @@ -8,6 +8,8 @@ include(ExternalProject) function(translate_arch arch) if(${arch} STREQUAL "AMD64") set(RESULT_ARCH "x64" PARENT_SCOPE) + elseif(${arch} STREQUAL "arm64") + set(RESULT_ARCH "arm64" PARENT_SCOPE) else() set(RESULT_ARCH ${arch} PARENT_SCOPE) endif()