appy
I’ve been sporadically working on a little command line installer for
OSGeo4W, called
apt.
It is based on
cyg-apt,
a command line apt-get-like installer for cygwin byJan Nieuwenhuizen. I
currently have two forks. One for o4w alone, which I’ve renamed apt, and
the second for cygwin alone, which I’ve left as cyg-apt. Forking is not
a good idea when there is so much in common, so I’m going to try and
bring them together. One app, two installers. Neither name fits this new
job so I’m going to use appy for the time being. It will have to change
eventually as there’s another, much bigger, python project with the
appy name, but
I don’t want to spend hours agonizing over a name. Again.
The appy series of posts will chronicle my misadventures as I try and teach myself programming by making this small tool a little bit more useful. To me anyway!
Matt’s cyg-apt: my only claim to (in)famy here is converting system calls to md5sum, tar, etc. to pure python. So now the only pre-requisite is python. All the real work and intelligence in this program is a result of Jan’s work.
I created a standalone exe of the o4w version which can be used to install o4w from scratch, but at 2.5mb it’s a little big for what it actually does.
Things are going really well. I'm nothing short of astounded with what me, a nonprogrammer, has been able to accomplish in a few dozen hours (albeit spread over many evenings over a year). Why just last night in cyg-apt I added a function to use the last used mirror instead of hardcoding it. Concieved, thought about, and implemented all in one session. Now that is cool!
(many moons later) I love python, it makes me feel like I know what I'm doing. ;-) Around two hours ago I discovered apt was broken because the server changed it's ini format. One hour later I had it fixed, tested and committed with a routine I've never used before.
2011-09-01 a major milestone reached, Apt eats Apt!
Last night I completed building a package of apt.exe can upgrade itself. This means, I think, that now apt should be able to replace any and all packages in Osgeo4W in one go including python. There is much left to do, it's only been tested on two computers so far, and it consumes way more diskspace and bandwidth than I think it should, but it works!
To try it out, point your existing apt or o4w setup program (see Testing Repositoryat end of this page) at http://download.osgeo.org/osgeo4w/testing/ and upgrade away.
apt --mirror http://download.osgeo.org/osgeo4w/testing/ update
apt new
apt upgrade
After this running apt with no parameters should yield the usual help page with a version number at the top that resembles:
-={ Id: apt.py 1179 2011-09-01 12:42:24Z maphew }=-
apt [OPTION]... COMMAND [PACKAGE]...
If the first line is just [option] etc. the new apt.exe hasn't been activated. Running %osgeo4w_root%\bin\apt.bat should fix that. If not please let me know.