scratch-gui使用scratch-desktop打包成exe文件

1.将scratch-gui和scratch-desktop从git中clone下面:
git clone https://github.com/LLK/scratch-gui.git
git clone https://github.com/LLK/scratch-desktop.git
2.先安排scratch-gui:
进入scratch-gui项目:cd scratch-gui
将git分支切换为scratch-desktop:git checkout scratch-desktop
再 npm install
最后 npm link以备后用。
(scratc-gui告一段落)
3.进入scratch-desktop项目 :cd scratch-desktop
npm install(这一步比较麻烦,使用npm不一定成功,可以尝试yarn和cnpm)
链接第二步中的npm link:npm link scratch-gui
再 npm run build-gui
再npm start 生成dist文件
然后打开scratch-desktop项目下的scripts->lib->electron-builder-wrapper.js文件将:

if ((targetGroup === 'nsis') && !(childEnvironment.CSC_LINK || childEnvironment.WIN_CSC_LINK)) {
        throw new Error(`NSIS build requires CSC_LINK or WIN_CSC_LINK`);
    }

注释掉(49行左右)
最后npm run dist
dist目录的Scratch Desktop Setup 3.7.0.exe:
在这里插入图片描述
大功告成!!!!

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值