Difference between revisions of "Building ReactOS"

From ReactOS Wiki
Jump to: navigation, search
(Overhaul of the page)
Line 1: Line 1:
== Getting a Working Copy ==
+
This page describes the steps necessary to build ReactOS.
  
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'').
+
= Getting a Working Copy =
 +
The first step in building ReactOS is getting a copy of the source code.
  
== Build Configuration ==
+
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, please read the [[Subversion]] page.
  
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.
+
= Setting up a Build Environment =
 +
For building ReactOS you also need the official [[ReactOS Build Environment]]. Please download and install it from that page.
  
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.
+
= Commands for building ReactOS =
 +
After you have started a Build Environment Command Prompt, there are certain commands available.
  
== Make Targets ==
+
== Commands for invoking a build ==
 +
=== make ===
 +
This command builds all binaries of ReactOS. They will be placed in the directory specified by the ROS_OUTPUT environment variable. (default: ''output-i386'')
 +
All source files, which did not change since the last build, will not be built again.
  
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:
+
=== make bootcd ===
 +
This command works like ''make'', but also generates a bootable ReactOS ISO file (''ReactOS.iso'') in the base of the working copy.
 +
[[WaxDragon]] suggests you tag your Boot-CD's with the revision they were built from if you need to keep many ReactOS ISOs.
  
=== all ===
+
=== make livecd ===
This target builds all of ReactOS, with the binaries placed in ROS_OUTPUT environment variable. (default: output-i386)
+
This command generates ''ReactOS-LiveCD.iso'' in the base of the working copy. This is the ReactOS Live-CD that runs completely from the CD-ROM
  
=== bootcd ===
+
=== make install ===
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.)
+
This command copies all the ReactOS binaries to their proper installation directory as specified in the ROS_INSTALL environment variable. (default: ''reactos'')
  
=== livecd ===
+
== Commands for creating project files for IDE's ==
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.
+
=== make msvc? ===
 +
There are some commands for creating project files for Microsoft Visual C++. Currently, the following commands are supported:
 +
* '''make msvc6''' - Create project files for Visual C++ 6.0
 +
* '''make msvc7''' - Create project files for Visual C++.NET 2002 (7.0)
 +
* '''make msvc71''' - Create project files for Visual C++.NET 2003 (7.1)
 +
* '''make msvc8''' - Create project files for Visual C++ 2005 (8.0)
 +
* '''make msvc9''' - Create project files for Visual C++ 2008 (Codename Orcas, 9.0)
  
=== install ===
+
=== make cb ===
This target copies all the ReactOS binaries to their proper installation location as specified in the ROS_INSTALL environment variable. (default: .\reactos)
+
This command will create project files for the [http://www.codeblocks.org Code::Blocks] Multi-Platform IDE.
  
 +
== Other commands ==
 
=== clean ===
 
=== 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).
+
This command cleans all files of your working copy except the generated ISO files (if any). The next build you make will be completely clean then.
 +
 
 +
=== make depmap ===
 +
This command generates a simple dependency map for all ReactOS components.
 +
 
 +
=== make vreport ===
 +
This command generates a version report for all ReactOS components, whose source files have appropriate information for that.
  
== Building ReactOS ==
+
= Adjusting the Build Configuration =
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.
+
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.

Revision as of 14:35, 22 September 2007

This page describes the steps necessary to build ReactOS.

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, please read the Subversion page.

Setting up a Build Environment

For building ReactOS you also need the official ReactOS Build Environment. Please download and install it from that page.

Commands for building ReactOS

After you have started a Build Environment Command Prompt, there are certain commands available.

Commands for invoking a build

make

This command builds all binaries of ReactOS. They will be placed in the directory specified by the ROS_OUTPUT environment variable. (default: output-i386) All source files, which did not change since the last build, will not be built again.

make bootcd

This command works like make, but also generates a bootable ReactOS ISO file (ReactOS.iso) in the base of the working copy. WaxDragon suggests you tag your Boot-CD's with the revision they were built from if you need to keep many ReactOS ISOs.

make livecd

This command generates ReactOS-LiveCD.iso in the base of the working copy. This is the ReactOS Live-CD that runs completely from the CD-ROM

make install

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

Commands for creating project files for IDE's

make msvc?

There are some commands for creating project files for Microsoft Visual C++. Currently, the following commands are supported:

  • make msvc6 - Create project files for Visual C++ 6.0
  • make msvc7 - Create project files for Visual C++.NET 2002 (7.0)
  • make msvc71 - Create project files for Visual C++.NET 2003 (7.1)
  • make msvc8 - Create project files for Visual C++ 2005 (8.0)
  • make msvc9 - Create project files for Visual C++ 2008 (Codename Orcas, 9.0)

make cb

This command will create project files for the Code::Blocks Multi-Platform IDE.

Other commands

clean

This command cleans all files of your working copy except the generated ISO files (if any). The next build you make will be completely clean then.

make depmap

This command generates a simple dependency map for all ReactOS components.

make vreport

This command generates a version report for all ReactOS components, whose source files have appropriate information for that.

Adjusting the 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.