octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: after 3.2


From: Bill Denney
Subject: Re: after 3.2
Date: Sun, 15 Mar 2009 12:19:19 -0400
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Jaroslav Hajek wrote:
> As for the Windows binaries, it would be fairly nice to have something
> similar to auto-updates provided by Linux distros. I'm fairly
> convinced that users don't really mind bugs if there's a good chance
> of getting rid of them by a few clicks within a month via some
> automatic update mechanism.  Imagine a dialog popping up for the
> Windows user telling him "an update is available, click OK to
> install". But of course, this would require some development.
>   

Hi Jaroslav,

This shouldn't be too hard.  The windows packagers could possibly run
something like this in the .octaverc file.  The downside is that getting
the URL will cause an indeterminate time pause during startup.

Have a good day,

Bill

function check_update_windows (update_url =
"http://sourceforge.net/project/showfiles.php?group_id=2888&package_id=40078";)

[current_avail_ver_raw, success, msg] = urlread(update_url);
if (! success)
    warning("update-check:urldownload", "Could not check for
update:\nCould not read %s\n%s", update_url, msg);
    return;
endif
current_avail_ver = unique(regexp(current_avail_ver_raw,
"octave-(?<ver>[0-9]+.[0-9]+.[0-9]+)-setup", "names").ver);
higher_vers = compare_versions(current_avail_ver, OCTAVE_VERSION, ">");
current_avail_ver(!higher_vers) = [];
if (! isempty(current_avail_ver))
    ## See if the current version is development or stable
    development = development_version(OCTAVE_VERSION);
    if (! development)
       current_avail_ver(development_version(current_avail_ver)) = [];
    endif
    if (! isempty(current_avail_ver))
        printf("You are currently running Octave version %s, and version
%s is available for download at\n%s\n",
           OCTAVE_VERSION, current_avail_ver(end), update_url);
    endif
endif

function r = development_version(v)
if iscellstr (v)
    r = cellfun(@development_version, v);
elseif ischar (v)
    r = mod(double(regexp(v, "^[0-9]+.(?<mid>[0-9]+).", "names").mid), 2);
else
    error ("version must be a cellstr or a char");
end


reply via email to

[Prev in Thread] Current Thread [Next in Thread]