fix(electron): app image icon (#4442)

This commit is contained in:
Peng Xiao
2023-10-16 23:54:28 +08:00
committed by GitHub
parent 7911d67439
commit fea6b81a53
2 changed files with 6 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ const {
buildType, buildType,
icnsPath, icnsPath,
icoPath, icoPath,
iconPngPath,
platform, platform,
productName, productName,
iconUrl, iconUrl,
@@ -77,8 +78,7 @@ const makers = [
name: '@reforged/maker-appimage', name: '@reforged/maker-appimage',
config: { config: {
name: 'AFFiNE', name: 'AFFiNE',
iconUrl: icoPath, icon: iconPngPath,
setupIcon: icoPath,
platforms: ['linux'], platforms: ['linux'],
options: { options: {
bin: productName, bin: productName,

View File

@@ -18,6 +18,7 @@ const icoPath = path.join(
? `./resources/icons/icon_${buildType}.ico` ? `./resources/icons/icon_${buildType}.ico`
: './resources/icons/icon.ico' : './resources/icons/icon.ico'
); );
const icnsPath = path.join( const icnsPath = path.join(
ROOT, ROOT,
!stableBuild !stableBuild
@@ -25,6 +26,8 @@ const icnsPath = path.join(
: './resources/icons/icon.icns' : './resources/icons/icon.icns'
); );
const iconPngPath = path.join(ROOT, './resources/icons/icon.png');
const iconUrl = `https://cdn.affine.pro/app-icons/icon_${buildType}.ico`; const iconUrl = `https://cdn.affine.pro/app-icons/icon_${buildType}.ico`;
const arch = const arch =
process.argv.indexOf('--arch') > 0 process.argv.indexOf('--arch') > 0
@@ -42,6 +45,7 @@ module.exports = {
productName, productName,
icoPath, icoPath,
icnsPath, icnsPath,
iconPngPath,
iconUrl, iconUrl,
arch, arch,
platform, platform,