Package Manager

I really wanted to have a sort of automatic way of installing libraries on Windows. GNU/Linux already had this and it worked like magic. Unzipping .zip files like SDL and then copying them somewhere manually was really annoying. So I got to the point of my making my own sort of management tool and here it is!


With this CLI based .NET program, you can download software packages which are installed in "Include, Libraries, Bin" folders. This is mostly for C/C++ based libraries but I have plans to extend it to other languages.


Package configuration files are stored in a XML based file. By default it points to http://nukesoftware.de/packages.xml, but you can use your own file. Packages should point to a zip file which is then downloaded and extracted to the right places by the program.

Building

You can build this program with Visual Studio 2013, just build it.

Configuration

All the programs configuration files and temporary files are stored under %APPDATA%/NSPkgMgr. The main configuration file is pkgmgr.conf. In this file you can change the mirror URL and the Include, Library folders' paths.


The packages.installed file lists all the installed packages and their files. When you delete this file, the program can not remove your packages anymore.


Now the packages.xml file, which the mirror URL points to, holds all package configurations. It's structure is like this.

<Packages>

<Package
Dependencies=""
Name="sdl-x86"
Version="1.2.15"
URL="http://www.libsdl.org/release/SDL-devel-1.2.15-VC.zip"
Size="750"
IncludeDir=""
LibraryDir="SDL-1.2.15/lib/x86"
IncludeOutputDir="">

</Package>

</Packages>


Attribute Description
Dependencies
Lists of packages which need to be installed for this package. Needs to be seperated with a whitespace. Example: "pkg1 pkg2"
Name
The package's name.
Version
The package's version.
URL
Link to the ZIP file which contains the package's files.
Size
Size in kilobytes of the ZIP file.
IncludeDir
When this packages installs header files (like .h, .hpp), link to the folder in the ZIP file where it belongs.
LibraryDir
When this packages installs library files, link to the folder in the ZIP file where it belongs.
IncludeOutputDir
You may wish to give your include files a more understanding name, as the folders are named after their package's name. For example: When you install SDL TTF, you wanna have the SDL_ttf.h file in the SDL include directory, since it's part of SDL, so you set it to SDL.

Usage

When you start the program you get an interactive shell, or you can just execute the command as argument to the program. Like this:

NSPkgMgr.exe (command)


Basic commands


Name, Args... What it does
sync
Gets the newest packages from the mirror url.
lspkg
Lists the all the packages in the database.
get <PackageName>
Downloads and installs this package and all its dependencies.
rm <PackageName>
Removes this package and all it's files.

Links

You can download and help develop this project under it's Github page.