Comments (25)
Nope! That's only needed for compiling RobotJS. Once it's compiled the binary (robotjs.node) can be distributed without the dependencies.
from robotjs.
It would be better to have an installer for windows than npm I guess. Especially after seeing the various installation bugs that are coming up (Not everyone prefers VS for development so they may not have it).
from robotjs.
Yeah having users install Visual Studio just to use your module is pretty insane. Some modules use node-pre-gyp for this, and I think I want to do it also. This way users can download pre-built binaries for at least Windows. I'll create a new issue to look into this.
from robotjs.
Having pre-built binaries will help, but I'd still like an installer to make the process really easy. I'd like it to have the option to add Node.js to the right click->new menu with the default script requiring the global RobotJS package. It could even install EncloseJS or nexe to allow users to easily compile their apps.
This is very similar to how AutoHotkey does things.
from robotjs.
It all got fussy for me in the last post. We need more deliberation. First we would have to list out how we want to install it. Its better to provide both the binaries and the compilation process because I dont know what will go wrong in windows. If binaries dont work then the same installer will move on to a compilation of the code after installing all the required stuff. Just as a fail safe.
from robotjs.
first of all great work! In addition to the installer route, will you be pursuing dependency bundling? I am trying to figure out how to eventually bundle this into a electron app
EDIT: For your situational awareness, I see that Max Ogden is using electron in his screencat project
from robotjs.
For an electron app you would just need to copy the node_modules folder.
from robotjs.
right, but would anyone using it still need to have visual studio installed (for windows)?
from robotjs.
awesome! Thank you for the quick response! I will let you know if I ever get this project off the ground and maybe you can put it on your projects page. I have been toying with this idea forever and robotjs (along with a few other key libraries) solves huge barriers of entry that were keeping me from pursuing it.
from robotjs.
No problem! And keep me updated. I'd love to see what you're making.
from robotjs.
I'm currently experimenting with shipping pre-built binaries through NPM. So far the tests have been positive, so positive in fact that I don't see a reason to use node-gyp or node-pre-gyp anymore. And frankly I don't see a reason for an installer, you should be able to install robotjs like any other package through npm and have it work on the target platform without any compilation steps or any dependencies of any kind. I don't understand the need to overburden yourself with all this extra work.
from robotjs.
Did you read my comments above? With an installer you have more control, that's something I need.
Using node-pre-gyp is the preferred way to distribute binaries. It falls back to building, and that's important to me.
from robotjs.
More control for what? perhaps I'm misunderstanding what the goals are. Also, you don't need that many binaries to support a large number of platforms. With just 6 binaries you're able to support about 90% of the operating systems out there assuming you're targeting node 0.12. And another 6 for 0.10. And node-pre-gyp probably won't help because if the user has to compile the binary themselves, it will probably fail because the platform is incompatible, I'm of course talking about Linux here. OS X and Windows will have full support (I'm still testing OS X, will report once I know for sure).
from robotjs.
I want a one click installer for new users, users without Node.js or npm. I also want to add RobotJS to the right click->new menu, and have the default script require a globally installed RobotJS package. The goal is to replace AutoHotkey and this would make the experience very similar.
from robotjs.
It's just an idea, not sure if I'm going to do it but installers are easy to make.
from robotjs.
Okay well, let's for a second say that node.js isn't already a one click install and installing robotjs globally doesn't get the job done. The idea here is to package a node executable, along with the prebuilt binaries and the robotjs library. You're going to need a lot more features if you plan to replace AutoHotkey. For instance, you'll probably need to include other support libraries which may or may not have native addons. Maybe you'll want to ship an editor as well with some double click to execute
action?
My point is that it's already trivial to use and install node and other libraries, if you're making an installer you will have to ask yourself whether you'll be installing node as well (at which point why not just install node and robotjs normally). If you're not installing node then you're missing out on all the simplicity of npm which means preinstalling a bunch of libraries which the user may or may not need.
I'm just brainstorming here btw :-D
from robotjs.
Also good news, I just found out that you can upload node files to NPM directly. I always thought they disallowed that which is why everybody was using a CDN. But apparently it works, my only question is why haven't I come across anybody doing this before. Am I missing something? Assuming a library is targeting Node 0.12.x for windows, why not just store the addon on NPM?
from robotjs.
Using node-pre-gyp lets you easily automate the build process using TravisCI and AppVeyor. I think bumping the project version and publishing to npm isn't as clean.
from robotjs.
It's not as clean but it gives you the most control over your build environment. For instance I have 12 VM's setup specifically to test and deploy my project with tightly controlled build configurations to ensure that it'll work on the largest number of systems. Although TravisCI and AppVeyor make things easier, it also disconnects us from what is arguably the most important step in the process. Also, with a project like robotjs, writing fully automated test cases is not possible which makes CI tools useless.
from robotjs.
Hi,
I am trying to use Robotjs which executes "node-gyp rebuild" in the script. But unfortunately it does not work for Ubuntu 14.04. Then I tried in Windows 8 and used your "node-pre-gyp" but its still not working. I am attaching the screenshot for the logs of the "npm install" command in cmd(Windows) in the project folder.
Versions:
node-gyp -> 2.0.2
node-pre-gyp -> 0.6.9
node -> 0.12.7
npm -> 2.11.3
Thanks for the support. :)
from robotjs.
I would like to vote for this feature.
Installing on windows should be "single click". This will significantly boost usage of the module.
from robotjs.
Agreed! I've got some ideas for how to set this up.
from robotjs.
cant wait to see, this will make it much easier for me to proceed with my use case. Thanks!
from robotjs.
Hey @blak3r2! Would you mind opening a new issue? This issue is for tracking progress on the Windows installer. Thanks!
from robotjs.
The error you got happens when the module was compiled for a 64bit architecture, but is ran on 32bit. There's more detailed instructions for Windows here.
I don't believe a binary has to be compiled on the same version of Windows, but it'd believe it since different dev tools are used.
from robotjs.
Related Issues (20)
- install robotjs is confused, why not provider package like nutjs HOT 2
- Mouse pointer doesn't work in locked screen of MacOS while using screen share app
- [Bug]: Fatal error in V8: v8 ArrayBuffer NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers, or disable the sandbox. HOT 1
- Multiple compile warnings and an error in 0.6.0 with node 16.14.2 - error in mouse.c HOT 3
- How to stop moveMouseSmooth?
- i hope one day u implement Image search HOT 1
- Returned image buffer has Red and Blue channels swapped [b, g, r, a] HOT 1
- mouseMove 960, 540 does not move to center of screen 1920x1080 HOT 2
- How to make screen of visible window on macos? HOT 2
- git clone npm i why error HOT 1
- All key events continuously hold down keys on Windows only. HOT 1
- Does not work on windows 11 HOT 1
- Using the typeString() method does not let you find the name of a file.
- Installing for nw.js - "A dynamic link library (DLL) initialization routine failed."
- Robotjs doesn't work with Electron, current time 2023.11.27 HOT 3
- or
- In the multi-instance tool, RobotJS is not working. There are no issues with reading properties, but moving the mouse or pressing the keyboard is not functioning correctly.
- Is there anyway to use this library in Nextjs app
- I cannot install robotjs HOT 5
- UTF-8 client type string 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 robotjs.