avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] AVRdude for win32 installer


From: E. Weddington
Subject: Re: [avrdude-dev] AVRdude for win32 installer
Date: Fri, 30 Jan 2004 10:32:57 -0700

On 30 Jan 2004 at 17:49, address@hidden wrote:

> Hello,
> 
> 
> I'd like to point out something I think is rather broken in the way
> AVRdude installs under win32. By default in installs under C:\WINavr,
> which is logical and convenient, since C:\WINavr\bin is already in
> the PATH, as part of the WINavr installation.
> 
> HOWEVER.....  once you do install AVRdude this way, it will overwrite
> some of the previosly existing files. This wouldn't be a problem IF the
> installer cared to back up these files, which, regrettably, it does not.

I was wondering how long it would take for this to crop up.

 
> So what happens? We are bound to break at least one uninstaller for good.
> Say you uninstall WINavr --> this way, you will remove all of the AVRdude
> files except for the ones in C:\WinAVR\doc\avrdude-4.3.0 and the 
> C:\WinAVR\avrdude-4_3_0-win32-uninstall.exe itself. If you now try to remove
> AVRdude, it will fail, as it can't find all the files it installed, and you 
> are
> left with a broken entry in the installed packages registry. And I don't know 
> of
> any way to clean that registry up (although I am sure there is a hack for 
> that).
> 
> Now let's look at the other scenario: we uninstall AVRdude first:
> 
> The log from the uninstall is:
> 
> Delete file: C:\WinAVR\bin\avrdude.exe
> Delete file: C:\WinAVR\bin\avrdude.conf
> Delete file: C:\WinAVR\bin\giveio.sys
> Delete file: C:\WinAVR\bin\install_giveio.bat
> Delete file: C:\WinAVR\bin\loaddrv.exe
> Delete file: C:\WinAVR\bin\remove_giveio.bat
> Delete file: C:\WinAVR\bin\status_giveio.bat
> Delete file: C:\WinAVR\bin\xpfix.reg
> Remove folder: C:\WinAVR\doc\avrdude-4.3.0
> Delete file: C:\WinAVR\avrdude-4_3_0-win32-uninstall.exe
> Completed
> 
> And as the installer did not back up the files already existing in WINavr, we
> are left with a broken WINavr installation, which again will not want to
> uninstall as it can't find all the necessary files, and we have again a zombie
> entry in the installed packages registry.

Not completely true, see below.

 
> I would humbly suggest a possible solution: do NOT use a Windows installer to
> install AVRdude, just a plain zip archive, perhaps self-extracting if you want
> to be fancy.

For every person who wants a self-extracting zip archive, there's somebody who 
wants an installer and vice versa.
 
> Maybe I'm overly sensitive to this kind of issue, as I work with Unix package
> management here. Still, I think it's worth to at least think about this.

Yes, admittedly I put it together quickly.

 
> P.S. could you perhaps repackage the Win32 version at least once, as I
> have now broken my own WINavr installation? Pretty please?


Ok,

So yes when you have a WinAVR installation and you wish to install avrdude, the 
installer will *default* to the WinAVR installation. Of course you can always 
change this directory to whatever you want, and put it in a separate directory.

If you do install the avrdude package in the WinAVR directory, yes it will 
overwrite the package, and yes it does not make a backup. Mea culpa.

When you then uninstall avrdude from the WinAVR directory, it only takes the 
avrdude files away (with an exception, see below). The rest of WinAVR is just 
fine. This does *NOT* break the subsequent WinAVR *uninstallation*. Try it and 
see; it won't hang up, it just remove the entire WinAVR tree.

If you want to get back to the old version of avrdude, the workaround solution 
is simple: just reinstall WinAVR on top of the current installation; it will 
replace the missing files.

Now, in going back over this, there is a potential problem that I didn't think 
about before. Currently, when avrdude is built, it requires the cygwin1.dll, 
and the avrdude installer promptly overwrites this file. Well, other packages 
in WinAVR require this DLL as well, and this could be a major problem in the 
future due to versioning issues with that DLL. Luckily, it's the same version 
of cygwin1.dll found in the latest release of WinAVR, and in the avrdude 4.2.0 
and 4.3.0 releases.

This is, yet again, why I don't like DLLs and why I'm trying to get the Windows 
version of avrdude to be written with the Windows API. (There's an email in my 
box about just this that I have to check out.) That way there's no DLL / shared 
library to worry about.

What I will do on the avrdude installer is change the default installation 
directory to NOT be the one for WinAVR (if found). This way, it gets around the 
problem with DLL versioning. If in the future, avrdude is built without any 
DLLs, then I will look into developing a smarter installer and uninstaller. I 
can't make any promises right now about backing up what's there, when currently 
if you want to go back, you can just uninstall avrdude/<package>, and reinstall 
WinAVR on top of an existing installation.

HTH
Eric




reply via email to

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