Skip to content

Commit

Permalink
Fix application icon in Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor44 committed Feb 10, 2024
1 parent ba62bb5 commit b8cd2a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/utils/resources.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as fs from 'fs';
import * as path from 'path';

export const getResourcePath = (rootPath: string) => path.resolve(__dirname, '../..', rootPath);
const getResourcePath = (rootPath: string) => path.resolve(__dirname, '../..', rootPath);

/**
* Returns the full path of the PNG icon of the app
*/
export const getResourceIconPath = () => {
const stableIconPath = getResourcePath('build/icon_512x512.png');
const stableIconPath = getResourcePath('resources/icon.png');
if (fs.existsSync(stableIconPath)) return stableIconPath;

return undefined;
Expand Down
4 changes: 2 additions & 2 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ linux:
artifactName: ${productName}-${arch}.${ext}

extraResources:
- '.env.example'
- '.env.production'
- from: 'build/icon_512x512.png'
to: 'icon.png'

files:
- 'build/icon_512x512.png'
- '!**/*.map'
- from: 'app/static/icon--provider'
to: 'static/icon--provider'
Expand Down

0 comments on commit b8cd2a7

Please sign in to comment.