-
Notifications
You must be signed in to change notification settings - Fork 344
[Bug] Windows 10 Jumplist tasks #271
Comments
@dreisel this issue is a duplicate of #269 if I'm not mistaken. However this is good to know that you managed to update both icon and description using rcedit. Can you paste your solution here? I may incorporate it in the bundler process since it's already using rcedit. I've been playing around with those functions but no luck so far... 😞 |
yea, that's exactly what i was trying to do. I'm working on a POC with https://electronforge.io/ but in order for the client to connect to the parent IPC we will need to refactor this area a bit. here are the rc configs:
|
And I don't think this is a duplicate of #269 there he refrences the app icon which works properly here. |
@asticode I think i got a solution... I would like to change the default_app.asar in the downloaded electron repo. instead of the original electron app, i would put the astilectron app in there. WDYT? |
@dreisel I don't really get your solution :
which
so your goal is to modify
what do you mean by
which |
in the downloaded electron release. is stored as an asar file in the electron zipped folder (under resources). I would like to replace this file with the astilectron code. my goal is to modify the electron.exe prior to embedding it into the go binary. (and possibly resigning it on release). about the other instance, I'm assuming that the main electron window (which go-astilectron spawns up with the respective command line arguments) will be alive. so when the second instance of the electron spawns up (by clicking the button in the jump list). it will register as a single instance and the execution will stop, and call the main process to handle the window focus. |
@asticode I think this is the way to go: not sure how to implement it yet |
and when the original app didn't request the single instance it won't affect the original app |
So what worked for me was to make a standalone electron app (using electron-forge) and adding the compiled go-app as a dependency. Then I've added the astilectron nodejs code to the electron app and added a section of code that spawns the go app and have this communication. This allowed the use of all the build tools in the electron echo system and having my electron.exe be the main executable and it seems that this is the preferred way for windows. |
I try add the following on it const os = require('os')
// ...
function onReady() {
if (os.platform() === 'win32') {
app.setAppUserModelId("https://www.xxx.com/") // ❗ Set it before calling "setJumpList." Otherwise, the "setJumpList" doesn't work.
app.setJumpList([{
type: "custom", name: "My Custom",
items: [
{
type: "task",
title: "Title",
description: "Description",
program: "C:\\Program Files (x86)/Notepad++/notepad++.exe",
}, {
type: "task",
title: "Long Title",
iconPath: "C:\\Program Files (x86)/Notepad++/updater/updater.ico",
iconIndex: 0, // if ommit then you will get 'Argument must be null or an array of categories.'
description: "Description MUST < 256!!!!!",
program: process.execPath
}
]
},
{ // has a name so `type` is assumed to be "custom"
name: 'Tools',
items: [
{
type: 'task',
title: 'Tool A',
program: process.execPath,
args: '--run-tool-a',
icon: process.execPath,
iconIndex: 0,
description: 'Runs Tool A'
}, {
type: 'task',
title: 'Tool B',
program: process.execPath,
args: '--run-tool-b',
icon: process.execPath,
iconIndex: 0,
description: 'Runs Tool B'
}]
},
{type: 'frequent'},
{ // has no name and no type so `type` is assumed to be "tasks"
items: [{
type: 'task',
title: 'New Project',
program: process.execPath,
args: '--new-project',
description: 'Create a new project.'
}, {type: 'separator'}, {
type: 'task',
title: 'Recover Project',
program: process.execPath,
args: '--recover-project',
description: 'Recover Project'
}]
}])
} output The above code can achieve the part of the red box, but unfortunately, it is not clear how the blue arrow items should be replaced. 🤔 |
where
for example
|
Hi,
Thanks for a great package!
I got an issue, when right clicking the app on windows 10 task bar, (aka jump list)
There is a default task added with the electron name and icon.
I did manage to change the name and icon with the use of rcedit, changing the icon and description....
But, when clicking on the default task it opens the electron.exe with no arguments.
so the default electron window is opened..
I've also tested it with one of the demo apps and got the exact same results.
The text was updated successfully, but these errors were encountered: