home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 March / PCWorld_2008-03_cd.bin / system / ultradefrag / ultradefrag-1.3.0.bin.i386.exe / INSTALL.TXT < prev    next >
Text File  |  2008-01-21  |  9KB  |  227 lines

  1. 1. Installation from binary package
  2.  
  3. 1.1 System requirements
  4.  
  5.   UltraDefrag runs on Windows NT 4.0, Windows 2000, Windows XP, Windows Server
  6. 2003 and  Windows Vista, including 64 bit versions of Windows. NT 4.0 Alpha
  7. is not supported currently.
  8.  
  9.  
  10. 1.2 Installation
  11.  
  12.   To install UltraDefrag, simply download ultradefrag-x.y.z.bin.xxxx.exe
  13. from project site. In common cases xxxx must be 'i386'. If you have AMD x64
  14. or Intel Core Duo processor and 64-bit Edition of Windows installed, xxxx 
  15. must be 'amd64'. If you use PC with IA-64 architecture then try to download
  16. IA64 version. The IA-64 build is untested because the authors lack access to
  17. IA-64 bit hardware. We would like to hear reports of attempts to run.
  18.  
  19.   The installation process is very simple. Enjoy!
  20.  
  21.  
  22. 2. Installation from sources
  23.  
  24. 2.1 Software requirements
  25.  
  26. 2.1.1 Compilation with Windows Server 2003 DDK
  27.  
  28.   The best way to build UltraDefrag is to use the Windows Server 2003 Driver
  29. Development Kit (DDK). You can simply download it from one of the locations
  30. that can be found using any web search system (e.g. Google).
  31.  
  32.   The only disadvantage of this method is that the Windows DDK is a really 
  33. big package (about 230 Mb). However, if you have an internet connection with 
  34. a good download rate, its should not be a large problem.
  35.  
  36.  
  37. 2.1.2 Compilation with MinGW
  38.  
  39.   Other interesting way to produce UltraDefrag package is to do so using MinGW.
  40. GNU C Compiler (GCC) has one important advantage over the Microsoft C
  41. compiler, it produces many useful warnings for code that is not completely
  42. within the C standard. I have removed hundreds of small bugs from UltraDefrag
  43. thanks to the warnings produced by GCC. The biggest disadvantage of gcc is that 
  44. it produces larger executables than the microsoft compiler. e.g: A driver
  45. produced by DDK may have 22.0 Kb size, but the same driver produced by GCC is
  46. only about 32.0 kb.
  47.  
  48.   You can either download MinGW from http://www.mingw.org or download
  49. MinGW Developer Studio from http://www.parinyasoft.com (about 25 Mb).
  50.  
  51.   Note that the MinGW build system can only build i386 binaries.
  52.  
  53.   VERY IMPORTANT NOTE: If you build the dynamic libraries from the MinGW
  54. Developer Studio, the resulting *.a files are invalid. This is because I don't
  55. know how to specify linker options in Developer Studio's project file. Use
  56. makefiles instead:
  57.  
  58.   mingw32-make Makefile.mingw
  59.  
  60.  
  61. 2.1.3 Compilation with Microsoft Visual Studio 6.0
  62.  
  63.   This is another method for building UltraDefrag. It does not require the
  64. DDK. You can use Microsoft C compiler included in MS Visual Studio version 6.0
  65. or later.
  66.  
  67.   To use this method you will need to obtain a copy of ReactOS source code
  68. from http://www.reactos.org for special header files used to build the driver.
  69.  
  70.   You will also need to download the following files:
  71. - ntdll.lib from http://www.masm32.com/board/index.php?topic=2124.new
  72. - ntoskrnl.lib + hal.lib from http://www.freewebs.com/four-f/index.htm
  73.   (included in KmdKit package). Put these files to lib subdirectory of your
  74.   Visual Studio installation.
  75.  
  76.   VERY IMPORTANT NOTE: The winnt.h file in visual studio 6.0 contains an
  77. incorrect definition of the NtCurrentTeb function. Therefore replace the
  78. following lines:
  79.  
  80.   #if defined(_M_ALPHA)
  81.   #define NtCurrentTeb() ((struct _TEB *)_rdteb())
  82.   #else
  83.   struct _TEB *
  84.   NtCurrentTeb(void);
  85.   #endif
  86.  
  87.   with:
  88.  
  89.   #if defined(_M_ALPHA)
  90.   #define NtCurrentTeb() ((struct _TEB *)_rdteb())
  91.   #else
  92.   struct _TEB *
  93.   __stdcall NtCurrentTeb(void);
  94.   #endif
  95.  
  96.   Finally, edit ultradfg.dsp file (driver project file), and ensure that the
  97. reactos header paths are properly set.
  98.  
  99.   Note that currently only i386 binaries can be produced using this way.
  100.  
  101.  
  102. 2.1.4 Common tools
  103.  
  104.   There are a few other tools that you should have installed on your PC to
  105. perform a full-featured build:
  106.  
  107. a). NSIS compiler (http://nsis.sourceforge.net) is used to produce installers.
  108.     Currently I'm using NSIS v2.28.
  109.     NOTE: In my nsisconf.nsh file (in NSIS root directory) I have 
  110.     the following line:
  111.  
  112.           !packhdr temp.dat '"C:\WINDOWS\upx" -9 -q temp.dat'
  113.  
  114. b). Ultimate Packer for eXecutables (upx) (http://upx.sf.net) is used to
  115.     reduce sizes of some binary modules. I'm using version 2.03w. Put the
  116.     upx.exe file in one of the directories, specified in your PATH environment
  117.     variable, p.a. in %windir%\system32.
  118.  
  119. c). 7-zip file archiver (http://www.7-zip.org) is used to produce 
  120.     the source code package.
  121.  
  122. d). .NET framework v2.0.50727 or later is used to compile the 
  123.     UltraDefrag Scheduler.NET application.
  124.  
  125. e). Perl language package for Windows. You can download it from
  126.     http://www.activestate.com. Currently I'm using v5.8.6 to execute
  127.     configure.pl script and to develop the Modern UltraDefrag User Interface
  128.     (that was created for extended gui configuration abilities).
  129.  
  130. f). Doxygen (http://www.doxygen.org) is used to produce a special kind of 
  131.     documentation from project's source files. It contains descriptions 
  132.     of functions and global variables dependencies and may be used e.g. for
  133.     removing unnecessary data fields from program's internal structures.
  134.     Also it is helpful for any other program code cleanup.
  135.     So, if you are programmer, this tool is highly recommended for you.
  136.  
  137. g). ROBODoc (http://www.xs4all.nl/~rfsber/Robo/robodoc.html) is used to 
  138.     build interface documentation, that you should use as main developer
  139.     manual. You will find here all descriptions of functions exported by 
  140.     UltraDefrag and ZenWINX (that is a part of the Ultra Defragmenter)
  141.     libraries, important notes about undocumented windows functions usage
  142.     and many other aspects of the Ultra Defragmenter development.
  143.     To build a basic version of docs, simply type:
  144.  
  145.         robodoc
  146.  
  147.     To produce more detailed developer manual, type:
  148.  
  149.         robodoc --internal
  150.  
  151. h). md5sum tool is used to generate file ultradefrag-x.y.z.MD5SUMS that
  152.     gives you an ability to check downloaded packages integrity.
  153.     You can download this tool from http://www.etree.org/md5com.html.
  154.  
  155. i). Lua language binaries package is used to execute some build scripts.
  156.     You can download it from http://luabinaries.luaforge.net/.
  157.     Install it in some folder on your %PATH% and rename lua5.1.exe to lua.exe.
  158.  
  159.  
  160. 2.1.5 Software recommended for debugging purposes
  161.  
  162.   Because the actual work done by UltraDefrag is done by kernel mode driver,
  163. you can download the tools described below to troubleshoot bugs. Even if you
  164. are not programmer, these tools may be very useful for you:
  165.  
  166. a). DebugView. You can download it and other tools created by Mark Russinovich
  167.     from http://www.sysinternals.com. In DebugView window you can see some 
  168.     interesting information given by driver engine: number of clusters on your 
  169.     volumes, mft position and much more. Some other useful tools available from
  170.     sysinternals are
  171.     - WinObj: Allows you to see when UltraDefrag opens its driver, creates 
  172.     some events etc.
  173.     - File Monitor
  174.     - Registry Monitor.
  175.  
  176. b). PoolTag. This tool is included in Windows DDK or can be downloaded from 
  177.     http://www.osr.com. Using this tool you can watch driver memory allocation.
  178.     The UltraDefrag driver tag is 'ULTR'.
  179.  
  180. c). StatusToError tool included in KmdKit (see above). Input the NTSTATUS code
  181.     given by the UltraDefrag gui, console or native app and it will give you
  182.     the localized error description. A simple but very useful tool, especially 
  183.     for boot time defragmentation errors, where it is impossible for the
  184.     program to do localization lookups.
  185.  
  186.  
  187. 2.1.6 Especially for Mr. Random Newbe (Some notes for the beginners)
  188.  
  189. a). Many of described tools have small size, and you don't need high-speed
  190.     internet connection to download their latest versions. Simply do it. 
  191.     And enjoy!
  192.  
  193. b). If you will place tools executables in one of the directories, specified 
  194.     in your PATH environment variable, the command execution will be very easy 
  195.     process, because you can type commands without paths in the command prompt.
  196.  
  197.  
  198. 2.2 Building and installation
  199.  
  200. a). Download source archive and unpack it somewhere.
  201.     NOTE: Currently path must not contain spaces. If you have some ideas
  202.           how to fix that send your report to the authors, please.
  203. b). Configure build options by typing the following command:
  204.  
  205.     perl configure.pl
  206.  
  207.     This tool has a graphical interface. Enter the paths to prerequisite
  208.     libraries and other options. If you prefer to use MinGW, click the button
  209.     'Apply patch to MinGW' to replace some libraries included in MinGW
  210.     (libntdll.a and libntoskrnl.a) with more adequate versions. Old libraries
  211.     will be saved in files with additional suffix '.orig'.
  212.  
  213. c). To build UltraDefrag use the BUILD.CMD script; parameters are:
  214.  
  215.     build               in .\bin directory you will find installer;
  216.                         in .\src_package - sources 7zip-archive.
  217.  
  218.     build --install     it will install x86 program to default location
  219.                         after build
  220.  
  221.     build {--use-winddk | --use-mingw | --use-msvc} [--install]
  222.             you can specify your compiler of choice
  223.  
  224.     build --clean       use it to delete all intermediate files
  225.  
  226.     build --help        show usage information and exit
  227.