(ReactOS Wiki) RBuild | Participants
|
- Statistics
- Participants
- Translate into Russian
- Translation result
- Translated in draft, editing and proof-reading required. Completed: 96%.
If you do not want to register an account, you can sign in with OpenID.
(ReactOS Wiki) RBuild | ||
'''work in progress by Z98''' | ||
This is an overview of how to construct an .rbuild file, which is useful when writing one from scratch. For a general reference of the options available to you when writing RBuild files, see the [[RBuild File Reference]]. | В этом обзоре речь пойдёт о создании с нуля файла .rbuild. Для получения общей информации о возможностях, доступных при создании файлов RBuild, перейдите по ссылке [[Файлы RBuild]]. | |
If you have another program that you wish to compile into ReactOS, you will need the source code as well as create an rbuild config file for it. In this example, we will assume that the program is called foo. The order in which I explain the various options are the order they technically should be in when you create an .rbuild file. | Если у вас имеется программа, которую вы хотите скомпилировать в ReactOS, вам потребуется её исходный код. Кроме того, необходимо будет создать для него конфигурационный файл rbuild. В этом примере мы предположим, что программа называется Foo. Описание опций будет вестись в том порядке, в котором они должны следовать в файле .rbuild. | |
Each .rbuild file is an XML document, so should begin with the '''xml''' tag and a reference to the DTD. The path to the DTD will vary depending on whereabouts in the source tree your code is. An example: | Файлы .rbuild представляет собой документ XML, поэтому он должен начинаться с тега '''xml''' и ссылки на DTD. Путь к DTD зависит от расположения у вас дерева исходного кода. Например: | |
<?xml version="1.0"?> | ||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> | <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> | |
Following this, you define a new module (executable). For type, you have the option of using: | Далее, вы задаёте тип нового модуля (исполняемого файла). Имеются следующие варианты: | |
* win32cui (console application) | ||
* win32gui (Windows application) | ||
* win32ocx (OLE custom control) | ||
* win32dll (Dynamic Linked Libraries) | ||
* objectlibrary (statically-linked library) | * objectlibrary (статически подключаемые библиотеки) | |
* exportdriver (drivers that export public symbols) | * exportdriver (драйверы, экспортирующие общие символы) | |
* kernelmodedriver (.sys driver) | ||
Another option that could be added is unicode="true/false". If you are compiling a driver you should also add entrypoint="DriverEntry@8". | Есть ещё параметр, который вы можете добавить, это unicode="true/false". Также, если вы компилируете драйвер, то вы должны указать точку входа: | |
<module name="foo" type="win32gui" installname="foo.exe" allowwarnings="true"> | <module name="foo" type="win32gui" installname="foo.exe" allowwarnings="true"> | |
This line is only needed if you're trying to export functions. This is most frequently used in DLLs, in which case your file would be located in something like /dll/*/foo. Drivers sometimes also export functions. | Следующая строка потребуется, только если вам будет необходимо экспортировать функции. Это чаще всего используется в DLL, в этом случае ваш файл должен находиться в папке вроде /dll/*/foo. Драйверы иногда тоже экспортируют функции. | |
<importlibrary definition="foo.def" /> | ||
This line is only needed if you need some special header that are not located in the base include directories. Otherwise you don't need to add it in. | Следующая строка потребуется только в том случае, если вам необходим нестандартный заголовок, который размещён в другой директории, а не в директории вашего кода. В ином случае, добавлять его в файл не нужно. | |
<include base="namedir">actualdir</include> | ||
With this, you can do something like #include "namedir/foo.h". | Как вариант, вы можете добавить что-то вроде #include "namedir/foo.h". | |
This statement is the same as a #define in your source code. Using this will make it a global for all files. | Этот оператор равнозначен #define в вашем исходном коде. Использование его делает возможным использование вашего заголовка для всех файлов. |
License: FDL

— для неё - программы? или для него - кода? склоняюсь к первому. — unxed
— Согласен :) — evilslon