GithubHelp home page GithubHelp logo

Create Windows Installer. about robotjs HOT 25 OPEN

octalmage avatar octalmage commented on June 25, 2024 1
Create Windows Installer.

from robotjs.

Comments (25)

octalmage avatar octalmage commented on June 25, 2024 1

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

from robotjs.

Deltatiger avatar Deltatiger commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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.

Deltatiger avatar Deltatiger commented on June 25, 2024

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.

hortinstein avatar hortinstein commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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

from robotjs.

hortinstein avatar hortinstein commented on June 25, 2024

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

from robotjs.

hortinstein avatar hortinstein commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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

from robotjs.

dkrutsko avatar dkrutsko commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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.

dkrutsko avatar dkrutsko commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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

from robotjs.

dkrutsko avatar dkrutsko commented on June 25, 2024

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.

dkrutsko avatar dkrutsko commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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.

dkrutsko avatar dkrutsko commented on June 25, 2024

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.

shubhamsaxena123 avatar shubhamsaxena123 commented on June 25, 2024

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

from robotjs.

vshymanskyy avatar vshymanskyy commented on June 25, 2024

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.

octalmage avatar octalmage commented on June 25, 2024

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

from robotjs.

hortinstein avatar hortinstein commented on June 25, 2024

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

from robotjs.

octalmage avatar octalmage commented on June 25, 2024

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

from robotjs.

octalmage avatar octalmage commented on June 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.