Development
Prev
Next

Appendix A. Development

Table of Contents

Compilation
Design notes
Translation

Compilation

1. Software requirements

1. GNU C Compiler [download]
2. NSIS compiler [download]
3. Lua, IUP, CD [download]
4. 7-zip file archiver [download]
5. Zip file archiver [download]

In case when the installer is provided for an appropriate tool, just install it. Otherwise unpack provided archive into any directory, specified in your %PATH% environment variable. If you are in trouble, just unpack archives to C:\WINDOWS, in other words, in folder where you have Windows installed.

If you are using the latest version of MinGW, don't be surprised when 'undefined reference to __strtod' error message appears during the compilation. This is because the following patch applied to MinGW is incompatible with msvcrt.dll library which is used by the Ultra Defragmenter. We hope this mistake will be resolved in future by MinGW team.

Why GCC is the best choice for us?
You may also use Microsoft Visual Studio 6.0 instead of the GCC, though this method of UltraDefrag building is much more complicated.
There are also few optional tools which aren't required for build purposes, but may be useful for debugging or better understanding program's internal structure.

2. Building and installation

First of all, download source archive and unpack it somewhere. Note that currently path must not contain spaces. If you have some ideas how to fix that send your suggestion to the authors, please.

Configure build options by typing the following command:

lua configure.lua

Enter the paths to development tools and other options here. If you prefer to use MinGW, check also Apply patch to MinGW box and click OK to replace some libraries included in MinGW (libntdll.a and libntoskrnl.a) with more adequate versions. Old libraries will be saved in files with an additional suffix '.orig'.


The screenshot above represents only the actual options which gives us the best compilation result. To configure all available options, including obsolete and experimental, type:

lua configure.lua --all

Though configure.pl script works fine too, it is obsolete. Lua language gives us better performance and requires much less disk space itself.

There are four different build commands:

  1. BUILD for full-featured installer and sources package
  2. BUILD-MICRO for Micro Edition installer
  3. BUILD-PORTABLE for UltraDefrag Portable package
  4. BUILD-MICRO-PORTABLE for portable Micro Edition package

To build UltraDefrag type:

build

To display list of available build options type:

build --help

If you have any questions regarding details of the build process, just look at appropriate script contents. Sure you'll find an answer.

Prev
Next
Home


ultradefrag.sourceforge.net