The SAVE_DEV_BUNDLE_TARBALL environment variable is already supported in the Unix version and this mimics that functionality in the Windows script. Use of this flag makes debugging much less painful, especially when switching branches (for example, during a `git bisect`) as the dev_bundle can be cached locally.
I also replaced a couple un-related uses of `echo` with `Write-Host` which is the preferred way to output messages in PowerShell as it supports more options.
Fixes: developer experience
Even though I think the fight is a bit futile, it is considered best practice to have newlines at the end of all files. At the request of meteor/meteor#7786, this commit adds newlines to the end of the new app skeleton `.gitignore` file. These skel files are used when generating new meteor apps so this avoids perpetuation of this problem into futrue generations. ;)
In an effort to beef up this PR, I also took the liberty of fixing the few other Meteor files which were lacking newlines (all `.gitignore` files)
Closesmeteor/meteor#7786
Turns out there was unused code that dealt with strings
that may or may not have been initialized, and treated
them as multi-byte strings even though they were unicode
strings.
I don't actually understand why this would cause a failure
only on Windows Server 2012, but this change definitely fixed
the problem, and the code removed was unnecessary and wrong anyways.
While at it, improved error reporting in case we fail to
get the link to the bootstrap tarball, or download it.
Also fixed a bug that broke login/signup (due to passing a
char* instead of a wchar_t*)
Uses the https://packages.meteor.com/bootstrap-link
URL to generate a link to the windows bootstrap tarball.
With this change we no longer have to build a new installer
for every release.
This API actually lets us download the bootstrap tarball from cloudfront
on Windows Server, /and/ correctly reads the proxy settings from Internet
Explorer.
This is a step on the way to building an installer that always
fetches the latest release of Meteor, so that we don't need to
build a new installer for every release.
TODO:
* Expose a new endpoint on https://package.meteor.com with the latest
release, and consume it in the installer
* Use libcurl to fetch the installer, so that we can bypass the TLS
settings on Windows Server which by default don't let you fetch
HTTPS assets that use TLS 1.2 (as do ours)
* Automatically detect and use the proxy settings configured in
Internet Explorer, eg
http://stackoverflow.com/questions/202547/how-do-i-find-out-the-browsers-proxy-settings
This duplicates logic we had for Mac/Linux that lets you
set a USE_TEST_DEV_BUNDLE_SERVER environment variable
to try running a newly built dev bundle before publishing
it.
This is a temporary solution to the problem of installing Meteor on Windows Server 2008 and Windows Server 2012.
On Windows Server, the requests using TLS 1.1 and TLS 1.2 are disabled by default.