Have a Cookie

Cookie

My website uses cookies to personalize content and ads, to show you social media features, and to analyze website traffic. I might share information about your use of the website with my social media partners, advertising partners, and analysis partners, who may combine the data with other information about you, provided to them from your prior use of their services. Please note that you can change your cookie settings at any time.

MPD Files

MPD Files

Tools for creating multi-part-dat (“.mpd“) files from collections of LDraw (“.ldr“) files, and for splitting the MPD files into LDraw files again.

A MPD file is a collection of LDraw files in a practical text format ready to send by e-mail or post to Lugnet.

The package currently consists of two tools. The MPD builder creates a MPD file from a main model file and all the subfiles the model file refers to (unless they are in a different catalog from the one the program is executed in). The MPD splitter takes an existing MPD file and extracts the LDraw files it contains.

You can browse the source code on-line.

You can learn about Ada in the Ada Programming wikibook.

Most recent packages (the source packages will always be most up to date): Source | AIX | DOS | Linux/i386 | OS/2 | OSF | Win32

To do:

  • (anything?)

Features:

Typically you will use the programs with command lines like this:

    build_mpd_file -model model.ldr

for building a MPD file. This will create a MPD file named “model.mpd“.

The MPD builder adds a 0 NOFILE line at the end of the generated MPD files, so signatures and other stuff your e-mail/news posting program might add at the end of your messages is ignored by the MPD splitter.

If you want to split up an existing MPD file, you use a command like this:

    split_ldraw_file < collection.mpd

This will create the files specified in the multi-part LDraw file collection.mpd. Here is an example of a multi-part LDraw file.

Command line arguments for build_mpd_file

-model something.ldrSpecifies that “something.ldr” is the main model for the created MPD file. The program will scan the current directory for files referenced by the main model, and include them in the MPD file.-path Directory1 Directory2 …In addition to the current directory, build_mpd_file will also scan the directories listed here for sub-models to include in the MPD file.-collectEven though the sub-models may be found in other directories than the current one, they will all appear in the same directory, when the MPD file is split.-collect DirectoryEven though the sub-models may be found in other directories than the current one, they will all appear in the listed directory, when the MPD file is split.-overwriteDo not check if there already is a “.mpd” file corresponding to the main model “.ldr” file. The default behaviour is not to overwrite existing files. This flag changes that.

Command line arguments for split_ldraw_file

-mpd MPD_FileMPD fil to split. If you don’t use this option, split_ldraw_file will try to read a MPD file from standard input.-show_commentsPreviously split_ldraw_file would write everything that didn’t go into a LDraw file to the screen. You should use the -show_comments flag if you want the behaviour from the previous version.-create_directories noThe default behaviour of the program is to create directories specified in the MPD file. With -create_directories no this is prevented.-preserve_case yesThe default behaviour of the program is to convert all file names to lower case. With -preserve_case yes the program will preserve the case of the file names in the MPD file.-overwriteDo not check if any of the files in the MPD file exists. The default behaviour is not to overwrite existing files. This flag changes that.

2002-08-14:

Minor changes to the layout of the created MPD files.

Source code

You can find information about Ada compilers at the AdaIC web site.

Linux/i386 binaries using dynamic libraries

You need the GNAT 3.13p runtime to use these binaries.

Linux/i386 binaries using static linking

Use this version of the Linux binaries if you don’t have/want to install the GNAT runtime.

2002-08-06:

Now conversion of file names to lower case, and creation of subdirectories is controlled by command line arguments (“-preserve_case” and “-create_directories” respectively).

Source code

You can find information about Ada compilers at the AdaIC web site.

Linux/i386 binaries using dynamic libraries

You need the GNAT 3.13p runtime to use these binaries.

Linux/i386 binaries using static linking

Use this version of the Linux binaries if you don’t have/want to install the GNAT runtime.

Win32 binaries using static linking

2002-07-31:

Updated the comment inserted by the MPD builder.

Source code

You can find information about Ada compilers at the AdaIC web site.

Linux/i386 binaries using dynamic libraries

You need the GNAT 3.13p runtime to use these binaries.

Linux/i386 binaries using static linking

Use this version of the Linux binaries if you don’t have/want to install the GNAT runtime.

OSF 4.0 binaries using static linking

Win32 binaries using static linking

Thanks to Don Heyse for providing the Win32 version of the MPD tools.

2002-07-17:

Now with support for both the “.ldr” and the “.dat” extensions.

Source code

You can find information about Ada compilers at the AdaIC web site.

Linux/i386 binaries using dynamic libraries

You need the GNAT 3.13p runtime to use these binaries.

2001-08-10:

First collected update. In the previous releases the build and split tools were distributed separately.

Source code

You can find information about Ada compilers at the AdaIC web site.

Linux/i386 binaries using dynamic libraries

You need the GNAT 3.13p runtime to use these binaries.

Linux/i386 binaries using static linking

Use this version of the Linux binaries if you don’t have/want to install the GNAT runtime.

OSF 4.0 binaries using static linking

Older versions:

AIX/RS-6000 binaries

DOS binaries

You will need CWSDPMI or some other DPMI to run these programs.

OS/2 binaries

Windows binaries

Thanks to Steve Bliss for compiling the Win32 version (for Windows95/98/NT).

If you use LDAO, you might want to configure LDAO to run the MPD Builder at the click on a button. Similarly, you can also configure LDAO to run the MPD splitter at the click on a button.