Open marcopiraccini opened 8 years ago
Using this with electron (which is a really awesome place to use this module by the way) is a really pain because of this reason. Pre-build binaries for this would be awesome.
See also #104
+1
hello ,can send a pre-compiled files to my mailbox it? I currently use windows system~ xiong_song@126.com thanks! @marcopiraccini
I really hope to provide pre-compiled version. Because I tested many times in a virtual machine, or compile unsuccessful, too much trouble.
@tojocky
Like Electron, offer versions for each platform, you know, going to the user's computer is not easy to compile node-printer.
Could you please prepare a PR?
@marcopiraccini @tojocky I'm sorry, I'm a web developer engineer, not C language, very sorry. 😞
Did a test run and was able to generate release and publish: https://github.com/vasumahesh1/node-printer/releases/tag/0.2.1
I hope this can work. Will submit a PR soon.
Edit: Tested it with Github release. It seems to be working. I had changed the code where you require the node_printer.node
file. I have to test it if the lib is working or not.
PS P:\node-test> npm install vasumahesh1/node-printer
npm WARN package.json node-test@1.0.0 No description
npm WARN package.json node-test@1.0.0 No repository field.
npm WARN package.json node-test@1.0.0 No README data
|
> printer@0.2.1 preinstall P:\node-test\node_modules\printer
> npm install node-pre-gyp
npm WARN package.json printer@0.2.1 No license field.
node-pre-gyp@0.6.28 node_modules\node-pre-gyp
├── semver@5.1.0
├── nopt@3.0.6 (abbrev@1.0.7)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── rc@1.1.6 (ini@1.3.4, deep-extend@0.4.1, strip-json-comments@1.0.4, minimist@1.2.0)
├── npmlog@2.0.4 (ansi@0.3.1, gauge@1.2.7, are-we-there-yet@1.1.2)
├── rimraf@2.5.2 (glob@7.0.3)
├── tar@2.2.1 (block-stream@0.0.9, inherits@2.0.1, fstream@1.0.9)
├── tar-pack@3.1.3 (uid-number@0.0.6, once@1.3.3, debug@2.2.0, readable-stream@2.0.6, fstream-ignore@1.0.5, fstream@1.0.
9)
└── request@2.72.0 (aws-sign2@0.6.0, tunnel-agent@0.4.3, oauth-sign@0.8.2, forever-agent@0.6.1, caseless@0.11.0, is-type
darray@1.0.0, stringstream@0.0.5, aws4@1.4.1, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.
2, node-uuid@1.4.7, qs@6.1.0, combined-stream@1.0.5, mime-types@2.1.11, form-data@1.0.0-rc4, bl@1.1.2, hawk@3.1.3, http-
signature@1.1.1, har-validator@2.0.6)
> printer@0.2.1 install P:\node-test\node_modules\printer
> node-pre-gyp install --fallback-to-build
[printer] Success: "P:\node-test\node_modules\printer\lib\binding\node_printer\node_printer.node" is installed via remote
printer@0.2.1 node_modules\printer
@vasumahesh1 thanks!!! 👍👍
Already perfect run it!
This is a project simply can not run, do not write on the windows compatible.
@xiongsongsong You can download the releases from my repo.
https://github.com/vasumahesh1/node-printer/releases/tag/0.2.1
I have tested the 32bit & 64bit Electron releases. Both are working fine.
Haven't tested the Win32 builds. But pretty sure they will work. To install:
# For electron builds
npm install vasumahesh1/node-printer --runtime=electron --target=0.36.1 --target_arch=x64
npm install vasumahesh1/node-printer --runtime=electron --target=0.36.1 --target_arch=ia32
# For regular builds
npm install vasumahesh1/node-printer --target_arch=ia32
npm install vasumahesh1/node-printer --target_arch=x64
So far I am using only the 0.36.1 electron version. If you want another version to be built let me know.
@vasumahesh1,I use your "node_printer-v0.2.1-node-v47-win32-ia32.tar.gz" , when i use the method of printDirect,it tip me "Uncaught TypeError: Expected 5 arguments",how can i call this method?
@vasumahesh1 Any chance you could do 1.2.7?
@Lithas Yeah I look into it... been busy with work. Will get back when they are up.
@Lithas Hey check now, I built it. You might wanna test it as I don't have 1.2.x electron with me. Let me know if it doesn't work.
@vasumahesh1 Thanks for being so quick! I'll try to test it out tonight and let you know for sure
Will these builds be released officially? I'd love one for Mac, as it's a pain having to install XCode just for one package /:
Would be nice to have these - this library is the most painful of all that I use because of the lack of prebuilt binaries. Makes it a pain to work with :(
It would be good to have binaries for Electron builded for Windows / Linux and Darwin + released on github If you agree, I can prepare a PR for that