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

Create Windows Installer. #57

Open
octalmage opened this issue Jul 30, 2015 · 25 comments
Open

Create Windows Installer. #57

octalmage opened this issue Jul 30, 2015 · 25 comments

Comments

@octalmage
Copy link
Owner

It would be awesome to have an easy Windows installer that installs all of the dependices, including Node.js if needed. This would let people that are just interested in the automation use RobotJS.

I want this project to be as accessible as AutoHotkey.

@Deltatiger
Copy link
Collaborator

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).

@octalmage
Copy link
Owner Author

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.

@octalmage
Copy link
Owner Author

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.

@Deltatiger
Copy link
Collaborator

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.

@hortinstein
Copy link

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

@octalmage
Copy link
Owner Author

For an electron app you would just need to copy the node_modules folder.

@hortinstein
Copy link

right, but would anyone using it still need to have visual studio installed (for windows)?

@octalmage
Copy link
Owner Author

Nope! That's only needed for compiling RobotJS. Once it's compiled the binary (robotjs.node) can be distributed without the dependencies.

@hortinstein
Copy link

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.

@octalmage
Copy link
Owner Author

No problem! And keep me updated. I'd love to see what you're making.

@dkrutsko
Copy link

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.

@octalmage
Copy link
Owner Author

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.

@dkrutsko
Copy link

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).

@octalmage
Copy link
Owner Author

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.

@octalmage
Copy link
Owner Author

It's just an idea, not sure if I'm going to do it but installers are easy to make.

@dkrutsko
Copy link

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

@dkrutsko
Copy link

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?

@octalmage
Copy link
Owner Author

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.

@dkrutsko
Copy link

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.

@shubhamsaxena123
Copy link

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. :)

npminstall

@vshymanskyy
Copy link
Contributor

I would like to vote for this feature.
Installing on windows should be "single click". This will significantly boost usage of the module.

@octalmage
Copy link
Owner Author

Agreed! I've got some ideas for how to set this up.

@hortinstein
Copy link

cant wait to see, this will make it much easier for me to proceed with my use case. Thanks!

@octalmage
Copy link
Owner Author

Hey @blak3r2! Would you mind opening a new issue? This issue is for tracking progress on the Windows installer. Thanks!

@octalmage
Copy link
Owner Author

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.

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

6 participants