jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 243 forks source link

Does not work on windows out-of-the-box. #204

Closed aalku closed 8 years ago

aalku commented 8 years ago

I installed node.js latest version and then run setup.exe and got a lot of errors. I managed to understand I requiered a previous node.js version and tried node-v0.12.7-x86.msi (tried x64 too). Is seems two errors are left. I can't sqlite3 package. I am trying to get the build-from-source dependencies (python 2.7, visual studio, who knows). The other error is this line on server.js "logger.info('Starting server' .green.bold);" but it does not worry me. I just remove ".green.bold" and that's it.

tracker1 commented 8 years ago

With binary modules, you should install the latest Visual Studio (2015 community should work, make sure to install the C++ bits), as well as the latest python 2.x ...

As to the node version, the latest node 0.12.x is probably your safest bet.. if need be, you can build (npm install) on a separate system from where you deploy (assuming a node version match), so you can build separately.

sqlite3 tends to lag behind a bit on supporting the latest node version... 4.x being the current and relatively new stable target, I would expect the modules to all work within a couple months.

idefy commented 8 years ago

Same issue for me. I have installed latest .Net C++ 2015 redistriuble packages both x86 x64 but still get errors on builds with sql lite 3

tracker1 commented 8 years ago

@idefy .Net C++ redist is NOT a compiler.. you need the MS VC++ compiler installed... if you install the latest Visual Studio Community (2015), you'll get the compiler... you also need the latest Python 2.x installed for node's build system for binary modules.

idefy commented 8 years ago

Ok, it makes sense now, I did not understand it needed the compiler part. Still, I find that there must be a way to do without the 4-6Gb Visual Studio IDE to get this running :( What is it used for ?

tracker1 commented 8 years ago

I think you can download the MS C++ compiler separately, but you'll also likely need the windows development kit, and even then, no idea if/how this works with node... it's easier to instal Visual Studio, and make sure to check the C++ options... You don't need to run the full IDE, but it would take up some disk space.

Some binary modules have pre-built binaries for windows that are automatically downloaded so a build environment isn't needed... the maintainer(s) of the sqlite wrapper don't do this, and often lag behind releases (they didn't support iojs at all early on).

It might be nice to use something that is native/internal or has pre-built binaries... I think this will improve with time... Also, I also think that there may be room for pre-built/bundled packages for mediacenterjs. Though testing with npm@3 would be a good idea, so that the node_modules path is as flat as possible for windows.

idefy commented 8 years ago

Yes it doesn't work with just the C++ compiler. I will install the community edition and strip down as many features as possible to see how small I can get.

It would be nice to make the sqlite optional and have other alternatives for database, that way .Net Visual Studio installation won't be mandatory. Of course that means implementing some type of abstraction to the data access layer, but it would result in a much more flexible solution at the end.

tracker1 commented 8 years ago

@idefy I pretty much agree... it would be possible to use an embedded solution, but would need to have persistence worked out, and some means of limiting queries to specific subsections. I'm still hoping the guys behind the sqlite3 module get the support they need in order to stay closer to current and adopt prebuilt module downloads... The linux ABI and windows APIs have been pretty stable, and nan makes it easier, but not entirely easy...

Unfortunately I'm not nearly experienced enough with C/C++ to be much help, and I don't have the amount of free time that would be needed to come up to speed.

Might want to make a request for bundled (pre-built) releases for windows and OSX users as github releases...

jansmolders86 commented 8 years ago

The new windows setup should fix the intial issue in this thread. We'll continue in the new thread to discuss how to automate the build process