Winebot Architecture Overview

Winebot is a package manager program. It allows user to select a program/package from list of available packages, download it from repository and install to Wine environment. User can safely deinstall the program as well. There is no limit for available repositories and Winebot provides a set of tools to create own repository easily. Winebot can also manage sets of different WINE environments, called Wine bottles, or WINEPREFIXes.

Winebot consists of:

  • main CLI interactive program - winebot
  • non-interactive CLI supporting programs
    • winebot-install (TBD)
    • winebot-remove (TBD)
    • make-wdi.pl
    • generate-repository-indexes.pl
  • main GUI interactive program - winebot-gui (TBD)

All programs use shared library functions to access the data and manipulate with packages.

Winebot and its library functions are written in PERL and strive to be capable running both in Linux and Windows environment, using Wine. Some parts of Winebot use AutoHotkey automation scripting language to make installation and uninstallation easy and automated.

There are two shared libraries:

  • Winebot libraries - used by winebot programs
  • AutoHotkey libraries - used by package developers to create valid and portable installation and deinstallation scripts

Overview diagram

source:winebot/trunk/doc/images/winebot-overview.dia
source:winebot/trunk/doc/images/winebot-overview.png

Package (Application pack, WDI)

Tarball compressed using BZIP2. Resulting file has .wdi file name extension. Contains at least file pack.xml and subdirectory scripts/ with installation and removal scripts. May contain other data payload, as complete binary installer of the program, icons, registry files, etc.

Repository

A directory containing index file packlist.xml and .wdi files. Repository could be stored on local disk or accessible using HTTP/FTP. Winebot uses list of available repositories stored at ~/.winebot/repositories.xml. On initial run Winebot presents user with option to download packlist.xml for all default repositories. This action can be forced using command winebot update. Downloaded repository indexes are stored in Winebot cache.

Cache

Cache directory is stored in user's Winebot profile, at ~/.winebot/cache.

Wine Bottles / WINEPREFIXes

Wine allows to use more than one Wine instance (similar to use several Windows installations). Each Windows environment is stored in its prefix (dedicated directory path) - WINEPREFIX or bottle. Winebot uses bottle system to separate applications, which would heavily modify or break the bottle for other applications (Internet Explorer). User can also use one clean bottle for each one program he's installing, thus maintaining clean environment for (possible) bug reporting.

List of Winebot-compatible Wine bottles (i.e. created or initialized by Winebot) is stored at ~/.winebot/installed-bottles.xml.

Winebot 'initializes' existing bottle by creating a directory installed-applications, file installed-applications.xml in the bottle prefix and registering the bottle in ~/.winebot/installed-bottles.xml.

Winebot configuration

On first run, Winebot asks user for credentials and Windows license and stores them into ~/.winebot/winebot.xml. User credentials are used for bottle creation - they are written in bottle's registry. Windows license availability determines whether Windows-specific packages would be offered for installation. Users with license 'None' won't be available to install packages that require Windows license ownership.

~/.winebot/winebot.xml contains other user-specific configuration options. At present these are:

  • cache_external_downloads
    • Store downloaded files into cached package for later reuse. This saves download times, but could prolong first installation time.
  • copy_installer_to_bottle
    • On successfull installation, the installer .wdi package is copied into bottle's installed-applications directory. This allows package uninstallation. Shall this options is disabled, there is no clean way to uninstall the package.
  • installer_size_threshold
    • Size of .WDI installer in bytes. If .wdi size exceeds the threshold, only part of .wdi content is stored in bottle's installed-applications directory. The stored content consists of: pack.xml and scripts/ subdirectory. This is to prevent disk space abuse by large packages.

Modules

PERL modules Winebot uses as backend provide documentation itself. (TBD)