Windows Package Manager The main goal of this application is to meet the needs of the Western Washington University - Computer Science department. However, the design kept general purpose use in mind. The `winpkg` CLI frontend was influenced by FreeBSD's portsnap & portupgrade suite, and those familiar with the latter may recognize most of the flags and equivalent functionalities. Features: * Check up-to-date status of installed programs * Install/Update/Remove programs * Clean interface * Modular design for creating extensions Requirements: Python 2.7 sqlite urllib2 git -- (for winsync) Skill level: Expert Installation: Python 2.7 must be installed and include the following packages: sqlite, time, logging, ... A sqlite database is not required to be setup before starting the application. If one is not setup, the name of the database should be configured. Upon startup of the program, the database will be created and include all necessary tables; if the tables already exist then this will be detected. (Git must be installed, as that is how the package tree is kept up to date.) The program is installed by unzipping the folder and moving it on your default install drive (usually C:\). Navigate to that folder in the command line (cmd.exe), or add the folder to your PATH. Basic Usage: The commands are implied to be run in the command line (cmd.exe) within the install folder. Installing new packages: Not yet final. Installing new packages is still a process that needs refining. Currently, packages are capable of being registered, but the package format has yet to be finalized. See example tests for how it is currently done. Check installed packages for new versions: > winpkg.py info Upgrading installed packages: > winpkg.py update Create new packages for winpkg: Not yet implemented. A version of the sample package format can be found in packages/sample.pkg. For more specifics about the commands and options, check the help guide: > winpkg.py --help Programmer's Guide: To be clear, there is a lot of missing functionality. Demonstrations ensured that regular testing should not crash the program, but that is not a promise. Demos showed that that everything was quite stable, however limited. Tips: Generally, stay away from editing wpm_db.py. Those are the DB primatives. db_wrapper.py should be used to create atomics to be used by the shell and app. Try to allow wpm_shell to do all the echoing. The following are a list of important files: winpkg.py -> The wrapper that starts the command interpreter. Passes settings information to the parser. wpm_db.py -> Contains the database object and member functions that perform typical operations on a database (i.e. insert, update, etc). The member functions are primarily designed for the builtin database schema but generatlized to the point where the addition of tables may not require modification to the existing functions (this case is not guaranteed). Some of the functions perform specialized operations given a specific table, i.e. when the function update is given the table OldFiles a text insertion is performed to allow for incrementing a counter. db_wrapper.py -> Acts as a wedge between the database operations (i.e. queries) and the programmer. The functions it provides are specific to the application's intended use which is package management. wpm_app.py -> Contains the application object and member functions that perform functions of a regular package such as checkUpdates and dlUpdates. These functions are designed to use download/version regular expressions, and URLs in the database using the db_wrapper helper functions. To find the hyperlink for a given application, a regular expression (found in the database) is compared against the entire webpage. If there is more than one hyperlink found in the html, the user is prompted asking the user which he or she would like to use. This is the URL of choice for downloading. This is done very similary for the version number of the installer. wpm_shell.py -> Contains the command line parser and interpreter that the user interfaces with. Integrates the DB and application functionalities. winsync.py -> Utility for syncing the package repository. Not yet functional. settings.py -> Default settings file for configuration of the package manager. packages/ -> Contains the preliminary form of the package repository. Sample package file available for viewing. ------------------------------------------------------------------------------- Western Washington University Computer Science Department - 2011 Sebastian Imlay Joshua Stein T.J. Telan ------------------------------------------------------------------------------- This software is AS-IS and the authors are not responsible for potential issues caused to the user computer. Released under MIT License. See LICENSE for information.