Building ReactOS

From ReactOS Wiki
Revision as of 17:29, 5 August 2006 by GreyGhost (talk | contribs) (many fixes.....)
Jump to: navigation, search

Getting a Working Copy

The first step in building ReactOS is getting a copy of the source code, you can use the exported release source code, but since you are reading this, you are probably interested in keeping up to date with the latest changes, so you will want a "working copy" of ReactOS. To get a working copy of ReactOS, you need a Subversion client. Follow the client directions on how to checkout a copy of ReactOS from the Subversion repository URL svn://svn.reactos.org/reactos/trunk/reactos. This will checkout a working copy (usually in a directory called reactos).

Build Configuration

In the base of the working copy, you will find a file called config.template.rbuild. This is one of the configuration files for RBuild, our custom build system. Make a copy of this file as config.rbuild and open it in an editor. Each option is commented with a short description of what it does. Adjust the file to your needs and save it.

There are also a number of environment variables RBuild reads that affect its behaviour. These environment variables are documented in Makefile in the base of the working copy. More on this in the next section.

Make Targets

The ReactOS build is invoked with the command make, and on Windows you may need to use mingw32-make. There are a number of targets, and they are decribed in Makefile at the base of the working copy, please refer to it for targets involving single modules, and others. Here are some of the common targets:

all

This target builds all of ReactOS, with the binaries placed in ROS_OUTPUT environment variable. (default: output-i386)

bootcd

This target generates ReactOS.iso in the base of the working copy. This is the installation CD. (WaxDragon suggests you tag your bootcds with the revision they were built from.)

livecd

This target generates ReactOS-LiveCD.iso in the base of the working copy. This is the ReactOS livecd that runs completely from the cdrom. Excellent for demonstrations.

install

This target copies all the ReactOS binaries to their proper installation location as specified in the ROS_INSTALL environment variable. (default: .\reactos)

Run the make file from the root directory of ReactOS. In order to build a bootable ISO image, you must first build freeldr and then run "make install" ; next you must run "make bootcd" from the root ReactOS directory. The ISO image will be located in the root ReactOS directory when it is finished.

clean

This target cleans the ROS_OUTPUT directory, which is sometimes needed to properly update. NOTE: clean has been known to not clean everything, which sometimes leads to bugs. (WaxDragon suggests cleaning your working copy if you are about to do an update that changes headers, or always to be safe).

In a ReactOS / Windows build environment mingw32-make must be used instead of make

Build Troubleshooting

Please see the platform specific pages for build troubleshooting information.