FDPKG
 

Main Page

Unix - DJGPP Ports

Unix - OW Ports

Enhanced Distros

My Software

FDPKG 0.2

Features

System Requirements

Recommended System Requirements

Compiling

Todo List

Downloading

FreeDOS Package Specs

Enhanced Package Specs

Features

FDPKG is a simple but powerful package manager specifically designed for FreeDOS. It features the following:

  • Modes to:
  • Install packages
  • Remove packages
  • Configure packages
  • Check the dependencies of a package
  • View the description (or specified field) of an LSM file (in the current directory or %DOSDIR%
  • Display all installed packages
  • Ability to unzip packages packed in either 7-Zip or Zip format
  • Conflicts checking (if it is not a good thing for two packages to be installed)
  • Can attempt to install a package needed (a dependency)
  • Support for configuration scripts written in BASIC, PERL, PYTHON, REXX, or BATCH
  • When upgrading, the feature to abort if version to be installed is same as version already installed, otherwise ask permission to continue
  • Backwards compatibility (except for command-line) with FDPKG.bat from the Enhanced Release distros and with ordinary FreeDOS packages
  • Feature to scan %FDPKG% for arguments
  • DOS switch character support
  • Option to force 'yes' to all answers

System Requirements

  • 8086 processor (untested, but should work)
  • Unzip.exe or 7za.exe in your path (if using a 286 or lower processor, get the 16-bit version of unzip.exe)
  • %DOSDIR% set to reflect the directory where FreeDOS packages should be installed (the directory with the BIN, DOC, NLS, HELP, and SOURCE directories
  • A command interpretor and %COMSPEC% set to point to this interpreter
  • Not likely much RAM (512k should be fine) 

Recommended System Requirements

  • 386 processor or higher
  • 32-bit Unzip.exe or 7za.exe + HXRT in your path
  • %DOSDIR% set
  • A command interpretor supporting Long Filenames
  • XMS memory 

Compiling

Currently, FDPKG only compiles with OpenWatcom correctly, although that is planned to change. To compile it, copy config.wat to config.mak, and run a GNU-compatible make utility, such as the 16-bit port available on iBiblio. Func.c contains mostly the program-independent functions, whereas Fdpkg.c contains the FDPKG-specific stuff. The misclib directory contains miscellaneous files like prf.c, kitten.c/h and the portability library needed for Pacific C.

Todo List

2.0 or later:

  • Turbo Vision or GEM front-end to FDPKG (or other GUI/TUI interface)
  • Feature to be able to create packages (unsure of how I will make this better than simply zipping :-) )
  • Dependency checking and zip list creating integrated into textinst.exe and install.exe (PASCAL, maybe not dependency checking for simplicity's sake... hmm... guiinst is supposed to create an installation database that allows removal of packages; perhaps fdpkg could be enhanced to read this database) - Half done
  • Global zip with depends.txt of most common packages to determine ahead of time whether dependencies are met
  • Ask user all question first and then install 'selected' packages
  • Support LFNs - Use the new OpenWatcom LFN extension library
  • Stable port to DJGPP

1.0 or later:

  • Add the possibility to 'recommend' packages in depends.txt - Done
  • With \"foo || bar\" syntax, ability to ask the user if they want to install foo OR bar - Done
  • Accept @file arguments

1.0:

  • Testing with OpenWatcom, Turbo C, and Pacific C binaries (see if calling p7za works) 

Downloading

FDPKG 0.2 is available at iBiblio and supports installation, removal, configuration, and dependency checking of packages conforming to the package specs mentioned below (both enhanced and regular). The source package is FDPKGS.zip and the binary package is FDPKGX.zip.

FreeDOS Package Specs

If a package is to be installed correctly with FDPKG, it should follow the official spec for FreeDOS packages:

  • BIN\ contains all of the executable files of the package and file needed in the same directory as those executables
  • DOC\pkgname contains all of the documentation files of the package, including licenses
  • NLS\ contains all of the message catalogs of a package to be used in on-the-fly translation
  • HELP\pkgname.lang is a file used by FASTHELP to display quick help for the package
  • SOURCE\pkgname (usually source packages only) contains the sources needed to compile the package

Enhanced Package Specs

In order to take advantage of the advanced features of FDPKG, such as dependency checking and installation scripts, the following enhanced spec should be followed:

  • A folder called PACKAGES\ which is preferably a hidden directory; must be in root directory of the package. Inside this folder, there should be another folder conforming to the name of the package minus the ".zip" or ".7z" extension. If the package to be installed does not follow the enhanced spec, this directory will be created anyways to allow other packages to depend on it and to allow removal.
  • Dependencies - Depends.txt in PACKAGES\pkgnamex\ should have each required package on each line. If two packages can be used instead of just one, the syntax " || " can be used to separate the package names to specify, for example, "EMM386 || FDXMS" (EMM386 or FDXMS). If there cannot be a conflicting package installed, the following syntax would be used: "!EMM386". When specifying dependencies, do not include the 'X' that ends the package name. Source packages may not have dependencies. Another file, DEPENDS.BAT can be used to echo dependencies into PACKAGES\pkgnamex\NEEDS.TXT, but this exists only for backwards compatibility and has been succeeded by DEPENDS.TXT which is also more flexible. In the future, DEPENDS.BAT support may be removed.
  • Configuration scripts - A file named INSTALL.XXX should be placed in PACKAGES\pkgnamex\ to be executed after package unpacking. The XXX in INSTALL.XXX pertains to an extension which may be one of: "BAT", "BAS", "PL", "PY", or "REX" to respectively denote a BATCH, BASIC, PERL, PYTHON, or REXX script. A configuration script can be used to launch an installation utility or set up required environment variables.
  • Upgrading scripts - If, when upgrading, it is not intended for all of the previous files originally in the package to be removed, UPGRADE.BAT in PACKAGES\pkgnamex\ will be executed (if it exists) to remove only the files that, for example, are configuration files such as menu.lst for GRUB4DOS. If UPGRADE.BAT is not found upon upgrading, the package will be treated as if it is to be removed. A feature on the TODO list for FDPKG is to enhance the spec to allow for a script to be executed AFTER a package is upgraded.
  • Removing scripts - When a package is to be removed and some files that weren't originally present in the zip file should be removed, REMOVE.BAT in PACKAGES\pkgnamex\ can be used to remove these files. Always when removing packages, the list file created by FDPKG will be used if it exists to remove all of the files that were present in the original zip.