Commit Graph

97 Commits

Author SHA1 Message Date
Jesse Rosenberger
66b3ecfa85 Cleanup and comment dev-bundle-lib.psm1. 2017-10-14 13:37:20 -04:00
Jesse Rosenberger
9b989e2ee2 Remove Add-ToExistingPath.
The Generate Dev Bundle process no longer requires any modifications
to the $PATH, preventing environmental artifacts which pile up when
running the script over and over again.
2017-10-14 13:37:20 -04:00
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
Jesse Rosenberger
0dac129770 Introduce os.windows.x86_64 architecture for 64-bit Windows.
This commit reverts much of the work @hwillson had put in place for
meteor/meteor#9173, which made it possible for 32-bit and 64-bit
Mongo versions to exist in harmony within the same dev-bundle.  That
hard work was not in vein though as it offered invaluable research.
Ultimately, this showed that a more aggressive approach would be ideal,
even if the proposed option would have worked great in the short-term.

In the wake of the news that Mongo would no longer be supporting 32-bit
versions, these changes are important so 32-bit users of Meteor can
continue to have a functioning Mongo binary in development, while still
allowing Meteor to ship newer Mongo (e.g. 3.4+) binaries for 64-bit
users.  This is particularly relevant for Windows users, who have
previously only had 32-bit Meteor builds and represented a majority of
"32-bit" development, despite the fact most of their hosts supported
64-bit.  During another time in Meteor's life, this made sense.

This commit takes improved functionality to the next level (and makes
the aforementioned changes obsolete) by introducing support for building
and shipping Meteor for Windows in a 64-bit flavor (in addition to
32-bit), which will hopefully solve a number of performance matters on
Windows by using binaries which are pre-compiled for 64-bit, rather than
forcing the Windows kernel to deal with 32-bit binaries.  While Windows
has shown it's quite capable of dealing with such a situation, it seems
more and more clear (given improvements in underlying dependencies) that
performance gains could be had by freeing Windows of its 32-bit work.

This commit also further perpetuates the "archinfo" plot-line with more
story (about Windows) and various spelling corrections.
2017-10-14 13:36:29 -04:00
Jesse Rosenberger
ab111e7800 Detect dev_bundle download errors and fail appropriately on Windows.
This is in an attempt to resolve a situation which could occur when the
extraction of the dev_bundle.tar fails with an EOF error, but the tool
continues as if the file was fine.  Ultimately the, error preference
set in the PS1 script is only observed in the case of PowerShell
ErrorLevel and not just an error condition encountered in a command.
2017-03-30 16:12:19 +03:00
Jesse Rosenberger
9d7cf49511 Support SAVE_DEV_BUNDLE_TARBALL caching on Windows dev_bundle install
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
2016-11-03 13:19:36 -04:00
Jesse Rosenberger
cba649f709 Add Newlines to end of .gitignore files, specifically the new app skel
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)

Closes meteor/meteor#7786
2016-09-26 15:32:08 +03:00
Ben Newman
d60a0b90ee Make it possible to uninstall Meteor on Windows.
If this works, the uninstall command should be:

  misexec /x {1B1B4C6E-371D-4027-80AB-27922ABD7EE4}
2016-06-21 11:05:32 -04:00
Ben Newman
bae5983d59 Merge branch 'devel' into release-1.3.3 2016-05-27 00:02:48 -04:00
Ben Newman
e330a661c5 Make Windows installer always reinstall Meteor.
Fixes #6837.
2016-05-25 00:01:52 -04:00
Wexpo Lyu
78560b34d2 Remove "free service" and add package publishing. (#6685) 2016-05-24 15:11:16 -07:00
Avital Oliver
84177ab7de Windows installer: Split title text
Now it reads:

Installing Meteor,
The JavaScript App Platform
2015-05-20 20:26:54 -07:00
Avital Oliver
966a61f184 Windows installer: Change title text on progress
Now it says "Installing Meteor, The JavaScript App Platform".

Also make it say "Uninstalling" when we're... uninstalling.
2015-05-20 14:26:08 -07:00
Avital Oliver
b416cf5819 Windows installer: Fix on Windows Server 2012
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*)
2015-05-20 14:26:08 -07:00
Avital Oliver
49b358e981 Windows installer: Always install latest version
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.
2015-05-20 14:26:07 -07:00
Avital Oliver
2f44cab535 Windows installer: Cancel button works immediately 2015-05-20 14:26:06 -07:00
Avital Oliver
274b779847 Windows Installer: New API for downloading tarball
This API actually lets us download the bootstrap tarball from cloudfront
on Windows Server, /and/ correctly reads the proxy settings from Internet
Explorer.
2015-05-20 14:26:06 -07:00
Avital Oliver
88c09fde3f Revert 808a276eab
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
2015-05-20 14:26:05 -07:00
Slava Kim
698b208a02 Quit the installer process if running in cli 2015-03-31 14:11:10 -07:00
Slava Kim
d978bc7c82 Don't broadcast a dead message that blocks the process from exiting 2015-03-31 12:35:53 -07:00
Slava Kim
1612a7509a Don't show a confirmation popup when running w/o UI 2015-03-31 12:34:45 -07:00
sashko
8e4f645a00 UrlEscape the login/register data from installer 2015-03-30 18:10:32 -07:00
sashko
21b1592953 Improve error message and loading text 2015-03-30 17:28:04 -07:00
sashko
4b01b2ad9b Add message that says installing might take a minute 2015-03-30 17:15:06 -07:00
sashko
b6fb6f5444 Change output name 2015-03-27 11:37:31 -07:00
sashko
f80fa24b64 Fix build script, and un-cache tarball 2015-03-25 19:20:26 -07:00
sashko
808a276eab Bundle the boostrap tarball inside the installer
At build time
2015-03-24 21:28:50 -07:00
Avital Oliver
178f337882 Remove echo mistakenly left in code 2015-03-24 20:35:11 -07:00
Avital Oliver
c03972b7ca Allow using test dev bundles on Windows
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.
2015-03-24 20:28:03 -07:00
Avital Oliver
a4dba6c83d Windows installer: Inform Win 8.1 users to restart
(We'll try to fix this after the RC)

Conflicts:
	scripts/windows/installer/WiXInstaller/Resources/Theme_Meteor.xml
2015-03-24 17:28:42 -07:00
sashko
127163f344 Fix text on last screen after uninstall 2015-03-24 11:28:59 -07:00
Slava Kim
81f7ee7dbd Send agentInfo along-side the message from the installer login actions 2015-03-23 20:01:27 -07:00
Slava Kim
27042c43d9 Whitespace changes 2015-03-23 20:01:26 -07:00
Sashko Stubailo
b415ecea8d Broadcast settings change when done installing 2015-03-13 11:42:34 -07:00
sashko
5d482fa930 Fix typo 2015-03-12 22:37:54 -07:00
Sashko Stubailo
cdd666ddc0 Add link to Windows resources to installer 2015-03-12 22:31:52 -07:00
Avital Oliver
0f270c9f13 Windows installer: Login and signup against real server 2015-03-12 20:39:58 -07:00
Slava Kim
9b9dfbbf35 Kill some dead code in the installer
6K more to go
2015-03-12 17:56:45 -07:00
sashko
0ef83caa74 Change line break for matt 2015-03-12 13:28:41 -07:00
Sashko Stubailo
6cb13b79c4 Mention deploy is free 2015-03-12 13:20:34 -07:00
Slava Kim
8f3c305037 Change the url of the packages-bootstrap tarball to cloudfront (CDN) 2015-03-12 12:40:09 -07:00
Slava Kim
b03eadc5b0 Remove the trailing space from the reported user agent 2015-03-11 22:17:10 -07:00
Slava Kim
869bf4405f Always set the user agent header in post requests from installer 2015-03-12 04:31:20 +00:00
sashko
516c883d40 Change text to say "Sign In" 2015-03-11 21:28:37 -07:00
sashko
d6c1a40e5d Allow closing the window on login page 2015-03-11 21:21:17 -07:00
sashko
13f5115dc4 Make login/register step have column layout
Also, make the button say "finish" which I think might be good enough
to ship.
2015-03-11 21:17:43 -07:00
sashko
be47860991 Move stuff around and make links work 2015-03-11 20:47:57 -07:00
sashko
36dc395dc8 Move buttons a bit again 2015-03-11 20:20:03 -07:00
sashko
ef1c13ea6a Move buttons a bit 2015-03-11 20:05:46 -07:00
Avital Oliver
f695f5e8a1 More UX improvements to Windows Installer 2015-03-11 20:04:09 -07:00