From ca4f56a4200f57b4bf017d34e7af2f1f2bb9d614 Mon Sep 17 00:00:00 2001 From: pankaj443 Date: Mon, 17 Jun 2024 11:01:25 +0530 Subject: [PATCH] Update icon --- .github/workflows/executable.yml | 5 ----- scripts/win-metadata-update.js | 14 +++++++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/executable.yml b/.github/workflows/executable.yml index d64b635bd..c0d00e55b 100644 --- a/.github/workflows/executable.yml +++ b/.github/workflows/executable.yml @@ -27,11 +27,6 @@ jobs: with: name: win-exe path: percy.exe - # - name: Upload app icon - # uses: actions/upload-artifact@v4 - # with: - # name: percy.ico - # path: ./scripts/files/percy.ico # - name: Upload assets # uses: softprops/action-gh-release@d99959edae48b5ffffd7b00da66dcdb0a33a52ee # with: diff --git a/scripts/win-metadata-update.js b/scripts/win-metadata-update.js index 46556f9ff..58598e4f2 100644 --- a/scripts/win-metadata-update.js +++ b/scripts/win-metadata-update.js @@ -4,14 +4,14 @@ import * as ResEdit from 'resedit'; function windowsPostBuild(output) { const exe = ResEdit.NtExecutable.from(fs.readFileSync(output)); const res = ResEdit.NtExecutableResource.from(exe); - // const iconFile = ResEdit.Data.IconFile.from(fs.readFileSync('./scripts/files/percy.ico')); + const iconFile = ResEdit.Data.IconFile.from(fs.readFileSync('./scripts/files/percy.ico')); - // ResEdit.Resource.IconGroupEntry.replaceIconsForResource( - // res.entries, - // 1, - // 1033, - // iconFile.icons.map(item => item.data) - // ); + ResEdit.Resource.IconGroupEntry.replaceIconsForResource( + res.entries, + 1, + 1033, + iconFile.icons.map(item => item.data) + ); const vi = ResEdit.Resource.VersionInfo.fromEntries(res.entries)[0];