[Haskell-cafe] Self updating binary

Ivan Perez ivanperezdominguez at gmail.com
Thu Feb 16 13:31:03 UTC 2017


Hi Pieter

Not recently, but back when I tried this for keera-posture, I had
difficulties with one binary substituting itself *on windows*. If the file
was being executed, I could not erase it.

(keera-posture did check a URL for new versions.)

You can download a setup program that you can run without user
intervention, closing your main program while it updates. Some installation
building systems support unattended updates/installations.

Otherwise, what you can do is to *rename* the current executable, store the
new one in place of the old one, and erase old executables every time you
start the app. Yes, it's a hack.

It would be great if we could have automatic updates of programs from
remote archives using the package manager like on linux :(

Ivan

On 15 February 2017 at 14:36, Pieter Laeremans <pieter at laeremans.org> wrote:

> Hi there,
>
> Has anyone experience suggestions with writing self updating binaries
> for windows ?
> I have a small utility that I have to install on two "unmanaged" pc's,
> I would like to let the program check an url, for new versions, download
> a new versions,
> some how check that the program is valid (with a build in key, or
> certificate) and replace itself when necessary.
>
> Has anyone already done this in Haskell? Any suggestions, links ?
>
> Thanks,
>
> Pieter
> --
>   Pieter Laeremans
>   pieter at laeremans.org
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170216/971d8e73/attachment.html>


More information about the Haskell-Cafe mailing list