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

Automatic ImageMagick install on Windows #165

Merged
merged 2 commits into from
Aug 21, 2014

Conversation

ihnorton
Copy link
Collaborator

This downloads and runs the IM installer automatically.
Shows installer authorization prompt in most security
environments, but otherwise runs unattended. Installs
to usual BinDeps binary path, and does not touch system
PATH or create icons

This downloads and runs the IM installer automatically.
Shows installer authorization prompt in most security
environments, but otherwise runs unattended. Installs
to usual BinDeps binary path, and does not touch system
PATH or create icons.
@ihnorton
Copy link
Collaborator Author

So the big question here is whether this should be the default. I vote yes, because image i/o is kind of useful... But if you don't want this as the default, I'm not quite sure how to nicely make it opt-in.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 3a943b7 on ihnorton:autowinbin into 1126ee4 on timholy:master.

@staticfloat
Copy link
Collaborator

I think this is the first case of a BuildProcess being used on Windows that I can remember. :P

@ihnorton
Copy link
Collaborator Author

I would prefer to have added an "install_cmd" option for Binaries, but this seemed like the expedient option when I started. I ended up very frustrated that nothing would run, until I found the solution in JuliaPackaging/BinDeps.jl#55

@timholy
Copy link
Member

timholy commented Aug 20, 2014

Nice, @ihnorton!

I vote "yes" that this should be the default too. But I'll give Windows users a chance to chime in.

@ihnorton
Copy link
Collaborator Author

Pinging some people who have commented on Windows issues: @simonp0420 @mykelk @jhasse @joa-quim: the disadvantage here is that the download can take a few minutes, and the installer requires authorization (but no other input).

@simonp0420
Copy link

Does this require administrator priveleges? If not, then I'm all for it. If it does, it's a problem at my work where I'm trying to build support for using Julia in my engineering group (without official IT support).

@ihnorton
Copy link
Collaborator Author

@simonp0420 it requires acceptance of the UAC prompt, which (AFAIK) may not require Administrator access but it depends on the group policies of your system.

Do you mind to try installing and let us know http://www.imagemagick.org/download/binaries/ImageMagick-6.8.9-7-Q16-x64-dll.exe?

The other thing to consider is that, now that #163 is merged, this should degrade gracefully again so Images will still be usable. Though we probably will want to add an info message to make clear that "IM install fail" != "Images.jl install fail"

@simonp0420
Copy link

Unfortunately, it seems to require Administrator privileges on the machines at work:
image

@ihnorton
Copy link
Collaborator Author

Sigh. Thanks for checking. I guess I will go with plan B and rehost the
DLLs (which should make the download a bit smaller too).

On Wed, Aug 20, 2014 at 6:38 PM, Peter Simon notifications@github.com
wrote:

Unfortunately, it seems to require Administrator privileges on the
machines at work:
[image: image]
https://cloud.githubusercontent.com/assets/4294361/3989424/8fcb3bdc-28ba-11e4-9e51-aa7fdef35b54.png


Reply to this email directly or view it on GitHub
#165 (comment).

@staticfloat
Copy link
Collaborator

You're a Windows Jedi, Isaiah.

From http://innounp.sourceforge.net/
Because the inno-based installer cannot be run without admin rights.
@ihnorton
Copy link
Collaborator Author

Alright, new idea: re-hosting DLLs is annoying. Let's just unpack the files using: http://innounp.sourceforge.net/

see ihnorton@df6be03

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling df6be03 on ihnorton:autowinbin into 1126ee4 on timholy:master.

@timholy
Copy link
Member

timholy commented Aug 21, 2014

If it has a good track record, that seems like a great way to go.

@simonp0420
Copy link

@ihnorton I appreciate very much your efforts to accommodate my probably-no-so-typical constraints.

@ihnorton
Copy link
Collaborator Author

Seems to work well on another computer, so I'm going to go for it.

ihnorton added a commit that referenced this pull request Aug 21, 2014
Automatic ImageMagick install on Windows
@ihnorton ihnorton merged commit 35c9cb8 into JuliaImages:master Aug 21, 2014
@ihnorton ihnorton deleted the autowinbin branch August 21, 2014 18:58
@ihnorton
Copy link
Collaborator Author

@simonp0420 several of us are trying our best to make sure Julia has first-class Windows support! Unfortunately this is very common, a combination of strict security policies and installers that don't degrade gracefully. I think this work-around will work out nicely.

Do you mind to try Pkg.checkout("Images"); Pkg.build("Images")

@simonp0420
Copy link

Installation goes off without a hitch! Some issue with running the tests, though...


julia> Pkg.checkout("Images")
INFO: Checking out Images master...
INFO: Pulling Images latest master...
INFO: No packages to install, update or remove

julia> Pkg.build("Images")
INFO: Building Images
INFO: Installing ImageMagick library
INFO: Attempting to Create directory c:\home\simonp\.julia\v0.3\Images\deps\downloads
INFO: Attempting to Create directory c:\home\simonp\.julia\v0.3\Images\deps\usr\lib\x64
INFO: Attempting to Create directory c:\home\simonp\.julia\v0.3\Images\deps\downloads
INFO: Directory c:\home\simonp\.julia\v0.3\Images\deps\downloads already created
INFO: Downloading file http://www.imagemagick.org/download/binaries/ImageMagick-6.8.9-7-Q16-x64-dll.exe
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19.2M  100 19.2M    0     0  4667k      0  0:00:04  0:00:04 --:--:-- 4685k
INFO: Done downloading file http://www.imagemagick.org/download/binaries/ImageMagick-6.8.9-7-Q16-x64-dll.exe
INFO: Attempting to Create directory c:\home\simonp\.julia\v0.3\Images\deps\downloads
INFO: Directory c:\home\simonp\.julia\v0.3\Images\deps\downloads already created
INFO: Downloading file https://julialang.s3.amazonaws.com/bin/winnt/extras/innounp.exe
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  551k  100  551k    0     0  81526      0  0:00:06  0:00:06 --:--:-- 91954
INFO: Done downloading file https://julialang.s3.amazonaws.com/bin/winnt/extras/innounp.exe
INFO: Changing Directory to c:\home\simonp\.julia\v0.3\Images\deps\downloads
; Version detected: 5500 (Unicode)

julia> using Images

julia> cd(joinpath(Pkg.dir("Images"),"test"))

julia> include("runtests.jl")
ERROR: `_convert` has no method matching _convert(::Type{RGB{Float64}}, ::RGB{Float64})
 in convert at c:\home\simonp\.julia\v0.3\Color\src\conversions.jl:32
while loading c:\home\simonp\.julia\v0.3\Images\test\algorithms.jl, in expression starting on line 182
while loading c:\home\simonp\.julia\v0.3\Images\test\runtests.jl, in expression starting on line 3

@timholy
Copy link
Member

timholy commented Aug 22, 2014

If you can do stuff you need to, don't worry just yet. We're in the middle of a Color-handling transition. Shouldn't be much longer now.

But, are you by any chance on 0.4? I noticed Color failing its test on 0.4 but not 0.3. I haven't had time to investigate, though.

@ihnorton, quite a triumph! I'll have to bump the tag again.

@simonp0420
Copy link

Seems to be working fine for me. I'm running v"0.3.0-rc4". Thanks again!

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

Successfully merging this pull request may close these issues.

None yet

5 participants