Forgot to attach autogenerated sample files
_____
From: Marc Piulachs [mailto:marc.piulachs@codexchange.net]
Sent: Friday, November 09, 2007 7:24 PM
To: 'ReactOS Development List'
Subject: rbuild auto generated resources
>From all changes introduced on my rbuild branch auto generated resources
seems to be the most controversial by far so I will try to explain here the
design decision behind it
One of my particular obsessions is trying to optimize and automate the
maxium ammout of things, if something can be reasonably created
automatically why do it by hand?
CURRENT SITUATION
=================
Currently the version common defines REACTOS_STR_FILE_DESCRIPTION ,
REACTOS_STR_INTERNAL_NAME and REACTOS_STR_ORIGINAL_FILENAME , localized
resources and theme manifest are added to [modulename].rc , rsrc.rc or
splitted between both.
Problems:
- Theme manifests files "manifest.xml" are architecture
dependent (X86)
- Duplicated content, we will have hundreds of identical
manifest files for every aplication
- No way to compile an aplication without manifest
- No way to compile an aplication with only specified
localizations
- Duplicated work, rbuild has all the information required to
automatically generate the defines
- If we decide to rename or introduce a new define in the future
we will have to edit all resources by hand.
- Resource localizations are compiled with any control , the
only way to check if they are included is by hand.
Advantatges to my proposal:
- It solve all the above problems.
- Reduce man work
- Allows future changes in the format (editing the resource
generator source code (1 file) vs all resources files on SVN)
- It's the base to other future enchancments , when a new
feature is added to rbuild we have just to modify it and all modules will
automatically inherit it.
An most important of all , it represents a change of the model to a metadata
oriented build process. You describe the content (source code , resources
...) rather than the build , rbuild uses that information to generate the
apropiate image (as always) but this information can also be used for
multiple other things, analitics , reports , web ....
How does it work?
=================
First of all IT'S OPTIONAL , you can decide to use it or not, your choice.
We will use the eventvwr.rbuild as sample:
<?xml version="1.0"?>
<module name="eventvwr" type="win32gui" installbase="system32"
installname="eventvwr.exe">
<include base="eventvwr">.</include>
<include base="eventvwr" root="intermediate">.</include>
...
<!-- Auto generated stuff -->
<automanifest>manifest.xml</automanifest>
<autoresource>auto.rc</autoresource>
<!-- Authors -->
<developer>mpiulachs</developer>
<translator>cfinck</translator>
<translator>fireball</translator>
<translator>mpiulachs</translator>
<metadata description="ReactOS Event Log Viewer" />
<!-- Avialable localizations for this module -->
<localization isoname="de-DE">lang/de-DE.rc</localization>
<localization isoname="en-US">lang/en-US.rc</localization>
<localization isoname="es-ES">lang/es-ES.rc</localization>
<localization isoname="fr-FR">lang/fr-FR.rc</localization>
<localization isoname="ru-RU">lang/ru-RU.rc</localization>
</module>
to turn auto resources on we have to add the <autoresource> element with the
name of the resource that will be created in the INTERMEDIATE folder in this
case it will be named "auto.rc".
It will also automatically create the apropiate manifest.xml file for the
architecture being build (x86 or PPC) and will reference it in "auto.rc"
Also it will validate and include the localizations, even it has
localizations for 5 languages it will only compile those specified on
languages.rbuild
See attached files for autogenerated content
I tried to explain the motivation behind my changes and why I think they are
positive , of course I'm open to your questions , ideas or comments but
please be contructive and argument your point of view , "I don't like it ,
we won't use it" as someone said is not an expected opinion.
/Marc
As most of you know, Casper created a small tool rgenstat (tools/rgenstat)
that is able to parse source code for modules specified on apistatus.lst
seeking for public APIs decorated with the @implemented or @unimplemented C
comment. Rgenstat when invoked typing "make rgenstat" it produces an xml
file containing all the functions and it's current implementation status.
With this database we can do all sorts of automatic compatibility reports .
see for example wine's equivalent http://www.winehq.org/site/status or
http://www.codexchange.net/roslib generated from incomplete reactos data ,
(work in progress)
As it easy and not intrusive I would suggest using this feature to kernel
and core developers. Fireball , GreatLord , Jim , what do you think about
that ?
/Marc
Hi,
Here is a list of files that use ntuser/object.c
As you all see, we Dereference more than we Reference! Reference is 0 so we are
using Dereference as a delete? This is a mess! Not once is a Thread referenced!
Thanks,
James
./callproc.c:52: ObmDeleteObject(Handle,
./hook.c:209: ObmDeleteObject(Hook->Self, otHook);
./cursoricon.c:413: ObmDeleteObject(hCurIcon, otCursorIcon);
./cursoricon.c:487: Ret = ObmDeleteObject(CurIcon->Self, otCursorIcon);
./menu.c:320: ObmDeleteObject(Menu->MenuInfo.Self, otMenu);
./window.c:433: ObmDeleteObject(Window->hSelf, otWindow);
./accelerator.c:365: ObmDeleteObject(hAccel, otAccel);
./accelerator.c:374: ObmDeleteObject(hAccel, otAccel);
./accelerator.c:414: ObmDeleteObject(hAccel, otAccel);
./callproc.c:64: NewCallProc = (PCALLPROC)ObmCreateObject(gHandleTable,
./callproc.c:88: NewCallProc = (PCALLPROC)ObmCreateObject(gHandleTable,
./hook.c:113: Hook = ObmCreateObject(gHandleTable, &Handle, otHook,
sizeof(HOOK));
./monitor.c:92: Monitor = ObmCreateObject(gHandleTable, &Handle,
otMonitor, sizeof (MONITOR_OBJECT));
./cursoricon.c:399: CurIcon = ObmCreateObject(gHandleTable,
&hCurIcon, otCursorIcon, sizeof(CURICON_OBJECT));
./menu.c:333: Menu = (PMENU_OBJECT)ObmCreateObject(
./menu.c:442: Menu = (PMENU_OBJECT)ObmCreateObject(
./window.c:1537: ObmCreateObject(gHandleTable, (PHANDLE)&hWnd,
./accelerator.c:351: Accel = ObmCreateObject(gHandleTable,
(PHANDLE)&hAccel, otAccel, sizeof(ACCELERATOR_TABLE));
./input.c:1045: ObmDereferenceObject(DesktopWindow);
./msgqueue.c:776: ObmDereferenceObject(Window);
./hook.c:449: ObmDereferenceObject(HookObj);
./hook.c:455: ObmDereferenceObject(HookObj);
./hook.c:624: ObmDereferenceObject(Hook);
./hook.c:639: ObmDereferenceObject(Hook);
./hook.c:656: ObmDereferenceObject(Hook);
./hook.c:673: ObmDereferenceObject(Hook);
./hook.c:738: ObmDereferenceObject(HookObj);
./monitor.c:119: ObmDereferenceObject(pMonitor);
./cursoricon.c:375:// ObmDereferenceObject(CurIcon);
./cursoricon.c:386:// ObmDereferenceObject(CurIcon);
./cursoricon.c:414: ObmDereferenceObject(CurIcon);
./cursoricon.c:420: ObmDereferenceObject(CurIcon);
./cursoricon.c:532:// ObmDereferenceObject(Object);
./cursoricon.c:369:// ObmReferenceObject( CurIcon);
./cursoricon.c:519:// ObmReferenceObject(CurIcon);
jimtabor wrote:
>I noticed WndProc messages originate from win32k too. The window
thread is
>locked and then the message is sent out.
>
>Example: Function call User32 -> Win32k -> send message.
>
>Maybe we are doing double the work when we scroll on a bar. The rapid
>blinking of the bar too. We maybe sending more than one message out.
Trying a hypothesis here, could it work if all such w32k-registered-
and-managed window classes, if not subclassed by the app, lock visual
updates while calling back into usermode (cmp. LockWindowUpdate(hWnd)
)?
(recursive calls, whether intentional or from buggy user-mode app code
could invalidate it)
>4. Fix bugs.
>5. Get paid!
If you solve that... :-)
--
Mike
>
>
> - Declarative module localizations : Now module localizations are created
> in
> a declarative way which makes trivial tasks like listing non existent or
> outdated language localizations in real time for example :
>
> http://www.codexchange.net/rosdoc/localizations.htm
>
> Let me know your opinions and suggestions as I would like to start
> finishing
> some of this features and merge all/part of my changes back to trunk
>
I find this part extremely important. It would allow real-time tracking of
translation progress/status (if i understood it correctly) which would
greatly help maintain all the growing ROS localizations and help all ROS
translating teams. Such webpage, as you presented here, should be created on
ROS website as soon as it would be possible.
Hello everyone,
I just would like talk about a recent fix applied to one of the components of ReactOS.
It is not my intention to make problems in any way with this topic, or pretending a change of the direction taken by the project (peace!).
In that recent change, the hybrid support for both ASCII and UNICODE support into task manager has been dropped.
I would like that you try to review your opinion on such changes.
Me too, I want final builds of executables in unicode format.
I think to know almost all advantages of international support.
However, I also believe that you should not see the ASCII support as something to throw out of the window, but as a chance, because not all applications in the world are compiled as unicode, so having something to test the ASCII implementation included into ROS is not a so bad idea.
As I said, it is a chance for testing.
Some of the work here seems derived from wine, but probably (or better: surely) people behind wine had to face to the problem called "debugging" before they got something stable.
A closed-source application may not work, but at least there is a chance (perhaps minimal or even less) to replicate a bug into one of the applications available to us.
Technically, it isn't a problem for me to make things working on win9x, since I just need to link to UNICOWS.DLL and the problem is almost solved.
I just don't like very much that position.
And I also understand that my opinion isn't important at all in front of your decisions or the ReactOS standard.
Sincerely,
Carlo Bramini.
I have no idea on what is being prepared or planned, nor i do not need any
mean for translating RC files online. My only concern is for easier control
of localisation for a given language, so i dont have to manually check every
single one of the rc files.
Best regards
To all!
A monumental mile stone was crossed today at 2000z 05/11/2007.
ReactOS is now a true GUI/OS. Thread batching is functional and tested good.
Solitaire was the program and it only ran once, the function was SetBrushOrgEx.
Thanks goes out to all of you and my excitement is the fun I am having working
with all of you with this project. Sorry for things said in the past and knowing
in all good intentions you all did your best to bring this project to this point.
Thanks!
James
PS: Keep coding! and go back to work!
As some of you may know I have been working in rbuild on my own branch
(http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/) for the last
two weeks.
I will summarize my most important changes here so anyone can give me their
opinion:
- Created a new concept "the cd bootstrap folder" . The cd bootstrap folder
is a user customizable folder in the cd's root that defaults to the current
build architecture for example i386 o ppc.
- Modifed the InstallBase from the BootStrap element to be relative to the
bootstrap folder, for example the usetup
bootstrap:
<bootstrap installbase="system32" nameoncd="smss.exe" />
will be created in :
(CD)\i386\system32\smss.exe on a I386 build and
(CD)\ppc\system32\smss.exe on a powerpc build
- Introduced a new element "bootstrapfile" equivalent to the bootstrap for
module target but applied to regular files for
example :
<bootstrapfile>hivecls.inf</bootstrapfile>
will be placed in :
(CD)\i386\hivecls.inf on a I386 build and
(CD)\ppc\hivecls.inf on a powerpc build
With these changes we will be able to place complete installation for more
than one architecture in the same cd .Only one of the architectures will be
able to
be booted by default but we can include the cdmake utility + some .bat files
in a (CD)\tools folder so the user can download the official CD with all
supported architectures and create a bootable boot CD for a particular
architecture. cool huh?
- Experimental support to autogenerate rsrc.rc equivalent and platform
dependent manifest.xml to intermediate folder
- Add preliminary support to track
authors/contributors/developers/translators for each module. It can be
useful to autogenerate uptodate \CREDITS file , module/authors reports (see
for example: http://www.codexchange.net/rosdoc/authors.htm or
http://www.codexchange.net/rosdoc/eventvwr.htm) or even source code for
modules like notevil
- Autogenerate CREDITS file in intermediate folder (for now)
- Declarative module localizations : Now module localizations are created in
a declarative way which makes trivial tasks like listing non existent or
outdated language localizations in real time for example :
http://www.codexchange.net/rosdoc/localizations.htm
Let me know your opinions and suggestions as I would like to start finishing
some of this features and merge all/part of my changes back to trunk
note: The produced iso images won't boot due to relocation of the \loader
folder. boot/freeldr/bootsect/isoboot.asm and isobtrt.asm will have to be
modified to search \i386\loader .Probably also setuldr.sys will have to be
modified.
/Marc
On Oct 28, 2007, at 5:13 PM, gbrunmar(a)svn.reactos.org wrote:
> - DPRINT("CreateNamedPipeW() done\n");
> + DPRINT1("CreateNamedPipeW(%S) done\n", NtControlPipeName);
Success reports should usually remain DPRINT, so that they don't
pollute the debug log.
WBR,
Aleksey Bragin.