建立一个构建环境

为构建ReactOS还需要官方的ReactOS构建环境。 从这个页面,请下载并安装它。

确保没有干扰构建环境(如MSYS)建设时在你的PATH环境变量。

可选:安装Visual Studio

如 果你想使用Visual Studio编译reactos,你需要一个支持的版本,VS2010和以后。 您可以下载免费的社区版本的Visual Studio 2015。 与VS编译,打开相应的VS命令提示符和遵循相同的指令与海湾合作委员会为构建基于ReactOS构建环境。 注意,您还需要ReactOS构建环境,其中包含CMake和一些额外的工具,或者您可以安装最新版本的CMake自己,但不推荐。 如果您遇到的问题配置阶段,据报道,如编译器不工作,请检查,如果你有任何额外的安装Windows sdk或基本去除后,再试一次。

得到一个工作副本

构建ReactOS的第一步是获得源代码的副本。

您可以使用导出的发布源代码,但自从你读这篇文章,你可能感兴趣的跟上最新的变化,所以你会希望ReactOS的“工作副本”。 ReactOS得到一个工作副本,请阅读颠覆页面。

如果你不使用单独的SVN客户机,该命令

ssvn create

从构建环境中会下载它。

先决条件



之前建立的工具或ReactOS本身输出位置必须创建和准备。 这是一个简单的步骤,仅涉及一个命令。 这个命令位于根最近修改的源代码,可以运行从根目录本身或任何你想要的其他目录构建你的来源。 请确保你运行它从内部ReactOS是:

Linux / Unix

运行:

 configure.sh cd output-MinGW-i386

窗户或ReactOS

运行:

 configure.cmd cd output-MinGW-i386

执行后,文件夹output-MinGW-i386将被创建在ReactOS树的根。 你将被重定向到它。 如果你想建立在一个不同的文件夹,文件夹,然后执行cd

<path_to_source>\configure.cmd



配置。 cmd目前支架以下选项:/ ?显示帮助,Codeblocks创建一个CodeBlocks解决方案,Eclipse创建一个Eclipse的解决方案,makefile创建(n)做文件,铿锵声使用铿锵声代替gcc,VSSolution创建一个Visual Studio解决方案,清债信托公司——允许额外的运行时检查

另外可以指定任意数量的cmake命令行选项,如“-DSYMBOL =值”。

建筑ReactOS在Windows或ReactOS *

从构建文件夹(例如reactos \ output-MinGW-i386)entr以下命令:

ninja COMMANDS



替换与所需的构建命令,“命令”等bootcdlivecd下面列出:

*也许,ReactOS RosBE可能不工作的一些功能。 如果是这样,请您看一看我们的Jira是否这个问题已经报告页。

建筑ReactOS Unix / Linux


ninja COMMANDS


结合上面的步骤: 替换与所需的构建命令,“命令”等bootcdlivecd下面列出:

命令

开始构建环境命令提示符之后,有一些可用的命令。

调用一个构建

忍者忍者都

这个命令构建ReactOS的所有二进制文件。 他们将被放置在创建的输出目录创建的配置命令。 (默认值:output-MinGW-i386 / reactos) 所有的源文件,并没有改变自上次构建、不会再建造。

忍者bootcd

这个命令就像使,还会生成一个可引导ReactOS ISO文件(bootcd.iso)放入输出目录。 是明智Boot-CDs标记修订他们由许多ReactOS ISOs如果你需要保持。

忍者livecd

这个命令生成livecd.iso在输出目录中。 这是ReactOS live cd运行完全从cd - rom。

忍者hybridcd

这个命令生成hybridcd.iso在输出directotry。 这是一个混合ReactOS的cd


将模块添加到构建过程

有几个模块可以添加到构建过程。 例如rosapps不包括默认包含一些额外的应用程序。

页面构建模块模块存在的描述,以及如何将它们添加到构建过程。






Setting up a Build Environment

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

Make sure that no interfering build environment (such as MSYS) is in your PATH environment variable when building.

Optional: Setup Visual Studio

If you want to use Visual Studio to compile reactos, you need to get one of the supported version, which is VS2010 and later. You can download the free Community Edition of Visual Studio 2015. To compile with VS, open the appropriate VS command prompt and follow the same instructions as for building with the GCC based ReactOS build environment. Note that you still need the ReactOS build environment, which contains CMake and some additional tools, or you can install the latest version of Cmake yourself, but that is not recommended. If you experience problems with the configure stage, e.g. the compiler is reported to not be working, please check if you have installed any additional Windows SDKs or WDK and try again after removing them.

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.

If you do not use a separate SVN client, the command

ssvn create

from within the build environment will download it.

Prerequisites

Notice: You should temporarily disable your antivirus before proceeding, because some of them detect ReactOS's as infected system files.    

Before building either the tools or ReactOS itself the output location must be created and prepared. This is an easy step and involves only one command. This command is located in the root of recent revisions of the source code and can be run either from the root directory itself or any other directory you want the build your sources in. Please make sure you are running it from within ReactOS BE:

Linux/Unix

Run:

configure.sh cd output-MinGW-i386

Windows or ReactOS

Run:

configure.cmd cd output-MinGW-i386

After executing, folder output-MinGW-i386 will be created in root of ReactOS tree. You will be redirected to it. If you want to build in a different folder, cd to that folder first and then execute

<path_to_source>\configure.cmd

configure.cmd currently suppports the following options:/? displays help,Codeblocks creates a CodeBlocks solution,Eclipse creates an Eclipse solution,Makefiles creates (n)make files,clang Uses clang instead of gcc,VSSolution Creates a Visual Studio solution,RTC - enables extra runtime checks

You can additionally specify any number of cmake command line options, like "-DSYMBOL=VALUE".

Building ReactOS on Windows or ReactOS*

From the build folder (e.g. reactos\output-MinGW-i386) entr the following command:

ninja COMMANDS

Replace "COMMANDS" with the desired build commands, such as bootcd or livecd, listed below:

* Perhaps, some functions of RosBE may not work on ReactOS. If so, please have a look on our Jira page whether this problem is already reported or not.

Building ReactOS on Unix/Linux

ninja COMMANDS

Combining the above steps together: Replace "COMMANDS" with the desired build commands, such as bootcd or livecd, listed below:

Commands

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

Invoking a build

ninja or ninja all

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

ninja bootcd

This command works like make, but also generates a bootable ReactOS ISO file (bootcd.iso) placed into the output directory. It is wise to tag your Boot-CDs with the revision they were built from if you need to keep many ReactOS ISOs.

ninja livecd

This command generates livecd.iso in the output directory. This is the ReactOS Live-CD that runs completely from the CD-ROM.

ninja hybridcd

This command generates hybridcd.iso in the output directotry. This is a hybrid cd of ReactOS


Adding modules to the build process

There are several modules you can add to the build process. For example rosapps contains some additional applications not included by default.

The page Building Modules describes, which modules exist and how to add them to the build process.