Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSIS multi arch using native package dependencies that use cmake-js #1516

Closed
tiangolo opened this issue Apr 28, 2017 · 7 comments
Closed

NSIS multi arch using native package dependencies that use cmake-js #1516

tiangolo opened this issue Apr 28, 2017 · 7 comments

Comments

@tiangolo
Copy link

  • Version: 17.1.1

Electron-updater: 1.11.0

  • Target: Windows

I'm building an application that uses active-win. For Windows, it uses fastcall, which in turn uses cmake-js (comparable with node-ffi).

Following cmake-js' guide I added a section to my package.json to specify that I wanted cmake-js to build for electron, as:

...
  "cmake-js": {
    "runtime": "electron",
    "runtimeVersion": "1.6.7",
    "arch": "x64"
  }
...

That way, when installing a package that uses cmake-js it will compile it for electron using that architecture.

But I'm trying to use electron-builder multi-arch NSIS installer, and that uses electron-gyp to rebuild for each architecture.

Is there a way to support dependency packages that use cmake-js using NSIS multi architecture?

What would be needed from the cmake-js side to support it here?

What would need to be done here to support it?

I also opened a corresponding issue in cmake-js: cmake-js/cmake-js#83

@tiangolo tiangolo changed the title NSIS multi arch using package dependencies that use cmake-js NSIS multi arch using native package dependencies that use cmake-js Apr 28, 2017
@tiangolo
Copy link
Author

tiangolo commented May 3, 2017

@develar I'm planning on creating a PR to "add support" for cmake-js dependencies.

If I'm not wrong, it seems it would just be adding some cmake-js configs as environment variables in here: https://github.com/electron-userland/electron-builder/blob/master/packages/electron-builder/src/yarn.ts#L25

In any case, it wouldn't make cmake-js a dependency, it would only use it when needed. That would give automatic support for cmake-js modules in electron-builder.

Do you think that's something useful / acceptable for the project?

@develar
Copy link
Member

develar commented May 3, 2017

Do you think that's something useful / acceptable for the project?

It is useful, acceptable and wanted PR. Thanks for clear report and investigation.

@tiangolo
Copy link
Author

tiangolo commented May 3, 2017

Great!

@develar
Copy link
Member

develar commented May 13, 2017

Moved to backlog to keep issue list clear.

@tiangolo
Copy link
Author

Cool. 👌

I were unable to work on it as I don't have a feasible test case.

My use case was using fastcall in Windows 32 bits, but it seems that it is not that simple, or at least it doesn't work right away: cmake-js/fastcall#17

I ended up migrating active-win back to node-ffi instead of fastcall.

@Jinex2012
Copy link

@tiangolo To fix this issue you have to dig into the node_module code itself.

see here:
electron-react-boilerplate/electron-react-boilerplate#646 (comment)

@tiangolo
Copy link
Author

Thanks @Jinex2012 , I had an idea on how to proceed, but I was trying to use some Windows APIs and fastcall doesn't support doing that. So I didn't have a way to actually test that it was working, or if it would...

It is now a feature request in fastcall: cmake-js/fastcall#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants