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

Question regarding the Docs and Enigma VB #1

Closed
bendulum opened this issue Sep 8, 2015 · 9 comments
Closed

Question regarding the Docs and Enigma VB #1

bendulum opened this issue Sep 8, 2015 · 9 comments

Comments

@bendulum
Copy link

bendulum commented Sep 8, 2015

First off, thanks for creating this package. I have a question regarding its usage.
I use electron and electron-packager to bundle my app.
The output directory contains a couple of dll files, locales and resources folders, .. and MyApp.exe which I can start the app with, which works fine.
I have managed to create an installer from this directory using Inno Setup. Everything works fine this way as well.
However, I'm trying to create a single portable executable now from that directory using Enigma Virtual Box. For that I'm using the enigmavirtualbox package and your generate-evb package. Unfortunately I get an error message when trying to open the final .exe: Cannot find function ordinal 345 in library COMCTL32.dll

var generateEvb = require('generate-evb');
var evb = path.resolve('./builds/windows/app.evb');
var exe = path.resolve('./builds/windows/MyAppBundled/MyApp.exe');
var result = path.resolve('./portable/MyApp.exe');
var input = path.resolve('./builds/windows/MyAppBundled');
generateEvb(evb, exe, result, input);

My questions is regarding the docs: inputExe (String) - the input executable file path. Enigma packs the files from path2pack into a copy of this exe
Does this mean that my path2pack directory must not contain the inputExe itself, which it does in my case? Is Enigma trying to copy my exe file into itself? How would I circumvent this?

This is probably not a problem with this package, but I thought you might have an idea! Thanks.

@bendulum
Copy link
Author

bendulum commented Sep 8, 2015

I think I answered my own question. I stop getting these weird errors when moving "MyApp.exe" out of the "MyAppBundled" directory before packing with Enigma. One problem remains, when moving the resulting single executable around it stops working, which might be due to absolute paths being used..

@etiktin
Copy link
Owner

etiktin commented Sep 8, 2015

Hi @bendulum, glad you find it useful :)

Does this mean that my path2pack directory must not contain the inputExe itself, which it does in my case?

Yes, you need to make sure that the inputExe is not in the path2pack. The way to do that currently is to copy the entire folder some where else without the inputExe and use that as your path2pack. To make it easier in the future, I'll add support for a filter callback.

Another thing to consider is that you don't need an asar when using EVB. So instead of holding your app specific code in app.asar, you should hold it in an app folder.

One problem remains, when moving the resulting single executable around it stops working, which might be due to absolute paths being used..

That's odd. I just tried to create a packed Electron app myself and it works fine when moved. What happens when you try to run it? If you don't see an exception, try to run it from cmd and maybe it will print something to the console.

@bendulum
Copy link
Author

bendulum commented Sep 8, 2015

@etiktin Thank you for the quick reply and your feedback! I have "asar" packing already disabled in my electron-packager config, so that should be fine. As soon as I have time I will try again with moving the path2pack directory without the inputExe. I will report back thereafter!
PS: I just found this issue not sure if it could be related.

@bendulum
Copy link
Author

bendulum commented Sep 9, 2015

It works as you described, thanks. Also, moving the final executable around does not break it anymore.

@bendulum bendulum closed this as completed Sep 9, 2015
@etiktin
Copy link
Owner

etiktin commented Sep 27, 2015

@bendulum, I released a new version of generate-evb, with support for a filter function. So inputExe can be in path2Pack and you can just filter it out.

@bendulum
Copy link
Author

Awesome, I will try this as soon as I get the chance!

@matthiasg
Copy link

@bendulum is this still working for you ? I cannot get EVB to work with electron 0.35.0

[30744:1118/135748:FATAL:scoped_handle.cc(184)] Check failed: 0U != (flags & 0x00000002) (0 vs. 0)

@etiktin
Copy link
Owner

etiktin commented Nov 21, 2015

@matthiasg it works for me with Electron v0.35.1. I packed Electron's folder, and when I execute, it opens the default app as usual.
Things to check:

  • Make sure you don't pack inputExe in the path2pack (you can use a filter function to filter electron.exe out).
  • Don't pack you're app files with asar. It's redundant and might cause issues.
  • Make sure you're code doesn't try to write to your app folder.

@matthiasg
Copy link

i left the inputExe out (i dragged it in manually leaving the exe out), i will check whether an asar file was created.

i dont have an app loaded yet (its just an index.html plus mini-main to open it) and it doesnt want to write anywhere, but good to know.

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

No branches or pull requests

3 participants