【问题标题】:How to build Meteor.js in an executable file?如何在可执行文件中构建 Meteor.js?
【发布时间】:2018-02-19 11:22:43
【问题描述】:

我需要在windows下构建一个meteor应用。怎么做才对?

我找到了meteor-electron 包。如果我理解正确,它会创建一个可执行文件 (exe)。

我执行以下命令:

meteor create meteor-electron-build-test
cd meteor-electron-build-test
meteor add meson: electron
meteor

现阶段一切正常,流星内部的电子应用启动。

但如果我在控制台中停止电子并转到 .meteor-electron \ win32-ia32 \ builds \ Electron-win32-ia32 \ Electron.exe - 这个应用程序是空的。

我尝试添加设置。

{
  "electron": {
    "name": "MyApp",
    "version": "0.1.0",
    "description": "A really cool app.",
    "rootUrl": "https://myapp.com",
    "launchPath": "/ app / landing",
    "sign": "Developer ID Application: ...",
    "height": 768,
    "width": 1024,
    "frame": true,
    "title-bar-style": "hidden",
    "resizable": true,
    "protocols": [{
      "name": "MyApp",
      "schemes": ["myapp"]
    }]
  }
}

并启动了团队流星--settings settings.json。结果是一样的。

https://github.com/StekolschikovV/meteor-electron-build-test

如果我添加“appSrcDir”参数:“./” - 启动一个无限循环,所有复制到 .meteor-electron 文件夹。

如何使用windows正确构建可执行文件meteor electron?

【问题讨论】:

    标签: javascript meteor build electron exe


    【解决方案1】:

    meteor-electron 不提供流星服务器进程,仅提供瘦 Web 客户端。因此,您的 rootUrl 设置必须指向托管您的应用的有效网址。这可以是 http://localhost:3000 以进行测试。

    【讨论】:

    • 您能推荐其他软件包或其他解决方案吗?
    【解决方案2】:

    尝试通电。我刚刚在最新的 Meteor 1.7 上对其进行了测试,它可以工作。捆绑节点和 MongoDB。运行流星客户端和服务器。

    npm install -g electrify
    

    https://github.com/arboleya/electrify

    【讨论】:

      猜你喜欢
      • 2014-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-15
      • 2015-06-17
      • 2012-01-04
      • 2021-01-26
      • 1970-01-01
      相关资源
      最近更新 更多