Main /

FDPKG

Main.SideBar

FreeDOS Sections (components)

PmWiki

FDPKG

FDPKG

On this page...

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

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

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)

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

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.

Translatable Messages

FDPKG.BR

FDPKG.EN:

# Help Message

0.0:FDPKG v0.2 - GPL by Blair Campbell 2005\n
0.1:Installs FreeDOS packages both in specialized format and regular format.\n
0.2:Syntax: FDPKG [/INSTALL] [/REMOVE] [/CHECK] [/CONFIGURE] [/E] PKGX.ZIP ...\n
0.3: /INSTALL Installation mode; install package (default)\n
0.4: /REMOVE Removal mode; remove package\n
0.5: /CHECK Checking mode; check dependencies of package\n
0.6: /CONFIGURE Configuration mode; configure package\n
0.7: /DESC[:FIELD] View the description from an LSM. Field (optional) would\n
0.8: be field of the LSM to print. LSMs are searched for in\n
0.9: the current directory first, otherwise in %%DOSDIR%%\\APPINFO\n
0.10: /DISPLAY List all installed packages matching argument\n
0.11: /E Extract only, do not check dependencies (unless already\n
0.12: installed), do not configure\n
0.13: /[-]F|/[-]Y Force; Don't ask questions (POSSIBLY DANGEROUS)\n
0.14: /?[E]|/H[E] This help; /?E or /HE prints extended help\n
0.15: PKGX.ZIP The package to install; multiple names / wildcards accepted\n
0.16:Exit codes:\n
0.17: 255 Invalid path\n
0.18: 0 No problems\n
0.19: 1 Unresolved dependencies\n
0.20: 2 Invalid name\n
0.21: 3 Invalid environment variables\n
0.22: 4 Invalid options or arguments\n
0.23: 5 Aborted by user\n
0.24: 6 Unpacker not in path\n
0.25: 7 Insufficient memory\n
0.26: 8 Not all files could be removed\n
0.27: 9 Failure extracting\n

# FDPKG Messages

1.0:Invalid environment variables.\n
1.1:Insufficient arguments.\n
1.2:Drive or directory nonexistant.\n
1.3:Invalid option in %s\n
1.4:Invalid LSM field : %s\n

# FUNC Misc Messages

2.0:Press any key...
2.1:Archiver not in path.\n
2.2:Couldn't get version of installed %s %s.\nProceed (Y/N)?
2.3:Couldn't get version to be installed. Proceed (Y/N)?
2.4:Version to be installed is the same as installed package.\n
2.5:The version of the installed package is \"%s\"\nand the version to be installed is \"%s\".\nProceed (Y/N)?
2.6:Warnings extracting %s.\n
2.7:Unpackaging failed for %s.\n
2.8:Configuring...\n
2.9:binaries
2.10:sources

# FUNC Messages

3.0:This package needs \"%s\" installed\nAttempt install (Y/N)?
3.1:This package conflicts with \"%s\" Remove (Y/N)?
3.2:Running depends.bat...\n
3.3:Checking existance...\n
3.4:No package found : %s\n
3.5:Invalid %%DOSDIR%% variable.\n
3.6:Upgrading...\n
3.7:Package extracted\n
3.8:Unpacking...\n
3.9:Package installed.\n
3.10:Couldn't get \"%s\" field for : %s\n
3.11:Are you sure? Remove the %s %s (Y/N)?
3.12:All files couldn't be removed\n
3.13:All dependencies aren't met.\n
3.14:All dependencies met or there aren't dependencies.\n
3.15:Configuration complete.\n
3.16:Configuration unnecessary.\n

# Yes character

4.0:Y

Recent Changes (All) | Edit SideBar Page last modified on March 23, 2006, at 08:13 PM Edit Page | Page History
Powered by PmWiki