我已经将以下代码片段添加到了我的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
但我找不到一个例子,说明如何实现注册表写入部分。