Files
meteor/scripts/windows
Jesse Rosenberger c81c2fb2b8 Re-work Windows "Generate Dev Bundle" process.
This is a re-write of the generate-dev-bundle.ps1 script, which occurred
during debugging of an unrelated concern of the (new) 64-bit Windows
build on our Jenkins server.  Ultimately, I'm afraid this script doesn't
solve the problem I originally set out to fix, which was a Windows
long-file path concern.

The hunch behind that thinking was that the use of npm@1 to install
npm@5 could be causing problems, since npm@1 had no concept of nested
node_modules directories.  We had used npm@1 because Node.js
for Windows hasn't always offered (via nodejs.org/dist/) versions
including npm which we could use to install our own requirements.
Happily, that is no longer the case!

While this script now deals with long paths much more gracefully itself,
I'm not sure it completely quelled the long-path issue, and there are
still some directory trees which are longer than I think they should be.

The warnings I was seeing may not have harmed the actual bundle and were
more problematic for this build script itself when it tried to deal with
the aftermath of all those files, since native Windows commands struggle
to deal with long file paths (when cleaning up, etc.).

In the end, this script does have performance enhancements though! For
starters, it's nearly twice as fast at finishing.  Most of this was
gained by avoiding back-and-forth moving of large file structures,
opting instead to directly install into the targets when possible.

It also ensures that the npm build cache is not bundled, which started
occurring since our modification of the $HOME and $USERPROFILE variables
led npm@5 to think the npm cache was in the root of the bundle.

Additionally, it no longer modifies the $PATH, in any way, during the
build. This became particularly helpful during testing when I found that
PowerShell maintained that $PATH in the environment of the host shell.

I'd like to say it increases readability of the script, which had
become a bit of a patchwork quilt, but that's YTBD and YMMV.

This is my first "complete" PowerShell script myself so it probably
still leaves some things to desired, formatting wise.  Functionality-
wise, I hope it's improved.
2017-10-14 13:36:29 -04:00
..

To build the Windows installer, run .\build-installer.ps1 from within
PowerShell.

Prerequisites:
==============

Install Visual C++ 2010 Express, which can be found here:
* http://www.visualstudio.com/downloads/download-visual-studio-vs

Then, install Visual Studio 2010 Service Pack 1 here:
* http://www.microsoft.com/en-us/download/details.aspx?id=23691

Now, install WiX Toolset 3.8 from here:
* https://wix.codeplex.com/releases/view/115492

Now restart your command line process before running the build script
again.