Code Monkey home page Code Monkey logo

Comments (1)

zhongfq avatar zhongfq commented on May 24, 2024 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.