News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Resed

Started by jimg, January 07, 2020, 05:27:00 PM

Previous topic - Next topic

jj2007

Quote from: hutch-- on October 11, 2022, 01:46:53 PM
As far as the IDC_whatever inclusions, I just ignore them and use the resource IDs. Rather than a theory of rememberable names, I prefer rememberable numbers and don't have to write a file of equates to use them. The names were a leftover of old C programming but from an assembler perspective, its just additional clutter tha you don't need.

Quote from: zedd151 on October 11, 2022, 03:13:09 PM
As far as resed source code goes, I don't understand why radasm projects (.rap file) needs several resource (.rc) files. And none of them named "rsrc.rc", makes building them a pain if you don't have radasm installed, since there is no batch file either.

What I dislike most when somebody posts a RadAsm project here: that every single bit of information is split all over the place in a dozen tiny little files. I believe in one single project file (as long as I'm not going well beyond 20k LOC).

Resources, for example, have their place at the end of my sources. I hit Ctrl End and modify the menu, or as in the example below, my version info (above you see purest Masm32 SDK code btw). No need to open another file with another editor.


zedd151

#16
Whoops. I modified the original post here when I meant to quote it in a new reply. Lost the original content in the process.  :toothy:

zedd151

I have sent KetilO a PM asking his thoughts on what I plan on doing.  :cool:

zedd151

Quote from: zedd151 on October 12, 2022, 12:45:42 AM
I have sent KetilO a PM asking his thoughts on what I plan on doing.
He just replied, telling me in essence that it's fair game.  :biggrin:
If/when I do decide to work on resed, I'll be sure to post it.

hutch--

Resed and RadAsm are different animals, some swear by RadAsm but Resed is directly usable as a resource editor and once you are used to it, its a very good resource editor.

BugCatcher

I use Radasm 3 for 32 and 64 bit. The soure code is a great learning tool on the creation of windows api. ketilo thanks!

zedd151

Quote from: hutch-- on November 04, 2022, 11:21:16 PMResed is directly usable as a resource editor and once you are used to it, its a very good resource editor.
Yes indeed. It is one of the few programs that I have in each and every one of my os backups.  :biggrin:

zedd151

QuoteIf I ever get around to working on resed source code (for removing the control name equates), I will also look into making it (the source code) more user friendly for MASM users that don't have the RadAsm IDE on their computer.
I just this afternoon installed RadAsm 2.2.2.0 as well as the source code for ResEd... In my spare time, I will take a serious look at the source code for resed. I plan in converting it to a more masm32 friendly source code as well as work on getting the resources used all into a single .rc file named appropriately rsrc.rc. (basically down converting from a .rap project)  apologies to KetilO.  :cool:
In due time, I will update my progress in a seperate topic.  :biggrin:   (if things go well, that is)
edit =
Later after I chewed on this idea for a bit:
I will first remove automatic insertion of control ID equates, leaving the format and .rap project intact.
Next I would add the option to use or not those equates. Since I have radasm installed why not?

jj2007

Quote from: zedd151 on October 11, 2022, 03:13:09 PMI don't understand why radasm projects (.rap file) needs several resource (.rc) files. And none of them named "rsrc.rc"

It's probably a matter of taste. My batch files look for one rc file named [sourcename].rc, and only if it can't find that one, it will look for rsrc.rc. Thus I can have multiple sources in the same folder.

zedd151

Quote from: jj2007 on July 01, 2023, 01:32:00 AM
Thus I can have multiple sources in the same folder.
Do you mean all those teeny tiny files all over the place?  :tongue:  jk
I have pondered playing with resed for quite a while. After looking through the source code, I may just change there what I want for myself and leave the rest as-is. If I ever get to it that is.
edit:I don't want to mess up an otherwise good program. It does what it does well, even though some of what it does is not really necessary. So I will leave it alone for now... Maybe one day, I will take another look at it.

jj2007

Quote from: zedd151 on July 01, 2023, 01:36:57 AM
Quote from: jj2007 on July 01, 2023, 01:32:00 AM
Thus I can have multiple sources in the same folder.

Do you mean all those teeny tiny files all over the place?  :tongue:

No, that's not me :tongue:

Perhaps I should have written "multiple projects in the same folder". If you find this at the end of one of my sources...
Rsrc
#include "resource.h"
01 RT_MANIFEST "\\Masm32\\MasmBasic\\Res\\XpManifest.xml"
Rsrc


... it means that even the resource file is embedded in the main source. I hate switching to another editor instance, inter alia because, if you embed the resources, searching for e.g. ID_BUTTON1 is easier: it's all in one file. Most of my projects consist of one file. Even the RichMasm source (24.6 kLines) doesn't have a separate rc file.

Which points to one observation: ResEd is not so much about creating and using resource files, it's about visualising the buttons and controls - a function that I rarely use.

sudoku

Quote from: zedd151 on October 12, 2022, 07:22:45 AM
Quote from: zedd151 on October 12, 2022, 12:45:42 AMI have sent KetilO a PM asking his thoughts on what I plan on doing.
He just replied, telling me in essence that it's fair game.  :biggrin:
If/when I do decide to work on resed, I'll be sure to post it.
I just installed RadAsm once again, and successfully assembled resed.exe using its '.rap' file. (RadAsm Project file)

There are a couple of issues that I would like to address...
The first one being that resed, in its current state, uses forward slashes in the #include file path in the saved resource files.

There are a couple more things about this otherwise fine tool that have irritated me for as long as I can remember. Like the automatic insertion of resource ID name equate prefixes. Argghh! I'd like to use my own name and possibly prefix, without having to manually adjust the .rc file. (This isn't C code, no need to follow C conventions)

And the lower limit of 3 (dialog units) in the dialog editor for placing and sizing controls. I would like 1 or 2.

If I successfully make those changes, I will post the revised project. (At least the file where the changes were made)  :smiley:

I will work on this when time permits.
Another thing I would like to do is make a proper batch file to assemble the conglomeration of files, into the program without relying on the .'rap' file, or RadAsm.

It's kind of a mess in the project folder, and the files for resed are intertwined with the RadAsm files...seem to be some dependencies there.

:azn:

sudoku

#27
I have successfully removed the .rap file and changed all of the paths, to either use \masm32\xxxx or within the project folder itself.
There is somewhere in there that there is a path "..\lib\xxxx" which I cannot locate the origin of. So I have two lib folders, one in the project folder and one, just above it.

Now it assembles (links, etc) with a simple batch file. RadAsm no longer necessary to easily build it.

I can post it (attach) here if anyone is interested
Well maybe not in this board, it is a 32 program after all.  :cool:

The original sources (along with many others by ketil0 are linked HERE )
But you will have to unravel all the paths and gather the necessary files yourself in that case.  :smiley:

Not so fast... after removing radasm from my computer, I find that there is still a hidden dependancy on radasm. I will try to find and remove it. 
I am going to keep RadAsm installed. Makes it much easier to tweak ResEd, rather than jumping through proverbial hoops to build it. I will re investigate this at a later time. (Liberating ResEd from RadAsm dependencies)
:azn:

sudoku

Found out a bit more about the backslash versus forward slash...
(An issue with resed is that it changes paths in the .rc file to use forward slashes as path delimiters, even though back slashes were there originally)

https://stackoverflow.com/questions/16474742/which-path-format-to-use-in-c-on-windows-d-source-txt-or-d-source-txt
So it is indeed a "C" language thing... (using forward slashes in paths)

I have looked through the code and changed all occurrences of "/" to "\" in resed's source files, especially where the code explicitly seems to replace back slashes with forward slashes. Still the issue persists. Will do a more rigorous inspection of the sources at another time, as I may have missed something during the first analysis of the code. Better still, I will run resed in ollydbg and save an .rc file, to see where the buffer storing the path string changes from using "\" to "/"... I had not done that, in the first round. I have another idea to use as a last resort... I will make a posting if I do have to go that route.
:azn: