GSoC Application
Name: | Bohdan Vlasyuk |
City: | Vinnytsia |
Country: | Ukraine |
School: | Vinnytsia National Technical University |
Title
The project it code-named Manatee. Manatees, also known as sea cows, are large mammals that won’t breed in captivity. That was the best name I could come up with. Heh.
Synopsis
The project is to develop a tool, used to serve and manage binary software distributions on Windows (Portability to other OS-es must be kept in mind. MacOS X, in particular.). It must contain a user-centric component, and automation facilities.
Deliverables
- A complete functional replacement to WinLibre installer targeted for the end-user
- Will include all current features
- A complete, working WinLibre distribution based on current WinLibre content and Manatee
- A documentation set targeted for the Manatee distribution masters
- A brief documentation of Manatee for developers
Manatee
Description
A tool, used to serve and manage binary software distributions on Windows (Portability to other OS-es must be kept in mind. MacOS X, in particular.). Must contain an user-centic component, Manatee/ControlCenter, and automation facilities, Manatee/ScriptingEngine.
Primary goals
“The goal is to give the average joe user an easy tool to choose, install and update a selected set of open source apps.”
- Easy to use
- Manatee/ControlCenter
- I18N
- Silent installs (requires special effort from packager)
- Automation for mass-deployment
- Manatee/Update (needs special concern, a lot of special cases)
- Easy to maintain
- XML configuration
- import old INI files
- Portable
Secondary goals
- integrate easy WikiPedia access.
- show a RSS news feed
- Manatee could be used as a base installer for free software packages (other projects that WinLibre wants to be implemented as part of GSoC spring into mind) this doesn’t look like a good idea any more
- I’m not sure how feasible that will be. wxPython+Manatee might take up much more than it’s acceptable for an installer
- Manatee/Installer could be made modular enough to serve as a generic installer for free software
Architecture
Terminology
term | meaning |
distribution | a collection of software packages |
package | a component of a distibution, must be a complete application or some system library (like GTK+ or JRE) |
WinLibre | the free software collection for windows |
Manatee | the program, used to manage (install/uninstall/upgrade/launch) packages |
Concepts
There is a “current distribution” concept, which is the subset of the distribution components that you have on your system. You can get “reference distribution” from the server, which may contain updated versions of packages you use, or new packages.
- each package is unique within a distribution. i.e.
Package.name
is unique.
- packages with larger version field are updates for current package
- we won’t need downgrades. and even if we will, they could be handled with some clever dependency trick
- packages might employ date-based versioning system instead of vendor-supported. this is up to the maintainer.
- version are compared as follows:
- the version string is being split on
[ .:_-]
. the resulting arrays are compared (numerically if possible). e.g. “1.10.3” vs “1.9.3” ⇒ [1, 10, 3] vs [1, 9, 4]
- this works well with most common versioning schemes
- do we need versioned dependencies, like gaim-1.3.0 depents on gtk+ version x, where 2.0.24 ⇐ x < 2.0.42 ?
Packages usually contain a list of installable files. This is not strictly necessary. There might exist ‘dummy’ packages, that are useful for collecting different stuff togeather. Another use of dummy packages might be a package name transition.
- We don’t have “uninstall” notion. To uninstall a package, upgrade it to a empty package.
- Such empty packages could have a special
Setup
type. e.g. uninstall
. They should not be stored in a “current distribution”.
If a package is installed, it is “pinned”. So, each auto-upgrade will try to install its latest version.
- This doesn’t apply to packages installed as dependencies. They are only upgraded if a “pinned” package depends on a newer version of the package.
Components
Implementation notes and details
- Use windows registry to store basic persistent information (Manatee installation status, working directory)
- how will this work for MacOS X? Other platforms?
- Check how large would be an wxwidgets-based distribution
- we must make it as small as possible
- python code probably won’t add too much to the size (?)
- Assume only one Manatee installation per system
- \Manatee\Version → “0.0.1”
- \Manatee\Root → “C:\Program Files\Manatee\”
- Store distribution information in “\Manatee\Root”\Distributions\ as a list of xml files. Distributions will be uniquely identified with an ASCII name.
- We probably will get rid of the annoying InstallShield dependencies.
- Installation
- Allocate tmpdir for each setup. clear it after the setup.
- File retrieval
- mirrors system. A mirror has several attributes, site, country, priority.
- select only mirrors from preferred site (if any), preferred country (if any)
- allow to chose one of selected mirrors, or select any mirror with top priority automatically.
- allow to specify a local mirror?
- should each file list it’s own set of mirrors
- should we specify a complite URLs of files on mirrors, or just filenames/relative paths (and assume all mirrors are complete) [may be a problem for some files which have restrictions on redistribution, and may not appear on all mirrors. does Java?]
- Figure out what’s the best way to embed binary data (images) into XML
- probably, it’s
<image type="image/png">[MIME64 here]</image>
- Obtain internet connection settings [proxy] from MSIE settings (firefox settings???)
Idea pool
OpenSource installers for Windows out there:
Worth a look:
They might benefit from Manatee if they decide to use it to deploy their distribution.
Concerns
- Size
- Python is already large. wxPython is also large.
- building a custom stripped-down python+wxpython distribution? sounds like a lot of work, and a lot of hassle to maintain.
- Functionality
- Can this be too much for a hot and very short summer? Do not add new functionality any more, and try to reduce overal complexity. It’s never late to implement an interesting feature, if everything else works.
- Features must adhere to the prject goals, it’s not something to let your imagination loose.
Manatee/Installer
Functionality
- Check for existing Manatee installations (remove if old version, remove or abort if current or newer)
- Set up Manatee
- Create directory structure
- Copy files
- Create desktop/Program menu shortcuts
- Launch Manatee/ControlCenter
Manatee/Core
Sub-components
- Net transport
- Distribution manager
- OS interface
Ideas
- Distibution description would include some data for each layer. each object is purely abstract and opaque container, which means <package> may have some os-specific description which would not be available to other parts of the Core. This also means there’s no special package-for-the-os-layer concept, the same package object is being passed around through all the core layers.
- probably this will not hold true for exporting it outside the core (?)
- Move all logic to the client. Distribution Server must server only as file storage. This lessens the burden on the mirror maintainers. ClientServer model is not really needed here.
- Network transport functions:
- includes mirror logic (because different transports may have different concepts of mirros. e.g. BitTorrent)
- fetch distribution description
- fetch a package
- OS functions:
- install a package
- remove a package
- check if a package has already been installed through a different source, like standalone install
Manatee/DistributionXML
I will paste a UML class diagram here, which basically says it all :)
Beware! I'm a complete UML newcomer. I just use it as convenient tool
to visualize my XML structure :).
It's not quite complete yet.
Manatee/ControlCenter
Functionality
- Allows to manage several distibutions with one Manatee/ControlCenter instance (choose the distribution at start up)
- Add new distibution, remove installed distribution and all packages in it.
- For current distribution, it displays the list of installed packages (perhaps, a tree or a grid of icons would be also nice)
- You can launch any application
- You can remove any application
- You can select which applications you want to install (the default action if no applications are currently installed)
- maybe add a “show not installed/show all” mode? in that mode, gray out those not installed, or shade those already installed
- You may wish to upgrade (or downgrade, if several version exist) to another version
- Have a control panel object /(???, why? it’s bogus)/
- Have sound events /(not really a necessity)/
- Have a nice wallpaper bundled along with a distribution, and ask user whether she wants it
- Show WinLibre news (RSS feeds)
- perform a distribution → HTML export, to make an online version of WinLibre
- an xslt template might do the job without a single line of python code
Some ideas here may be very complex or simply not required. Those will be moved to a separate list later.
Interface mock-up
A list of installed application
All application in distribution
Winlibre
A short description :
- WinLibre is a rigorous selection of free, legal software for Windows 98, 2000, XP
- WinLibre packages this quality software in a complete and coherent product
- WinLibre software meets your essential needs:
- Office (word processor, spreadsheet, presentation),
- Internet (web, email, messaging),
- Multimedia (music, video),
- Create (drawing, music),
- Tools (file compression, antivirus)
- WinLibre automates and simplifies their installation
I will implement Manatee, a tool used to deploy WinLibre.
See Appendix A to see what a WinLibreXML file might look like.
Appendix A
WinLibreXML:
<?xml version="1.0"?>
<distribution name="WinLibre" version="2005.06.08-00">
<category>
<subcategory name="Office">
<description>Everything you need at office</description>
<image>...</image>
</subcategory>
</category>
<image>...</image>
<description>is a rigorous selection of <link destination="http://www.winlibre.com/en/Logiciel_Libre.php">free, legal software</link> for Windows 98, 2000, XP</description
<package name="OOo" version="1.1.3" category="Office">
<description language="en">
<p> Complete, Microsoft Office compatible, sofware suite.</p>
<p> Writer, Calc, Impress, Draw</p>
<p> Web: <link>www.winlibre.com/en/Articles/Office/OpenOffice.Org.php</link></p>
</description>
<image>...</image>
<dependency package="j2re" version="1.4.2-05" match="exact" install="before" />
<dependency package="DicOOo" version="1.0.1" match="exact" install="after" optional />
<files>
<file name="installer" target="Ooo_En_1.1.3.exe" size="47205416" md5sum="6f5902ac237024bdd0c176cb93063dc4">
<url>http://ftp.belnet.be/pub/mirror/ftp.openoffice.org/stable/1.1.3/OOo_1.1.3_Win32Intel_install.exe</url>
<url>http://ftp.heanet.ie/mirrors/openoffice.org/stable/1.1.3/OOo_1.1.3_Win32Intel_install.exe</url>
<url>http://mirrors.sunsite.dk/openoffice/stable/1.1.3/OOo_1.1.3_Win32Intel_install.exe</url>
<url>ftp://ftp.tu-chemnitz.de/pub/openoffice/stable/1.1.3/OOo_1.1.3_Win32Intel_install.exe</url>
</file>
</files>
<setup_parameter name="installer_name" value="OOo_1.1.3_Win32Intel_install\setup.exe" />
<setup type="custom" language="python"><![CDATA[
#import manatee.setup as manatee [automated]
manatee.execute(os.path.join(manatee.tmpdir, manatee.files['installer'].target),
'-o"%s" -y' % manatee.tmpdir )
manatee.execute(os.path.join(manatee.tmpdir, manatee.parameter.installer_name))
]]>
</setup>
</package>
<package name="PDFCreator" version="0.8.0" category="Office">
<description language="en">
<p> Virtual Printer to create PDF files. </p>
<p> Is an Adobe Acrobat Writer alternative. </p>
<p> Web: <link destination="www.winlibre.com/en/Articles/Office/OpenOffice.Org.php" /></p>
</description>
<image>...</image>
<files>
<file name="installer" target="PDFCreatorGnu_Int_0.8.0.exe" size="7561382" md5sum="6f5902ac237024bdd0c176cb93063dc4">
<url>http://belnet.dl.sourceforge.net/sourceforge/pdfcreator/PDFCreator-0_8_0_GNUGhostscript.exe</url>
<url>http://voxel.dl.sourceforge.net/sourceforge/pdfcreator/PDFCreator-0_8_0_GNUGhostscript.exe</url>
<url>http://umn.dl.sourceforge.net/sourceforge/pdfcreator/PDFCreator-0_8_0_GNUGhostscript.exe</url>
<url>http://heanet.dl.sourceforge.net/sourceforge/pdfcreator/PDFCreator-0_8_0_GNUGhostscript.exe</url>
</file>
</files>
<setup type="custom" language="python"><![CDATA[
#import manatee.setup as manatee [automated]
manatee.execute(os.path.join(manatee.tmpdir, manatee.files['installer'].target))
]]>
</setup>
</package>
<!-- To be added -->
</distribution>