This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH setup] Add setup-minimum-version: to setup.ini
- From: cyg Simple <cygsimple at gmail dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 2 Mar 2018 11:08:54 -0500
- Subject: Re: [PATCH setup] Add setup-minimum-version: to setup.ini
- Authentication-results: sourceware.org; auth=none
- References: <20180226140230.374700-1-jon.turney@dronecode.org.uk> <3018e134-6108-6899-e268-d1aca702e074@gmail.com> <67a9b2f4-2916-6445-69b7-75d17e68fc81@dronecode.org.uk>
- Reply-to: cygwin at cygwin dot com
On 2/26/2018 12:45 PM, Jon Turney wrote:
>
> You might find the code in [1] a good starting point for an alternate
> implementation, which doesn't require renaming the executable.
>
> [1] https://cygwin.com/ml/cygwin-apps/2011-04/msg00054.html
Chris Faylor:
>>
>> Sounds wonderful but couldn't you just rename the original setup.exe
>> out of the way, copy a new version over it in place, and then
>> re-execute?
Jon Turney:
> I'm just following a sequence of actions which a bit of google
> research found other people had successfully used.
> what you suggest seems like it should work, although I'd perhaps be a
> bit wary of assuming that MoveFile() on the running executable works
> always.
But my suggestion removes the need to MoveFile() of the open executable
as the name of the new version file would be different. The other
possibility I suppose would be to give the file being downloaded a name
with the version or date of download appended. But I still think a
version number on the setup executable file name could potentially be
beneficial.
Benefits:
* A person could check cygwin.com and know that the version of setup he
has is different just by visually checking the name.
* The name of the executable represents the version expected by setup.ini.
* Historical preview of someone doing research for previous versions.
* Better serves convention with other projects delivering installers for
Windows executables; Firefox, Thunderbird, MySQL, Postgres, PHP, Apache,
etc. all have a version number for the Windows executable.
Drawbacks:
* Scripts using the name of the executable without the version. This is
easily remedied by a symlink to the current executable.
--
cyg Simple