Comments (7)
Let me know if the above ☝️ works for you and I can pull out a common helper function for fetching icons from the packager for all platforms
from electron-builder.
alr its working and generating the .icon-set
from electron-builder.
I took a quick look at the code and it looks like the linux packages execute https://github.com/develar/app-builder with a path to the icon-set. The icon-set itself is also generated by app-builder.
Out of curiosity, where would the icon-set go in the unpacked step? I'm not familiar with vesktop/-git
or AUR.
from electron-builder.
Ideally the icon-set would just be in the unpacked folder and packagers can deal with it from there.
from electron-builder.
If I'm understanding correctly, I think the afterPack
could work nicely for you in this case. That or another one of the available hooks. This copies what the linux target is doing under-the-hood when calculating the desktop entries.
async afterPack(context: AfterPackContext) {
const packager = context.packager
const { platformSpecificBuildOptions, config } = packager
const sources = [platformSpecificBuildOptions.icon, config.mac?.icon ?? config.icon].filter(str => !!str) as string[]
// If no explicit sources are defined, fallback to buildResources directory, then default framework icon
let fallbackSources = [packager.getDefaultFrameworkIcon()!]
const buildResources = config.directories?.buildResources
if (buildResources && existsSync(join(buildResources, "icons"))) {
fallbackSources = [buildResources, ...fallbackSources]
}
const result = await packager.resolveIcon(sources, fallbackSources, "set")
// do something with result. output is in config.directories.output dir
},
from electron-builder.
I've finally gotten around to attempting your suggestion but I do not know what you want me to do with the provided snippet
from electron-builder.
It's an afterPack
hook. You can either add it to an electron-builder js config file directly, or save it to a js script that you then set the path to from project root.
https://www.electron.build/configuration/configuration#afterpack
from electron-builder.
Related Issues (20)
- Not able to Pass Transporter & Notarization with same .pkg file HOT 1
- Build Linux ARM64 on MacOS M1 ARM HOT 1
- defualt ignore files config could not exclude node_modules in packing progress HOT 6
- Add getting release notes in PrivateGitHubProvider
- GitHubProvider: Doesn't use custom channel that was set in the electron-builder config HOT 3
- ESM Config filetype causes import issues in external dep (pkg read-config-file) HOT 6
- trailing commas in dependency package.json cause havok HOT 2
- Linux deb auto updater doesn't update due wrong install command HOT 14
- Building large electron app >= 4.2Gib HOT 2
- Cannot include `node_modules/*/examples/**/*`? HOT 7
- Large Apps Result in Malformed NSIS Installer After Build - No Error(s) HOT 5
- local dependencies (file:path instead of version) are not included in app.asar HOT 6
- Cannot reuse icon for different file associations
- Building 64bit installer, portable exe in windows HOT 1
- MSI Build Failure
- [NSIS] After adding 'nsis.menuCategory' in config, an upgrade will still install app to old path
- Signing on MacOS using Azure Key Vault HOT 1
- Shortcut not found on Windows after install HOT 1
- Issue with hdiutil when building on MacOS HOT 2
- Semantic Versioning Compare Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-builder.