Comments (1)
因为js代码我也不太熟悉,以下只是给出了临时解决方案,让他可以构建出macos上的应用。 1.找到项目根目录 package.json文件 第10行代码改为 "dist": "npm run prestart && electron-builder --dir && electron-builder --mac"
2.找到目录main-process下的Settings.ts文件 在文件头部加入两行 import { app } from 'electron'; import path from 'path';
然后找到以下这行代码 const settingPath = "settings.json"; 注释这行代码,增加两行,如下所示 // const settingPath = "settings.json"; const userDataPath = app.getPath('userData'); const settingPath = path.join(userDataPath, 'settings.json');
然后运行 npm run dist即可,会在build中找到响应的应用
我是mac arm64的m系列芯片,使用electron-builder --mac没有问题,我不知道如果是intel的机器,这个地方是否需要更改
就不推送代码了,太简陋了,如果作者有时间,可以考虑下mac下的应用构建。
已经搞定mac的构建了
from behavior3editor.
Related Issues (12)
- 有没有考虑出c#的运行库? HOT 1
- 请问能不用json导出吗?二进制的比较符合包体大小的需求。 HOT 1
- TreeJson文件过滤 HOT 1
- 老版本的electron不支持苹果m1 HOT 3
- 关于保存文件后视图被居中的问题 HOT 1
- 安装出现SyntaxError: missing ) after argument list 报错 HOT 2
- 关于nodejs版本 HOT 1
- 关闭
- 子树保存在当前工作目录下还是会说无法保存 HOT 1
- 关于node配置的问题 HOT 8
- 节点搜索 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from behavior3editor.