diff --git a/build/icon.icns b/build/icon.icns new file mode 100644 index 00000000..e730532f Binary files /dev/null and b/build/icon.icns differ diff --git a/electron-builder.yml b/electron-builder.yml index e65d9321..e91cb5b9 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -12,6 +12,9 @@ mac: - dmg - zip +appImage: + systemIntegration: doNotAsk + linux: asarUnpack: - node_modules/@ledgerhq/ledger-core @@ -21,9 +24,6 @@ linux: - target: AppImage arch: - x64 - - target: tar.gz - arch: - - x64 win: artifactName: ${name}-${version}-${os}-${arch}.${ext} diff --git a/scripts/compile.sh b/scripts/compile.sh index 3486c2b9..346cee44 100644 --- a/scripts/compile.sh +++ b/scripts/compile.sh @@ -4,8 +4,9 @@ set -e export GIT_REVISION=`git rev-parse HEAD` export SENTRY_URL=https://db8f5b9b021048d4a401f045371701cb@sentry.io/274561 +export JOBS=max rm -rf ./node_modules/.cache dist -JOBS=max yarn +yarn NODE_ENV=production yarn run webpack-cli --mode production --config webpack/internals.config.js NODE_ENV=production yarn run electron-webpack diff --git a/scripts/dist.sh b/scripts/dist.sh index 8650e8f3..9ee8c68c 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -1,3 +1,16 @@ #!/bin/bash +# hilarious fix: to make linux icon we have to remove icon.png from build folder +# some context: +# - https://github.com/electron-userland/electron-builder/issues/2577 +# - https://github.com/electron-userland/electron-builder/issues/2269 +if [[ `uname` == 'Linux' ]]; then + mv build/icon.png /tmp +fi + yarn compile && DEBUG=electron-builder electron-builder + +# hilarious fix continuation: put back the icon where it was +if [[ `uname` == 'Linux' ]]; then + mv /tmp/icon.png build +fi diff --git a/src/main/app.js b/src/main/app.js index 412a323b..83a714af 100644 --- a/src/main/app.js +++ b/src/main/app.js @@ -11,6 +11,7 @@ import { import menu from 'main/menu' import db from 'helpers/db' +import { i } from 'helpers/staticPath' import { terminateAllTheThings } from './terminator' @@ -65,6 +66,11 @@ const saveWindowSettings = window => { } const defaultWindowOptions = { + // Linux require window to have icon to be correctly displayed + // in docks, when using , etc. + // see https://github.com/electron-userland/electron-builder/issues/2269 + icon: i('linux-app-icon-512x512.png'), + backgroundColor: '#fff', webPreferences: { devTools, diff --git a/static/images/linux-app-icon-512x512.png b/static/images/linux-app-icon-512x512.png new file mode 100644 index 00000000..6b8c437e Binary files /dev/null and b/static/images/linux-app-icon-512x512.png differ