upterm icon indicating copy to clipboard operation
upterm copied to clipboard

Windows Support

Open ghost opened this issue 8 years ago • 52 comments

Hi,

Please bring support for Windows including a downloadable installer

ghost avatar Oct 05 '16 20:10 ghost

Happy to accept help :) I don't think any of the current core contributors use Windows so don't expect this to be high priority for them.

drew-gross avatar Oct 14 '16 03:10 drew-gross

I would like to help bringing black-screen to windows, but I am not sure where to start.

gyurisc avatar Oct 14 '16 08:10 gyurisc

@gyurisc

start by downloading the source, installing all dependencies and running it. Just getting it started without errors is your first hurdle ;)

Once it runs, decide on a basic feature set you think has to work no matter what. Then see if those features work. If they don't, debug the application and fix them in a way which does not prevent them from working on other platforms.

As soon as all core features work, you should make a PR with your fixes, package Electron and the application into a binary bundle (ZIP file should be enough for now, I would leave the decision which installer to use etc. for the core team). Then you can send the ZIP archive to the core team and have them include it with the release you based it on (just add it as a binary file in the RELEASE section)

You might want to ask them to add a direct link to the file to the README, so people will find it more easily.

From there on, you will have to make sure all subsequent releases work on Windows. Also try to add more working features.

minecrawler avatar Oct 14 '16 10:10 minecrawler

Duplicate of #302

jsphpl avatar Dec 05 '16 17:12 jsphpl

I find it annoying that "just because our contributors don't use it we shouldn't support it" is your response. You should aim for cross platform from the start. Also, look at the percentage of the world population that actually owns a Mac. It's JavaScript guys c'mon, it's been cross platform since around '98 has it not?

mrcbax avatar Dec 06 '16 00:12 mrcbax

Indeed, it is annoying, but part of maintaining open source software is the fact that people are volunteering their own time and resources to make it. Those things are limited, and while I personally love Windows and despise Macs, if the contributors have everything they need then it may not be high on their priorities. That being said, this is open source after all, and you're welcome to try and make the port yourself. @minecrawler provided some great ideas on how to start.

weaversam8 avatar Dec 06 '16 01:12 weaversam8

Well put @weaversam8. I do think we should support Windows, but I have typically 2-3 hours a week to work on black-screen, and I'm going to put those hours towards things that are important to me, first and foremost.

Also, I think it should already pretty much work on Windows, maybe with some small updates to the build system, but I don't have a Windows machine, and it's not easy to test Windows in CI. If someone who does have Windows and knows a little about Electron tried to add support I doubt it would be too hard.

drew-gross avatar Dec 06 '16 01:12 drew-gross

Yeah, with my limited experience with Electron, I'd say it's probably pretty straightforward. I'd work on it myself if I had decent time, but you know how that is.

weaversam8 avatar Dec 06 '16 01:12 weaversam8

I just talked about a failed build of winpty on #920 ,it's the naitve dep of pty.js. Should I file a new issue for that? @vshatskyi @weaversam8

ShadowRZ avatar May 19 '17 11:05 ShadowRZ

Check what I found! chjj/pty.js#178

ShadowRZ avatar May 19 '17 11:05 ShadowRZ

@ShadowRZ, thanks a lot!

Your comment has been very useful: I have been able to compile and execute black-screen on Windows with pty.js being replaced with node-pty. The overall experience is still messy as hell, but hey — it works!

I'll slap things together and prepare a pull request; ETA: 2 hours.

ForNeVeR avatar May 20 '17 08:05 ForNeVeR

(Just a little announcement for the ones who're interested in Windows support: there's a PR #1033 and I think I'll finish it in the nearest couple of days.)

ForNeVeR avatar May 22 '17 04:05 ForNeVeR

Thanks to @ForNeVeR it should now run on Windows. Please note that Windows is still not officially supported, though.

vlad-shatskyi avatar May 28 '17 06:05 vlad-shatskyi

@vshatskyi I understand and appreciate your position on "official" thing. What else could we do to advance towards the "official" or at least "semi-official" support? Should we enable unit-testing on Windows, for example?

Everyone else in the thread: please, guys, help us to find and fix the remaining issues on Windows. I bet somebody wants alternate shell support (e.g. many people on Windows are using bash or PowerShell), somebody could find a bug etc.

ForNeVeR avatar May 28 '17 06:05 ForNeVeR

So, the current plan is to avoid using external shells and write our own. If that's what's going to happen, then it doesn't make sense to support cmd.exe.

I guess gathering a list of differences between platforms would help, but don't expect it to be implemented any time soon.

vlad-shatskyi avatar May 28 '17 06:05 vlad-shatskyi

Understood. So, ideally we shouldn't implement any new features in the meantime. Small feature requests and bug fixes are okay, but major changes are undesired at the moment.

Also, good news, everyone! I should mention that PowerShell already works with all its' nice features (PsReadLine, oh-my-posh) in the current state: image

You should just start powershell from the initial upterm session, and everything seem to be okay.

ForNeVeR avatar May 28 '17 06:05 ForNeVeR

So, are we posting bugs for unofficial windows support or...? Here is what I got when I tried to do npm install

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-pty package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-pty
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-pty
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Projects\upterm\upterm-0.2.157\npm-debug.log

npm version

[email protected] C:\Program Files\nodejs\node_modules\npm
PS D:\Projects\upterm\upterm-0.2.157> npm version
{ upterm: '0.2.157',
  npm: '3.10.10',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '58.2',
  modules: '48',
  node: '6.10.2',
  openssl: '1.0.2k',
  uv: '1.9.1',
  v8: '5.1.281.98',
  zlib: '1.2.11' }

Also where can I find installation guide? Is it the same as for linux?

Cka3 avatar Jun 08 '17 09:06 Cka3

I've always wanted to bring up this Windows Building issue as well. Can't help if you can't even get the app running. The wiki article on Windows installation is absolute garbage.

christianwico avatar Jun 08 '17 09:06 christianwico

Could you, guys, please post any additional logs you're getting from npm? I think you need Visual Studio 2017 installed and added to environment to build some of native deps.

ForNeVeR avatar Jun 08 '17 10:06 ForNeVeR

I had Visual Studio 2013, 2015, and 2017 installed. I also installed python 2.x (I think it was 2.7...).

I'll post my logs when I get home...

christianwico avatar Jun 08 '17 11:06 christianwico

Here's the gist...

I have:

  • Microsoft Windows v10.0.14393 (Pro x64)
  • Microsoft Visual Studio 2013 (Community)
  • Microsoft Visual Studio 2015 (Community)
  • Microsoft Visual Studio 2017 (Community)
  • Python 2.7.11
  • NodeJS v6.10.3
  • Node Package Manager v3.10.10

christianwico avatar Jun 10 '17 06:06 christianwico

Sorry, but I can't reproduce that. I have VS2017, Nodejs 8.0 and Python 2.7.11 installed. npm install works on my machine (I've just checked with a clean checkout of upterm sources).

ForNeVeR avatar Jun 10 '17 07:06 ForNeVeR

I could try it on another machine. I was planning on setting up an older PC to use Windows 7. I'll try to reproduce your Windows environment from a clean install. (Were you using Windows 10?)

christianwico avatar Jun 10 '17 09:06 christianwico

(Were you using Windows 10?)

Yes, I'm using Windows 10 x64 Pro 10.0.14393.

ForNeVeR avatar Jun 10 '17 09:06 ForNeVeR

I can confirm it installs for me on Windows 10 x64 Pro. I think I've got VS 2015.

weaversam8 avatar Jun 10 '17 16:06 weaversam8

Trial 1

I tried it on another machine running a clean install of Windows 10 x64. I installed NodeJS 8.1.0, Python 2.7.11, and Microsoft Visual Studio 2017 (Community).

Except for dates and times, the err logs from both of them are more or less 100% identical.

Trial 2

I clean installed Windows 7 x64 on the same machine. Installed everything else the same. Now, it's not only the dates and times that are different, but some version numbers as well. But nonetheless. Almost 100% identical. Same number of lines.

I guess that's it for me and Windows. I'll just have to stick with my Arch Linux until I get my hands on a Mac...

christianwico avatar Jun 14 '17 10:06 christianwico

Same issue and same log as @christianwico on Windows 10 x64 Creator's Update.

OvermindDL1 avatar Jul 07 '17 17:07 OvermindDL1

Hey, guys! I've built upterm in my clean virtual environment, and I can confirm that there're indeed some… issues. That manual should help you to solve them.

Here's what I've done on my fresh Hyper-V instance:

  1. Install Windows 10 version 1511 (10586.713 whatever that means)
  2. Install Visual Studio 2017 Community edition
    • Make sure to choose the right install workloads; see below image (please forgive me for the screenshot in Russian, but I don't know how to change the installer language to English; the selected workload should be Classic C++ application development or something similar in English version)
    • Install Visual C++ 2015.3 Build Tools; see below image
  3. Install Chocolatey
  4. Install Python 2: choco install python2 → Python 2.7.13
  5. Install Node.js: choco install nodejs → Node.js v8.1.3; npm 5.0.3
  6. npm config set msvs_version 2015 (yes really! 2015!)
  7. Due to a recent known bug with npm 5 and fsevents, you'll need to disable optional dependencies: npm config set optional false (I hope it will be fixed in some future version of npm)
  8. Clone upterm repository; npm installno errors reported
  9. Open "Developer Command Prompt for VS 2017"; execute all the next commands there
  10. npm start → no errors reported; upterm started successfully

ForNeVeR avatar Jul 11 '17 15:07 ForNeVeR

Is there any chance we can get a windows 10 build of Upterm attached to this thread? I cant get a VM set up for building it right now.

Antony-Jones avatar Jul 13 '17 14:07 Antony-Jones

Is there any chance we can get a windows 10 build of Upterm attached to this thread? I cant get a VM set up for building it right now.

I'm interested as well, not able to easily install python2 or MSVS 2015 due to other reasons (I'd have to do a lot of path fiddling and other stuff that would take a lot of time... >.>

/me wishes it supported mingw builds straight-out

OvermindDL1 avatar Jul 13 '17 14:07 OvermindDL1