Comments (5)
It's been quite a while since I packaged any electron application, but back then I relied on https://github.com/electron-userland/electron-packager. Given their documentation (https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#asar), if you aren't packaging the source code into an asar
archive, you should have nothing to do.
I'd suggest you first package your application, then install it, then go to the directory where it was installed and check whether you can find a node_modules
directory inside. If you can, then check if you can find gkm
directory within it. If you can, then things should work the same as if you were in your development environment. Also make sure that you can find the gkm.jar
and JNativeHook.jar
files.
On the other hand, if you can't find the node_modules
nor the gkm
directories, then it's likely that your source code is archived in an asar
file. If you're using electron-packager
, you can either disable using asar
or only unpack a certain part of it (I never did myself). See the documentation I pointed at to know how to do that.
I'm not knowledgeable enough to know what are the downsides to unpacking, other than it exposes your source code on the file system.
from gkm.
Hello,
This is unlikely to be related to gkm
itself. I'm going to guess that when your electron application is packaged, the node modules are packaged within an asar
file (https://electronjs.org/docs/tutorial/application-packaging) and as such, when
Line 10 in b2d7bc9
is called from gkm.js
, java
cannot find the jar
file since it's not in the user file system but within that asar
archive. I believe it should be possible for you to unpack the asar when installing the packaged application, which should solve this issue.
from gkm.
Hi,
Thank you for answering. Would you be so kind and guide me through that process?
Should I unpack the whole thing or just the gkm.js
? Should I somehow point to it after unpacking? etc.
And are there any downsides to doing so?
from gkm.
Yes. That helped a lot. I was able to unpack it successfully using asar.unpackDir
and unpacking node_modules
. Unpacking just the gkm
resulted in error since it wasn't able to locate eventemitter2
module. I did not try to unpack just those two, will maybe experiment a bit more, but quite happy with the result already.
Thank you.
from gkm.
Happy to see it worked out for you!
from gkm.
Related Issues (20)
- Allow consuming events
- After reinstall java, GKM not working on my project?
- How to delete listeners? HOT 1
- Publish the latest v0.3.0 to NPM HOT 1
- key.typed event returns [ 'Undefined' ] HOT 1
- Does not work on linux HOT 1
- How to prevent keyboard long pressed? HOT 4
- Gkm with ReactJS not working HOT 3
- Test on MacOS HOT 5
- How is it possible to get mouse.wheel events? HOT 1
- `key.released` event doesn't always seem to fire when a key is released HOT 1
- JNativeHook.jar does not work with jdk15.0.2 64-bit (workaround available) HOT 2
- EventEmitter2 is not a constructor HOT 1
- Is there any way to prevent the released event from firing? HOT 1
- Support unicode keyboard listener
- What is inside gkm.jar? HOT 1
- Is there a way to get the keyboard cursor location? HOT 1
- Mouse Wheel HOT 2
- angular2 not supporting yet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gkm.