jansmolders86 / mediacenterjs

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

Windows installer #247

Open BananaAcid opened 5 years ago

BananaAcid commented 5 years ago

What an installer should do and what should be fixed:

  1. SHOULD NEVER require UAC to install (rights asInvoker is enough)

  2. should by default install to C:\Program Files\MediacenterJS

  3. Include the node.exe file. Or download during the installation process to program folder LOCALLY into the BIN folder ! and probably the npm tool. And the dependencies.

  4. package.json should contain some line like { "engines" : { "node" : ">=8.5.0" } }

    a. fs-extra: use the new const fs = require('fs').promises way to not need fs-extra and work with node>10.

    b. sqlite3 has been build against a specific version of node. gyp will mess this up. It does usually work, if for sqlite3, the newest version is used, because pre-gyp kicks in and downloads the precompiled binary.

    c. socket.io needs to be updated as well

  5. additionally: add electron to be able to run in background, only having a tray icon or alike (no need to package into electron, could also be downloaded during install).

  6. should run compact /C /S:node_modules *.* to NTFS-Compact that directory to keep installed size small - or: compact /C /S node_modules\*.* to include node_modules for all future modules.

  7. run del /F/S/Q node_modules & npm install (rd /S/Q node_modules) at the end - if dependencies were not packed into the installer for the specific node version.

    • needs current environment path to be prepended with the bin\node... path to work (best done in the mediacenter.exe)
  8. JADE became PUG ...

smigou31 commented 4 years ago

I tried that way, but to no avail I can't install on windows 7