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:
- Dragon MVC
- Why I Contributed to WordPress
- DragonU DB Component
- Working On My WordPress Plugins
- Hurray! I’m Back!
Tags: Astrum Futura, installer, Programming, Theory, wordpress
[...] Jacob Santos Web and Game Development « Web Application Installer/Upgrader [...]
I’ve been working on something to make this process rather simple, however I’m not using SVN, I’m using Mercurial.
Using a distributed SCM has some real perks when a version control system is being used (more or less) as an application installer:
Easy to pull in updates (and merge, if you’ve been hacking)
Easy to pull in updates from your friends, say if someone hacked a wordpress module to give it more functionality
Easy to sync -> push your entire application (or site for that matter) from your desktop
Works via http, https or ssh
Simple RSS tells you when new versions are ready (for completely automatic updating)
I’ve been looking into writing something to replace the popular program named "Fantastico" that does nothing more than install scripts.
You have the right idea, but I think you’d like Mercurial a lot better for this particular purpose
Ever try capistrano (capify.org). I used this for wordpress upgrade. its ruby thought.
I just finished writing a web application installer. its pretty simple since its only the first version. you can check it out here: http://www.jebaird.com/blog.php?year=2008&month=09&cat=6&id=21