Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomShell installation fails on Windows 10 #148

Closed
hhaensel opened this issue Aug 22, 2018 · 6 comments
Closed

AtomShell installation fails on Windows 10 #148

hhaensel opened this issue Aug 22, 2018 · 6 comments
Labels

Comments

@hhaensel
Copy link

w = Window() in Julia 0.7.0 fails with the hint that Electron is not installed.
But installation of Electron also fails :-(

julia> Blink.AtomShell.install()
ERROR: IOError: could not spawn `7z x electron-v2.0.5-win32-x64.zip -oatom`: no such file or directory (ENOENT)
Stacktrace:
 [1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:370
 [2] (::getfield(Base, Symbol("##499#500")){Cmd})(::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:512
 [3] setup_stdio(::getfield(Base, Symbol("##499#500")){Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:493
 [4] #_spawn#498(::Nothing, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:511
 [5] _spawn at .\process.jl:507 [inlined]
 [6] #run#509(::Bool, ::Function, ::Cmd) at .\process.jl:669
 [7] run at .\process.jl:668 [inlined]
 [8] (::getfield(Blink.AtomShell, Symbol("##1#2")))() at C:\Users\helmu\.julia\packages\Blink\KMJt9\src\AtomShell\install.jl:48
 [9] cd(::getfield(Blink.AtomShell, Symbol("##1#2")), ::String) at .\file.jl:85
 [10] install() at C:\Users\helmu\.julia\packages\Blink\KMJt9\src\AtomShell\install.jl:27
 [11] top-level scope at none:0

Anybody also experiencing this problem?

@pfitzseb
Copy link
Member

I think this happens when you don't have added the julia dir to your PATH and have not installed 7z independently.
Would probably make sense to either actually find Julia's bundled 7z or use BinaryProvider for this, I think.

@pfitzseb pfitzseb added the bug label Aug 23, 2018
@hhaensel
Copy link
Author

hhaensel commented Aug 23, 2018

Thanks a lot!
Adding the Julia bin directory (for me "C:\Julia\Julia-0.7.0\bin" to the environment variable PATH solved the problem 👍
It would be good, though, if the standard locations of 7z would be checked internally before throwing an error ... ;-)

@pfitzseb
Copy link
Member

It would be good, though, if the standard locations of 7z would be checked internally before throwing an error ... ;-)

Yeah, definitely.

@hustf
Copy link
Contributor

hustf commented Nov 26, 2018

A step on the way perhaps: I put together a little hack to deps/install.jl which also would work for those of us who use a binary built with cygwin. In that case, 7z.exe is not present. But of course, electron.exe is not runnable from Windows when unpacked in this way (ehem).

The windows binary version seems to work when the arguments are made from a vector of strings like below. It may not work in the borderline case when there is a space in the Julia path. There's a named argument for that in Cmd constructor now, but not for the method which takes a vector of strings.

    if Sys.iswindows()
       function fwhich(s)
          fi = ""
          try
             fi = split(read(`where.exe $s`, String), "\r\n")[1]
             if !isfile(fi)
                fi = ""
             end
          catch
             fi =""
          end
          fi
       end
       arch = Int == Int64 ? "x64" : "ia32"
       file = "electron-v$version-win32-$arch.zip"
       download("https://github.com/electron/electron/releases/download/v$version/$file")
       zipper = joinpath(Base.Sys.BINDIR, "7z.exe")
       if isfile(zipper)
          # This is a binary download julia.
          cmd = Cmd([zipper, "--x", file, "-oatom"])
       else
          # This is likely built with cygwin; run the version of 7z included with it.
          cmd = Cmd(`$(fwhich("bash.exe")) 7z x $file -oatom`)
       end
       run(cmd)
       rm(file)
    end

@hustf
Copy link
Contributor

hustf commented Dec 2, 2018

I believe this issue can be closed if PR#177 is accepted and a new version is pushed.

@hhaensel
Copy link
Author

Just saw, that this is still open. It can be closed by now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants