I’ve been contemplating this problem. I think the system should support three methods rated based on the preferred methods.
- SVN (version control, preferred method)
- PEAR
- HTTP
I would prefer Subversion (VC)
This should be the preferred since the version control already has a system in place for downloading, updating (upgrading), and merging based on what changes someone has done. It would only need to get the URL to the subversion and have the location of the Subversion application or by checking if the Subversion extension for PHP is installed.
This wouldn’t require that the installer move the old files to another folder and can assume that subversion can clean up any changes. There might be problems when conflicts occur, but I think for the majority of people that would used this method wouldn’t have problems if they left their files alone.
I think this will be possible without too much trouble. First search for the SVN extension and use it, else search for the SVN application.
If neither exist, then go to the next method.
PEAR
PEAR is an awesome method of installing an application. If I can create a PEAR channel and use that to install WordPress, I can also use it to upgrade WordPress, when it needs to be. This could will need further checking. It needs access to PEAR, either the command line, or PHP extension.
This would most likely require moving any changed files over to a new folder and allow the person to copy over what they changed. I don’t know how PEAR handles these situations, but it is better to be safe than sorry in this type of situation.
If neither exists, then go to the next method.
HTTP
Not the best method as it would require moving existing files in the event that some might have been changed. The other problem is that like the above, it would require that the four methods work of GETting a file work. If any of them fail, then the installer would be broken and have no other fall back.
If None of them Works
However, I do think that for most people at least one of the methods above would work for most people. Those that it doesn’t work for, would have to use the age old FTP method or try to find someone that will do it for them.
It has to just work
This means that for most people it has to just go out there and try to find the most common places where Subversion and PEAR exist, if they are installed. It should also try to use multiple methods of getting a file by URL. It should allow for configuring the locations and methods used instead. An “auto” method for novices or people who just want it to work and a “manual” method for more experienced users or for people who want more control.
If it works out, I will apply it to installing Astrum Futura.
Possibly Related Posts:
- Calibre Improvements
- DragonU Bug Tracker Dev – Milestone 1
- Dragon MVC
- Why I Contributed to WordPress
- DragonU DB Component