Open razzmatazz opened 7 years ago
Definitely :+1: Installation has always been a pain in the ass.
Just a thought: we basically do some kind of installation already, I mean for our travis build. I wonder if we could port that logic to elisp, and then the travis build could work basically the same way. But then we'd have the benefit of having an automatic installation as well.
And it would continuously get tested too, which is a huge thing!
Partially implemented, works on macOS (for me). Should be OK for Linux too. Needs little work on Windows.
Didn't apear to be THAT hard to implement as I feared, actually.
And yes, we should do the same thing on travis build. Definitely next on the list (with Windows implementation) @sp3ctum
Actually extracting a zip on emacs/windows installation appears to be problematic, unless you expect the user to download and extract unzip.exe to a known location... I'd wish to implement something that would work automatically, w/o any involvement of a user, even on Windows....
really don't want to write a pkzip parser in elisp, unless thats the last resort..
Would it work if the installation first downloaded unzip and then the server package?
On Jul 15, 2017 14:32, "Saulius Menkevičius" notifications@github.com wrote:
really don't want to write pkzip parser in elisp, unless thats the last resort..
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OmniSharp/omnisharp-emacs/issues/275#issuecomment-315528300, or mute the thread https://github.com/notifications/unsubscribe-auth/AASW95Yl0kOoh8uDNmIIfOJ4oc3gPxCtks5sOKNHgaJpZM4MDbJo .
@sp3ctum yes, I think it would, but I was a little bit worried that:
unzip.exe
, but only inside a .zip, which kind induces a chicken-n-egg problem for us :)In other words, I am slight worried because of security implications..
I think we could:
host it on github releases page on our site..
this would be over https and I think GPL allows for downloading the binaries over the net and using those w/o doing any kind of linking with the app (emacs).. and emacs is in GPL, so .. don't know..
Windows has a decent shell in Powershell (which is included by default). If it would be acceptable to only support Powershell version 5 and up, you could simply run powershell -command "Expand-Archive c:\a.zip -DestinationPath c:\a"
.
The powershell version can be checked by running:
(substring
(shell-command-to-string "powershell -command \"(Get-Host).Version.Major\"")
0 -1)
If the the user has a version below the threshold, simply display a message that they need to extract the zip file themselves.
There are other ways to extract zip files in powershell using .NET, but checking the installed .NET version could be more trouble than it's worth.
@kimgronqvist thanks! I think using powershell will be something that will work here; also, I found a way not to require powershell v5, by using powershell script that references system.io.compression.fs directly:
will try to implement this now
Nice! I think it would also be worthwhile to run (executable-find "unzip")
first, since this will be installed on some Windows systems that use Emacs.
Some users will have unzip in their path when installing Git for Windows (which includes msys2), and some will have installed msys2 manually since many Emacs commands depends on tools like find, grep, and diff.
@kimgronqvist another good idea!
Great stuff, guys! I'm really glad you brought Powershell up Kim.
On Jul 17, 2017 16:18, "Saulius Menkevičius" notifications@github.com wrote:
@kimgronqvist https://github.com/kimgronqvist another good idea!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OmniSharp/omnisharp-emacs/issues/275#issuecomment-315752540, or mute the thread https://github.com/notifications/unsubscribe-auth/AASW99xqLkVTVWA3Mvb3LRPHtYTvROosks5sO17WgaJpZM4MDbJo .
At least VS Code and Atom do this.
The code isn't pretty but its here https://github.com/OmniSharp/omnisharp-node-client/blob/0fa4cfbff6782420057ef731fbf4311fc376061e/lib/helpers/runtime.ts
TODO list:
(executable-find "unzip")
first before falling back to powershell for unzipping