Add Windows support and first-class Linux support #946
Conversation
matheuss
added Type: Enhancement Status: Community feedback wanted Priority: OMG Maximum Status: In Progress Status: Review Needed Type: Compatibility Platform: Linux Platform: Windows
labels
Oct 31, 2016
matheuss
added this to the
v1.0.0
milestone
Oct 31, 2016
matheuss
assigned rauchg and matheuss
Oct 31, 2016
matheuss
changed the title from
Feature/windows linux to Add Windows support and first-class Linux support
Oct 31, 2016
This was referenced Oct 31, 2016
luisrudge
commented
Oct 31, 2016
|
will we be able to run cmder inside of it? http://cmder.net/ |
matheuss
referenced
this pull request
Oct 31, 2016
Closed
Make Linux UI frameless (use custom title bar) #795
AlmirKadric
commented
Oct 31, 2016
|
OH S**T it's finally here |
factormystic
commented
Oct 31, 2016
•
|
Windows:
|
|
1: Ops, I forgot to write about that on the PR description. 1.1 Install VC++ Build Tools Technical Preview using the Default Install option This is necessary to build 2 and 3: I'll look into that 4: Yeah, this happens when you're running in dev mode – it works as expected when you run the bundled application |
|
@luisrudge I don't think so But you can use |
|
A few bugs I noticed:
A very good start! |
|
@matheuss Maybe using pty.js will fix the |
supnate
commented
Oct 31, 2016
|
Really cool! But how do you guys make pty.js work on Windows! |
fhelwanger
commented
Oct 31, 2016
|
Looks great @matheuss
Despite all these shortcomings, AFAIK it's the best option for all platforms which is why we're using it |
jahe
commented
Oct 31, 2016
•
|
I followed the updated instructions in the pr description and by |
cchamberlain
commented
Oct 31, 2016
|
@jahe - What's your |
jahe
commented
Oct 31, 2016
•
|
calvinrbnspiess
commented
Oct 31, 2016
•
|
Getting the same error as @jahe and @factormystic.
|
|
I also get "spawn is not a function" and during install get errors during child_pty rebuild. Here's a gist. |
matthewp
commented
Oct 31, 2016
|
Would you like bug reports here, or does that create too much noise? Would be happy to wait until this lands. I've noticed some issues but probably not serious enough to block merging. |
|
@jahe @vailfire I can't reproduce @Specro from your gist, looks like that you're running on FWIW:
|
| + matrix: | ||
| + - platform: x64 | ||
| + | ||
| +image: Visual Studio 2015 |
Tyriar
Oct 31, 2016
Contributor
@matheuss are you sure you need this, VS Code's appveyor.yml doesn't have anything like it? Having said that, I don't know much about how images are used in appveyor.
matheuss
Oct 31, 2016
Owner
@Tyriar looks like Install-Product node 6 x64 is enough
matthewp
commented
Oct 31, 2016
|
Ok, here's a few things that i've noticed. With Windows 10 and:
|
|
@matheuss Whoops :D Yup, now it works correctly. I noticed that after some commands the name goes blank on the titlebar. For example, after |
jahe
commented
Oct 31, 2016
|
@matheuss I'm running the following system: windows 8.1 pro - 64 Bit - node v6.7.0 - npm 3.10.3 - Python 2.7.12 - Kaspersky 10.2.1.23 I've noticed that the output is slightly different when I run Output without administrator cmd:
Output with adminstrator cmd:
|
calvinrbnspiess
commented
Oct 31, 2016
•
|
After several attempts, I got it finally working for me. I'll try to describe all steps, although I don't know which step fixed the problem exactly. At first, make sure that your 1. Ensure you have an actual node.js and npm version installed
2. Install necessary node_gyp build tools (according to https://github.com/nodejs/node-gyp#readme)
3. Ensure that your python variable points to the installed executableI already had python in my PATH variable, pointing to
(Actual I think the problem was here) 4. Install dependencies
5. Try to build hyper
6. If it does not work yet?We can try to compile pty.js to verify that node_gyp is working as expected. Running the windows tests ensures that it is theoretically working when all tests are passed.
|
madcampos
commented
Nov 2, 2016
|
@luisrudge: @factormystic @matheuss: window maximizing/minimizing and snapping probably have to do with the way Will give it a try and report bugs here. |
madcampos
commented
Nov 2, 2016
|
Issues found:
The content update one is "solved" if i run Also I got the following errors when closing the app with the
|
jcolesio
commented
Nov 2, 2016
|
Any chance we could get AppVeyor to spit out the packaged version as an artifact? Would love to test but I don't have a machine I'm comfortable installing Python 2 on at the moment. Edit: Disregard this. See the post below from @madcampos for an alternative to installing Python 2. |
madcampos
commented
Nov 2, 2016
|
@zbuttram I used windows build tools to build, it installs python and visual c++ compilers in a way that it don't conflict with another installations (I use python 3 by default) |
tobihrbr
commented
Nov 2, 2016
|
Wow looks really nice. The design really fits windows. |
|
Thanks @madcampos, I can also confirm that totally works! Everything seems to be running fine for me. A little slow (like input lag slow), but I'm assuming that's due to running the dev build. EDIT: Can confirm things are much faster with a packaged version (from running EDIT 2: Doesn't look like this has been mentioned anywhere else, but the fix from #176 doesn't seem to be holding true in Windows. Not sure if that deserves a new issue or not. EDIT 3: Not sure where the issue would be with this one, but I'm also noticing that using the arrow keys (up and down) for history works in the Windows CMD shell, but not in bash or zsh running under the WSL. |
fhelwanger
commented
Nov 2, 2016
|
@jahe I was having the same error using |
|
On functionality within WSL, there is an upstream issue which causes issues within pty.js (and other ptys). Microsoft/BashOnWindows#111 |
jahe
commented
Nov 3, 2016
|
@fhelwanger thanks a lot. I updated to node v6.9.1 and npm v3.10.8 and it works like a charme! |
jahe
commented
Nov 3, 2016
•
|
Some things i noticed during test with hyper.exe:
|
jcolesio
commented
Nov 3, 2016
|
Any one having issues running bash.exe besides the arrow keys? Still cant figure out why the text is being highlighted when using bash.exe |
Linux Ubuntu 14.04 FeedbackAs a standalone window next to the default terminal:Hyper fullscreen:Vs. Gnome Terminal fullscreen:How the menu appears when fullscreen:Feedback
|
rumpelsepp
commented
Nov 4, 2016
|
The new titlebar with close, maximize and minimize buttons does not make sense in tiling window managers. :/ |
|
@rumpelsepp I wondered about that. What is best for tiling window managers? Have a config option to hide the entire title bar? |
rumpelsepp
commented
Nov 4, 2016
•
Yep. And maybe let it be toggleable by alt or something. |
jcolesio
commented
Nov 5, 2016
|
Noticed that if I start hypertern from Cygwin. I don't get the highlighting issues and I'm able to ssh into machines as needed . |
apiep
commented
Nov 6, 2016
lednhatkhanh
commented
Nov 7, 2016
|
+1 for @apiep idea, that's far nicer and easier to use than the current implementation! |
|
Just to add another bug i noticed. Setting bash as default shell in Windows trows an error : |
|
@stefanivic which bash and what path are you using? If you just used |
|
@Tyriar i tried to use %systemroot%\system32\bash and even to directly point to zsh shell with %systemroot%\system32\bash -c /usr/bin/zsh. |
|
@stefanivic some suggestions:
|
|
@Tyriar got it, i didn't use double . C:\Windows\System32\bash.exe this is what i ended with. Works now. |
jcolesio
commented
Nov 8, 2016
btd
commented
Nov 8, 2016
|
@jcolesio @stefanivic I do not have now, but had because of wrong markup in my PS1 variable. |
jcolesio
commented
Nov 8, 2016
•
|
@btd Edit: I noticed when I exit out of bash.exe, hyperterm console continues to highlight. |
|
I would guess that the background highlighting is related to hterm and/or hyper's styles somehow, Haven't seen that in vscode which uses xterm.js. |
|
I'm interested if there will be someway to change to elevated prompt cause without it things like chocolatey are hard to use. Two more things I noticed:
Also if anybody needs these, here's a gist of registry entries for menus @fhelwanger described. Just add the path to hyper executable. |
RangerMauve
commented
Nov 8, 2016
|
@Specro I'm pretty sure the CLS behavior you're seeing is working the same way it would in the regular windows console. |
jcolesio
commented
Nov 8, 2016
|
Trying to set back to default to see if that is the issue but this is totally different to the Mac OS version. For Windows version, its telling me to edit hyper.js |
|
@RangerMauve I thought so too but when I tried that in the command prompt it clears everything and brings the scrollbar to the top. It doesn't leave any parts of text above. |
madcampos
commented
Nov 8, 2016
|
@RangerMauve @Specro I think i saw the same |
johanpedroo
commented
Nov 8, 2016
|
@johanpedroo Check if you have VC++ Build Tools Technical Preview, also if you already have Visual Studio, just open it and install C++ tools trough it. Also make sure you are on python 2.7.x since node-gyp doesn't support python 3. After that just start all over and it should work. |
jcolesio
commented
Nov 9, 2016
|
:( still experiencing issues with bash.exe When I start hyperterm from cygwin, then call bash, I dont get that highlighting issues. Ideally would like to use WSL bash.exe instead. Sooooo close yet soo far. |
|
I believe this work achieved a state that's acceptable to live on HUGE thanks to everyone who contributed here! It was amazing to receive that amount of feedback Regarding arrow keys/history on Now I'll address everything that was reported/suggested here
I spent some time looking into it and I found that
I researched about it and found almost nothing
Again, found nothing about it. I'm pretty sure it's upstream and there's nothing we can do about it apart from opening an issue on electron/electron
Thank you! It was fixed on 24518b7
It's upstream
Since it's not a major issue, I'm leaving it available for an Issue/PR
We don't have it on Windows and Linux – so I don't think we'll have it for now on Windows
Agreed! It could be very useful on Mac and Linux too. I researched on how they do it on Windows and found this. Might be useful. PRs/issues are more than welcome! Thank you for your amazing work on matthewp:
This is not related to Windows – it's related to Hyper. Will be fixed soon!
Can't reproduce
Both are not specific to Windows. Will be fixed soon!
Can't reproduce
I believe this is not related to Windows – we have it on Mac and Linux too Regarding the window/tab title: thanks for reporting! Turns out that
AMAZING suggestion, thank you! Implemented it on 1867ba8
I decided to leave this for later – would love a issue/PR!
Thank you again! Fixed on 84993c9
We discussed this before on zeit.chat and we were not able to find a better solution other than the current one
I'm not sure how it works on Windows – maybe right clicking Hyper and
Can reproduce; no clue on how to fix |
|
@matheuss great news |
|
Also, forgot to share: |
| @@ -236,7 +236,7 @@ function install(fn) { | ||
| env.npm_config_target = '1.3.0'; | ||
| env.npm_config_disturl = 'https://atom.io/download/atom-shell'; | ||
| /* eslint-enable camelcase */ | ||
| - exec('npm prune; npm install --production', { | ||
| + exec('npm prune && npm install --production', { |
albinekb
Nov 10, 2016
Collaborator
maybe add this as a script in package.json?, then && works (even in fish)
albinekb
Nov 10, 2016
Collaborator
or run them with .then after each other
exec('npm prune').then(() => exec('npm install'))
fearphage
Nov 11, 2016
Contributor
FYI, you wouldn't have to use && in package.json.
"pretarget": "npm prune",
"target": "npm install",| return (<header | ||
| className={css('header', isMac && 'headerRounded')} | ||
| onClick={this.handleHeaderClick} | ||
| onMouseDown={this.handleHeaderMouseDown} | ||
| > | ||
| + { | ||
| + !isMac && |
albinekb
Nov 10, 2016
Collaborator
This looks a bit messy, but i guess it works. Maybe break the different cases to new stateless components?
matheuss
Nov 10, 2016
Owner
Hmm, sounds like a good idea, but I'm not sure how to execute it
It'd be something like<HeaderMac />?
albinekb
approved these changes
Nov 10, 2016
View changes
Overall great job!
Some minor things (regarding compatibility with fish shell) and some code-styling issues (huge block of if-cases inside JSX), otherwise nothing to complain about, and again great job
jcolesio
commented
Nov 10, 2016
|
I wonder if I'm having the highlighting issue due to me using wsltty for the bash console. |
matheuss and others
added
some commits
Oct 27, 2016
madcampos
commented
Nov 11, 2016
|
After update from commit 488e1e8 I'm getting the |
|
First of all I'm primarily interested in using hyper with Copy-pasteI found that CrashesWhen I switch active windows from hyper and wait for some time, I'm getting a reproducible crash
Hyper vs CmderConemu and Cmder been on windows for a while, but I didn't use them. I created a simple one-liner to test it out and I found that hyper doesn't have this overhead problem! 1..200 | % { perl -e 1 }Results
|
|
I saw on the GIF by @Specro that the scrollbar seems not to have a custom style fitting the style of Hyper. The default Windows scrollbar destroys the look and feel a bit. |
|
@levrik I've made an update to the scrollbars. Will push later in the day. |
|
@stefanivic This looks really nice :o |
matheuss
merged commit 9c90e19 into master Nov 11, 2016
|
|
|
I'll leave the branch alive for a while; will delete it when we're comfortable with everything. Thanks again to everyone that contributed! @madcampos That commit changed nothing related to the build step, nor @vors |
|
@matheuss I don't think that hyper+Powershell can be faster then native host for Powershell, but overhead seems negligible and it's impressive. |
Tyriar
referenced
this pull request
in Microsoft/vscode
Nov 11, 2016
Closed
Improve Windows support in integrated terminal #13625
|
@matheuss actually my statement about reproducible crash was wrong. I got it repro twice and could not repro it anymore as well. |
|
@factormystic That the snap feature of windows is not working and the minimize/restore animations are not there is caused by the |
aleksijohansson
commented
Nov 14, 2016
|
Really looking forward to this getting released! |
This was referenced Nov 19, 2016
jasonmit
commented
Nov 23, 2016
•
|
@jcolesio I also ran into this. The fix was to delete But the core issue is the color palette at the system level is partially leaking into hyper. Should I file a bug for this @matheuss and friends? Great work by the way :) |
calvinrbnspiess
referenced
this pull request
Nov 23, 2016
Closed
[Bug][Windows] pty.js failed to load #1027
jcolesio
commented
Nov 23, 2016
•
|
@jasonmit You da man!!!!!!!! worked ! all we need is the arrow keys to register ;) |
jasonmit
commented
Nov 23, 2016
|
@jcolesio Microsoft/BashOnWindows#111 looks to be the source of the the arrow key issue |
DanielPintilei
commented
Nov 24, 2016
•
|
|
brighthero
commented
Nov 27, 2016
|
When will there be a release windows version? |
|
In version 1.0.0. Likely coming in the next couple of weeks. cc/ @matheuss |
CodeTheory
deleted the
feature/windows-linux branch
Nov 27, 2016
howdoicomputer
commented
Dec 2, 2016
|
Oh my God, this is amazing. As a heavy user of cmder, I can't be happier that terminal innovation is coming to Windows. |
thekalinga
commented
Dec 10, 2016
|
Its not working on Ubuntu 14.04.
|
|
@thekalinga 2. On windows you need to use :
|
plessbd
commented
Dec 12, 2016
I believe most terminals ctrl+a moves to the beginning of the line and ctrl+e moves to the end of a line see: |
trodrigues
commented
Dec 13, 2016
|
I just landed here looking for info on how to run Hyper with Bash on windows and found this comment by @Tyriar. I wonder if there's a good place to document this to prevent someone getting so lost in the future. I don't see an FAQ section in the website. Happy to provide a PR for this but wondering where the best place is. |
webframp
commented
Dec 13, 2016
|
As mentioned by @plessbd:
It seems like a bad idea to override any gnu readline default keybindings without some way for the user to disable as the majority of shells (bash, zsh, fish) will implement basic readline bindings by default. I definitely prefer |
|
@webframp |
|
@webframp hterm interpret those actions as: |
webframp
commented
Dec 15, 2016
|
Thanks @ppot, ctrl+shift+a if not already taken would make sense as select-all and still preserves ctrl+a start of line behavior |
lasermarty
commented
Jan 17, 2017
|
Any news on 1.0.0? |
fhelwanger
commented
Jan 17, 2017
|
It's already released, 1.1.0 is the latest version: https://github.com/zeit/hyper/releases/tag/1.1.0 |
katacarbix
commented
Feb 15, 2017
|
I would like to see support for Bash on Windows (WSL). Maybe a setting in |
|
@katacarbix it's just a matter of putting PS: If it doesn't work, you need the absolute location |
AlmirKadric
commented
Feb 16, 2017
|
@katacarbix also take a look at this PR #1347 |
This was referenced Feb 21, 2017
sabahang
commented
May 5, 2017
|
@jasonmit @jcolesio had the same highlighting issue. It was one of the following registry keys that did the trick: Not sure which one did the trick. For other running into same issue try one by one until it works! no restart needed! |
19lmyers
commented
May 6, 2017
|
Why can't you just flag the buttons as non-draggable on the old design, so they can receive click events? |
|
Insted of commenting on this PR, please open new issue and it will be discussed there. |
















matheuss commentedOct 31, 2016
•
edited
TODO
Fix– 35df444npm prune; npm install --productionon WindowsFixa1aacdbNODE_ENV=production webpackon WindowsAdd a bigger9028726icon.icofor WindowsBuild on AppVeyorAddBuilding on Windowsto README.mdCtrl+T,Ctrl+Netc aren't working – related: #274Fix themaximizeandcloseSVGs – cc @CodeTheory @evilrabbitAdd padding to the hamburger menu, minimize, maximize and close buttons – cc @CodeTheory @evilrabbitDesign review – cc @CodeTheory @evilrabbit @rauchgAdd CSS classes to enable customization of the hamburger menu, minimize, maximize and close buttons.header_shapeis enoughTest on macOS to make sure thatpty.jsdoesn't introduce any weird behaviorSummary
child_pty=>pty.jsto enable Windows support (7f29ead)Why this new design🤔
When you create a frameless window, you need to specify
-webkit-app-region: dragin CSS to tell Electron which regions are draggable.Electron's documentation states:
The problem is that on macOS, the above is simply not true. An element specified as the draggable region will receive click events:
On Linux and Windows, the behavior is the one described in the documentation – the element will not receive click events:
(On Windows/Linux you can drag the window too, I just didn't recorded it)
With that in mind, we introduced a new
<div>that becomes visible on Windows/Linux when there are two or more open tabs:Building on Windows
To build on Windows you need to install some dependencies and run some commands:
npm config set python python2.7npm config set msvs_version 2015 --globalAbout
pty.jsWe're using @Tyriar's fork of
pty.js– the same used on Visual Studio Code. Check #190 for a discussion on that.Feeback wanted
We need your feedback to make sure this feature is💯 👌 💅 ✨ for the upcoming 😄
1.0.0release! Any help is more than welcome, especially with tests on Windows and Linux (and macOS too, to make sure that there are no unexpected side effects)Closes #167; Closes #190; Closes #795;