为电子应用程序添加Python安装

2024-09-30 06:33:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在为Windows创建一个Eletron桌面应用程序。我使用electron-packagerelectron-squirrel-startup创建一个.exe文件。如本教程所示: https://ourcodeworld.com/articles/read/365/how-to-create-a-windows-installer-for-an-application-built-with-electron-framework

我想将Python的安装添加到安装程序中。有人知道怎么做吗?在

我猜在这里的某个地方主.js文件:

function handleSquirrelEvent(application) {    
    switch (squirrelEvent) {
        case '--squirrel-install':
        case '--squirrel-updated':
        //HERE

但我不确定。在

编辑:

我的想法是使用node-cmd模块来执行Windows cmd命令,但是由于某些原因,像这样的代码

^{pr2}$

handleSquirrelEvent函数中不起作用。但它在它之外工作。在


Tags: 文件cmd应用程序applicationwindows教程exe桌面

热门问题