-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
Renaming atom.exe breaks native modules #713
Comments
Native node modules link to a I'm digging into |
The To test the 1. Generate node.lib$ cd .../atom-shell/
$ ./script/build.py -c Release -t generate_node_lib 2. Overwrite node.lib downloaded by apm$ cd .../atom-shell/
$ cp out/Release/node.lib $USERPROFILE/.atom/.node-gyp/.node-gyp/0.18.0/ 3. Rebuild the module$ cd ../node-nslog
$ node-gyp rebuild 4. Open the module in atom-shell$ cd .../atom-shell/
$ env ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 ./out/Release/atom.exe
> require('../node-nslog'); Or just $ env ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 ./out/Release/atom.exe -e "require('../node-nslog');" |
@zcbenz This is good info, lemme see what I can dig out of that today. |
Ok, so here's what I've got so far, I'm a bit stuck:
Unfortunately, this is where we get stuck. We can see that @kevinsawicki, any thoughts? What's the least Crazytown way to work around this? |
After $ python ./script/build
...
$ cp ~/github/atom-shell/out/Release/node.lib $USERPROFILE/.atom/.node-gyp/.node-gyp/0.18.0/
$ cd node_modules/node-nslog
$ node-gyp rebuild it should be able to rebuild the module with new |
I would think we could just add a setting to How does that sound? |
@kevinsawicki That would work great for us, yeah |
@paulcbetts Just to confirm, you are doing a fork/custom build of Atom Shell to get this working right? Just thinking we should probably put a doc together for this case if you are so other people have a smoother time. |
@kevinsawicki @paulcbetts I for one would greatly appreciate a guide. I hope to be shipping a "rebranded" app built atop atom-shell in the next few weeks, and any additional tips for renaming the executable (and replacing icons, etc.) on the Windows side would be helpful. (On OS X there is a relevant discussion #249 which I'm not sure how up-to-date it is.) |
@kevinsawicki So, we currently need to check out Atom Shell and run the |
@paulcbetts you are distributing that custom built |
@kevinsawicki Yeah, so |
This sounds great! |
To be clear, is there any way I can rename atom.exe — version 0.17.2 specifically, had compiling trouble again past that — and have native modules still work? Or are you discussing future (or at least since that version) build process changes you intend to make in support of this? |
@natevw You can successfully do this today, if you do what I describe - but since it's not built into anything, you'll have to do this by-hand. I'll probably be tackling this task soonish (next week?) and I'll definitely post a guide back here once I do |
@natevw if the exe filename you want is 4(-5) chars then here's a cheap trick (works regardless of atom-shell version): Offtopic here, but what compiling problems prevent you from upgrading beyond 017.2? (I also had this problem. Couldn't upgrade because of mapbox/node-sqlite3.) edit: corrected |
I've started work on this, once I've got the package rebuilding done, I'm going to put this into a |
@paulcbetts 👍 |
I put my solution to this problem into a Grunt task, check out https://github.com/paulcbetts/grunt-build-atom-shell. This task handles rebuilding native modules as well, so we should be able to close this out. Note that on OS X, this task depends on #898 which will hopefully get merged soon. |
I think we can close this now since we have a working solution. |
After renaming "atom.exe" in my Windows app bundle, I get the following message as I try to load a native module:
Changing "renamed.exe" back to "atom.exe" makes the error go away. So contrary to #291 this does not seem to be totally okay. (Renaming the OS X Atom.app is fine though with same module.)
The text was updated successfully, but these errors were encountered: