我已经将以下代码段添加到我的package.json
:
"build": {
"fileAssociations": [
{
"ext": "asdf",
"name": "ASDF File",
"role": "Editor"
}
]
}
但是生成的安装程序不会将我的应用程序分配给asdf
扩展。(在 Windows 10 上测试)
我也查了一下,如何编辑setupEvents.js
文件。它包含以下部分:
case '--squirrel-updated':
// Optionally do things such as:
// - Add your .exe to the PATH
// - Write to the registry for things like file associations and
// explorer context menus
但我找不到一个例子,如何归档注册表编写部分。