How to export resource IDs to file

Started by Shantanu Gadgil, July 06, 2006, 09:51:06 AM

Previous topic - Next topic

Shantanu Gadgil

Hi Ketil,
Any method of exporting the resource IDs to a file (like ResEd) and not only be able to send it to the output (CTRL+F11)?
To ret is human, to jmp divine!

KetilO

Hi

There is no way to auto export to file.
Easiest way to do it is right click in output window and use save as.

KetilO

Shantanu Gadgil

QuoteEasiest way to do it is right click in output window and use save as.
OK. Doing the same for now.  :(
Any plans of implementing the same anytime soon? Doing fine for now...just getting there takes more time, thats all.  :'(
To ret is human, to jmp divine!

Dawn

Hi Ketil,

I have been playing around with your RADASM for about a year now and find
it very useful.

One area I thought could use improvement was the export EQU's. Currently it
requires the user to manually select the function and then save the file in
the output window by right clicking and selecting the "save as" function.

It seems to me that it would be an easy improvement to this operation
to automatically export the equates just before every compile. The output
could be saved to a file called "exportedEQU.inc" and saved in the project
directory. The user could then include this file in his/her standard include
file.

This is currently the way I handle these equates, but of coarse I have to
do it manually.

I noticed alot of the sample code was written using raw numbers. So the author
did not know about the export EQU's function, just didn't bother using it or
it wasn't available at the time of writting.

Dawn.


donkey

This type of thing can easily be accomplished by creating an addin, all of the ID equates are in the RC files found in the \RES folder. They can be easily parsed by ignoring all lines that do not begin with #define (at least for GoAsm and MASM) and a space delimited line parsing algorithm.

Donkey
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

KetilO

Donkey is right. Creating an addin is the way to go.

KetilO

Dawn

I thought an addin would required an extra step in the complile process. :red

Shantanu Gadgil

Quotethought an addin would required an extra step in the complile process
Nah...The way the addin could (would/should ???  :lol :lol ) work would be whenever a "Compile resource" command is fired, it would run the "exporting to file" routine and then in our source code (some .asm file) we would be able to use the equ from the file where it has just been exported. (Whew!!!! Long explanation)

Regards,
Shantanu
To ret is human, to jmp divine!

donkey

Hi Dawn,

Though I don't have the time to write the addin, I would envision it like this...

    Execution
    • Available on the Properties menu for configuration and options
    • Add standalone "build exports" to the Make menu
    • An option to execute on build
    • Process AIM_MAKEBEGIN and AIM_MODULEBUILD to execute "build exports" if user has option set
    • Process AIM_COMMAND for manual bulds
      Build process
    • Step throughthe RAP file list of all RC files
    • Process each RC file in turn by copying the #define lines to a temp file (formatting as necessary)
    • Allow RadASM to continue the build process by returning NULL in eax
    "Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
    "It was just a dream, Bender. There's no such thing as two". -- Fry
    -- Futurama

    Donkey's Stable

    Dawn

    Hi donkey,

    I thought it would be a nice thing to have, since its so close already. The
    Export ID Equ's is already building everything into the format needed. I
    figure the people in the know could modify this process, with very little
    effort, to auto initiate and then just auto save the file as "exportedEQU.inc"
    before the compile process. I wasn't suggesting to re-write the whole
    procedure.

    Anyway it was just a thought.

    Thanks,

    Dawn.



    KetilO

    Hi all

    Here is the addin.
    Feel free to improve it, like reading filename from ini, make the output formatted in nice columns and optional on project level.

    KetilO

    [attachment deleted by admin]

    Dawn

    Hi ketil,

    I tried it, it works great.

    Thanks,

    Dawn.

    KetilO

    Hi all

    There is a new version of the addin uploaded with the 2210 bugtest.

    KetilO