Closed mrose17 closed 10 years ago
Hi there,
I have no time for completing the readme at the moment, but right out of my memory i think it is as easy as installing npm and writing
npm install
... or ...
npm install -g
... for global install
Then you enter your project directory and write
npm link telldus-core-js
... to be able to include telldus-core-js in your project
thanks very much for getting back to me. i tried those steps earlier before deciding to bother you (-;
two questions:
thanks,
/mtr
Hehe :)
when the tdtool --list command works all should be ok.
What error message do you get on npm install ?
Seems like telldus-core is included with Telldus Center on Mac
now i understand: i misunderstood! i was thinking that doing an npm install would do all the heavy lifting of getting the telldus-core package, doing the compile/install, etc.
there error is what you'd expect for a system without the libraries:
npm http GET https://registry.npmjs.org/telldus-core-js npm http 304 https://registry.npmjs.org/telldus-core-js
telldus-core-js@0.0.6 install /private/tmp/node_modules/telldus-core-js node-gyp configure build
CXX(target) Release/obj.target/telldus/telldus.o ../telldus.cc:13:10: fatal error: 'telldus-core.h' file not found
^
1 error generated.
understood. i was just looking for a turn-key install: many of the folks who use the package that i would like to use telldus-core-js are good for "npm install -l" but aren't really skilled for downloads/compiles/etc...
Oh, no npm install does only take care of the node-side of things. Hope it runs smooth from now on :)
I'll make a complete readme in a couple of days, this were great feedback for that!
thanks!
@mrose17 , Could you try if a simple npm install telldus
do work on mac now?
It does work on mac!
I guess the user needs Xcode installed to be able to build it though.
Thanks :+1:
We/you/someone should look in to what's needed to get it working on Windows though, had a quick look earlier today but I got stuck quick when it came to linking the library. I guess it's C:\Windows\System32\TelldusCenter.dll that needs to be "linked" somehow?
Haha just noticed you did a commit 14 minutes ago for Windows :+1:
Yeah, don't know what modifications might be needed to the .gyp file tough. Didn't even get the compiler going as there is some complication with node-gyp and 64-bit windows. I'll create an issue on that :)
hi. thanks for looking into this. requiring Xcode is fine; no one gets to compile anything on a mac these days without it…
i tried both this:
npm -l install telldus
and
npm -l install git://github.com/Hexagon/node-telldus.git
and got the same error as above, i.e., it doesn't attempt to download any telldus sources, it just goes straight to trying to compile telldus.cc
sorry!
I am afraid it isn't possible to script all prerequisites in this case, even on Linux you'll have to manually install telldus-core prior to running npm install telldus
.
I'm not a 100% sure though, so @nilzen should give a 2nd opinon :)
Yes installing Telldus Center from telldus.se is a prerequisite before installing telldus via npm.
thanks. ok, i'll install it on a VM and send a pull request with the exact installation instructions. i still wish we could build this from source, perhaps in the future.
thanks!
@mrose17 I don't get what you are after, compiling Telldus Center from source? We don't want/can't to distribute the source for Telldus Center through npm.
all i want from source is telldus-core, not telldus-center. if we can build that from source (they have a github repository with a mirror, by the way), then that's great.
why build from source: because then i don't have to worry about toolchain/library incompatibilities between node and the telldus-core and the libraries they use.
if you look at a package like node-openzave, when you do the "npm install", it fetches the openzwave source, builds it, then builds the glue file, etc. that means i can just put node-openzwave in the dependencies section of my package.json and the user just has to go get a coffee… ditto for the noble package (BLE for node.js)
that's my goal here: i want to be able to add "node-telldus" to my package.json, and when the users of my package do "npm -l install", they don't have to do anything other than check email and twitter while everything gets built.
does that make sense? if i'm missing something, please let me know!
thanks!
If you manage to get it working and it's ok with their licenses ut sounds great!
+1
hi. i couldn't find an email/twitter/etc. for you, so:
hexagon - would you be kind enough to help out a fellow node.js person and augment the read me.md file explaining how to get telldus-core built on a mac? presumably with that in place, your wscript will work well.
sorry and thanks!
marshall