Hi all,
I think the *module* node needs two more attributes - *subsystem* and *windows* - because at present module type and module subsystem are merged in the *type* attribute and its values are a bit confusing to me; also cui/gui information is hidden into value names.
I don't know the rbuild code and I can't therefore say if it is an easy task splitting the logic behind the *type* attribute into tree attributes whitout affecting the whole program logic.
A short rationale follows.
___
Valid values for the *type* attribute should be: - library (static) - hal - driver - program - dll
Valid values for the *subsystem* attribute should be: - none - native - windows - posix - os2 - vms (default "windows"; "none" required for type "library"; "native" required for types "hal", "driver")
Valid values for the *windows* attribute should be: - no - yes (default "no"; "no" required for types "library", "hal", "driver")
___
Examples:
*ntdll.dll*
<module name="ntdll" type="dll" ...>
note that, at present, it is incorrectly described this way
<module name="ntdll" type="dll" subsystem="native" ...>
*ntoskrnl.exe*
<module name="ntoskrnl" type="program" subsystem="native" ...>
*atapi.sys*
<module name="atapi" type="driver" subsystem="native" ...>
Well, that's a 30+ hour change. It's not clear to me what problem you are trying to solve. If the meaning of the module types are not clear, we can rename them. If more module types are needed, we can add them.
Module types ------------ The module type determines the actions that is to be carried out to process the module. The defined module types are seen below: buildtool - Builds a tool that can be run (invoked) when building ReactOS. Default extension is .exe when building on Windows and nothing when building on Linux. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
staticlibrary - Builds a static library containing object files that can be linked together with other modules. Default extension is .a. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
objectlibrary - Builds object files that can be linked together with other modules. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. kernel - Builds ntoskrnl.exe. Default extension is .exe. Default entrypoint is _NtProcessStartup.
kernelmodedll - Builds a kernel-mode DLL. Default extension is .dll. Default entrypoint is _DriverEntry@8.
kernelmodedriver - Builds a kernel-mode driver. Default extension is .sys. Default entrypoint is _DriverEntry@8.
nativedll - Builds a native DLL. Default extension is .dll. Default entrypoint is _DllMainCRTStartup@12.
win32dll - Builds a Win32 DLL. Default extension is .dll. Default entrypoint is _DllMain@12.
win32cui - Builds a Win32 console executable. Default extension is .exe. Default entrypoint is _mainCRTStartup. The baseaddress module attribute is not applicable for this module type.
win32gui - Builds a Win32 GUI executable. Default extension is .exe. Default entrypoint is _WinMainCRTStartup. The baseaddress module attribute is not applicable for this module type.
bootloader - Builds a bootloader. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
bootsector - Builds one or more bootsector binaries. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
iso - Builds a bootable CD. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
test - Builds a testsuite. Default extension is .exe. Default entrypoint is _mainCRTStartup. The baseaddress module attribute is not applicable for this module type.
rpcserver - Generates and builds server code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
rpcclient - Generates and builds client code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
alias - Module is an alias for another module. This module type is the only module type for which the aliasof attribute is applicable. Only the module install functionality is aliased.
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Emanuele Aliberti Sent: 30. juli 2005 10:26 To: ReactOS Development List Subject: [ros-dev] rbuild: module attributes
Hi all,
I think the *module* node needs two more attributes - *subsystem* and *windows* - because at present module type and module subsystem are merged in the *type* attribute and its values are a bit confusing to me; also cui/gui information is hidden into value names.
I don't know the rbuild code and I can't therefore say if it is an easy task splitting the logic behind the *type* attribute into tree attributes whitout affecting the whole program logic.
A short rationale follows.
Valid values for the *type* attribute should be:
- library (static)
- hal
- driver
- program
- dll
Valid values for the *subsystem* attribute should be:
- none
- native
- windows
- posix
- os2
- vms
(default "windows"; "none" required for type "library"; "native" required for types "hal", "driver")
Valid values for the *windows* attribute should be:
- no
- yes
(default "no"; "no" required for types "library", "hal", "driver")
Examples:
*ntdll.dll*
<module name="ntdll" type="dll" ...>
note that, at present, it is incorrectly described this way
<module name="ntdll" type="dll" subsystem="native" ...>
*ntoskrnl.exe*
<module name="ntoskrnl" type="program" subsystem="native" ...>
*atapi.sys*
<module name="atapi" type="driver" subsystem="native" ...>
-- :Emanuele Aliberti
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Casper Hornstrup wrote:
Well, that's a 30+ hour change. It's not clear to me what problem you are trying to solve. If the meaning of the module types are not clear, we can rename them. If more module types are needed, we can add them.
Hi Casper,
I read the doc in full and converted it in Docbook for easily publishing on the web etc. Actually I missed the proper type for the module. I was going to give ntdll the type="win32dll" to make its subsystem WINDOWS_CUI, but linking fails with this error. Any idea why?
[LD] output-i386\lib\msvideo\msvfw32.dll [RSYM] output-i386\lib\msvideo\msvfw32.dll [LD] output-i386\lib\netapi32\netapi32.dll [RSYM] output-i386\lib\netapi32\netapi32.dll [LD] output-i386\lib\ntdll\ntdll.dll obj-i386\lib\ntdll\main\dllmain.o: In function `DllMainCRTStartup': E:/src/ros/trunk/reactos/lib/ntdll/main/dllmain.c:17: multiple definition of `DllMainCRTStartup@12' D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../dllcrt2.o:dllcrt1.c:(.text+0x0): first defined here D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/libgcc.a(__main.o):: undefined reference to `__EH_FRAME_BEGIN__' D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/libgcc.a(__main.o):: undefined reference to `__EH_FRAME_BEGIN__' collect2: ld returned 1 exit status make: *** [output-i386\lib\ntdll\ntdll.dll] Error 1
E:\src\ros\trunk\reactos>
May it be that type="win32dll" means DLL + WINDOWS_GUI?
Emanuele Aliberti wrote:
Hi Casper,
I read the doc in full and converted it in Docbook for easily publishing on the web etc. Actually I missed the proper type for the module. I was going to give ntdll the type="win32dll" to make its subsystem WINDOWS_CUI, but linking fails with this error. Any idea why?
[LD] output-i386\lib\msvideo\msvfw32.dll [RSYM] output-i386\lib\msvideo\msvfw32.dll [LD] output-i386\lib\netapi32\netapi32.dll [RSYM] output-i386\lib\netapi32\netapi32.dll [LD] output-i386\lib\ntdll\ntdll.dll obj-i386\lib\ntdll\main\dllmain.o: In function `DllMainCRTStartup': E:/src/ros/trunk/reactos/lib/ntdll/main/dllmain.c:17: multiple definition of `DllMainCRTStartup@12' D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../dllcrt2.o:dllcrt1.c:(.text+0x0): first defined here D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/libgcc.a(__main.o):: undefined reference to `__EH_FRAME_BEGIN__' D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/libgcc.a(__main.o):: undefined reference to `__EH_FRAME_BEGIN__' collect2: ld returned 1 exit status make: *** [output-i386\lib\ntdll\ntdll.dll] Error 1
E:\src\ros\trunk\reactos>
Maybe gcc needs -nostartfiles or something.
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Emanuele Aliberti Sent: 30. juli 2005 19:02 To: ReactOS Development List Subject: Re: [ros-dev] rbuild: module attributes
Casper Hornstrup wrote:
Well, that's a 30+ hour change. It's not clear to me what problem you are trying to solve. If the meaning of the module types are not clear, we can rename them. If more module types are needed, we can add them.
Hi Casper,
I read the doc in full and converted it in Docbook for easily publishing on the web etc. Actually I missed the proper type for the module. I was going to give ntdll the type="win32dll" to make its subsystem WINDOWS_CUI, but linking fails with this error. Any idea why?
[LD] output-i386\lib\msvideo\msvfw32.dll [RSYM] output-i386\lib\msvideo\msvfw32.dll [LD] output-i386\lib\netapi32\netapi32.dll [RSYM] output-i386\lib\netapi32\netapi32.dll [LD] output-i386\lib\ntdll\ntdll.dll obj-i386\lib\ntdll\main\dllmain.o: In function `DllMainCRTStartup': E:/src/ros/trunk/reactos/lib/ntdll/main/dllmain.c:17: multiple definition of `DllMainCRTStartup@12' D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../dllcrt2.o:dllcrt1.c:(.text+0x0): first defined here D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/libgcc.a(__main.o):: undefined reference to `__EH_FRAME_BEGIN__' D:/App/mingw/bin/../lib/gcc/mingw32/3.4.2/libgcc.a(__main.o):: undefined reference to `__EH_FRAME_BEGIN__' collect2: ld returned 1 exit status make: *** [output-i386\lib\ntdll\ntdll.dll] Error 1
E:\src\ros\trunk\reactos>
-- :Emanuele Aliberti
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev