The MASM Forum

Microsoft 64 bit MASM => Tools & Toys => Topic started by: jimg on January 07, 2020, 05:27:00 PM

Title: Resed
Post by: jimg on January 07, 2020, 05:27:00 PM
In case anyone's interested, the full source code is available here -https://sourceforge.net/p/fbedit/code/HEAD/tree/ResEd22 (https://sourceforge.net/p/fbedit/code/HEAD/tree/ResEd22)
In fact, all of Ketil's programs are available with source code here also.  Strangely it's all stored under FBEdit, the freebasic editor.
Title: Re: Resed
Post by: hutch-- on January 07, 2020, 06:43:04 PM
Thanks James, it looks like a RadAsm project, sad to say I don't have that set up so I can't build it.
Title: Re: Resed
Post by: jimg on January 08, 2020, 01:23:07 AM
Fortunately, RadAsm is right there too!

or


\Masm32\Bin\RC.EXE /v "ResEd.rc"
\Masm32\Bin\ML.EXE /c /coff /Cp /nologo /I"F:\Masm32\Include" "ResEd.asm"
\Masm32\Bin\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"F:\Masm32\Lib" /OUT:"..\ResEd.exe" "ResEd.obj" "ResEd.res"

Title: Re: Resed
Post by: hutch-- on January 08, 2020, 03:33:00 AM
Jim,

I read your post on SourceForge and it seems the complete version is not available. I have downloaded the snapshot then the RAResEd but it still will not build. I wonder if anyone has a complete source for the last version.
Title: Re: Resed
Post by: jimg on January 08, 2020, 06:00:45 AM
Strange, I just compiled it this morning before my post using the three lines I posted above.

Bear in mind you need to use the code in the ResEd folder, not in the RAResEd folder, though that may work too, I haven't tried it.
The code in the ResEd folder pulls code out of it's parent folder, so you need the full structure,   ResEd22 folder with the five sub folders.  Move into the sub folder ResEd and run the three lines I gave you above, it should work.   Note that it produces the exe into it's parent folder, not into the one with all the code.
Title: Re: Resed
Post by: jimg on January 08, 2020, 06:09:25 AM
I think I see the problem.   My first link should have been one folder higher.  You need the full ResEd22 folder not just the resed folder you would see from the link.

Just click on summary to get back to the main fbedit page, then click on code and you will see all of his programs.   Myself I just picked up the whole thing as one giant zip, and then I can pull out whichever program I want to use or work on at the time.
Title: Re: Resed
Post by: hutch-- on January 08, 2020, 10:53:47 AM
I downloaded the complete 64 meg snapshot, changed the ML version to 6.15, chased up a Debug.lib that it could not find and put it in a directory off the root RadASM, in a LIB directory, changed .486 to .686p and it builds, runs correctly and is the right size.
Title: Re: Resed
Post by: jimg on January 08, 2020, 11:44:10 AM
 :thumbsup:
Title: Re: Resed
Post by: zedd151 on October 10, 2022, 07:22:12 AM
I remembered seeing this once before but forgot about it. I'd like to change that resed always puts a name  when making controls and menu items and other things. I'd always have to remove that else manually edit it out in the .rc file.  :tongue:
Now I won't have to.  :biggrin:  I always refer to the ID #s in my code btw.
Title: Re: Resed
Post by: zedd151 on October 10, 2022, 04:01:10 PM
Well, turns out I had already downloaded the radasm snapshot already. I found it lurking in my archives. So, I proceeded to build resed. It went without a hitch--, hutch--....   :tongue:


Now removing the resource and menu name strings is another story. I'll leave that for when I have ample time to explore the resed code in more detail. Thank you KetilO for resed. Radasm is nice too, just not my cup of coffee.  :tongue:
Title: Re: Resed
Post by: zedd151 on October 11, 2022, 01:08:23 PM
btw, why is this in a 64 bit bored? "Microsoft 64 bit MASM»Tools & Toys". I just noticed that while editing the post above. :tongue:
I know I won't be converting resed to 64 bit any time soon. Any takers?
Title: Re: Resed
Post by: 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.
Title: Re: Resed
Post by: NoCforMe on October 11, 2022, 02:04:36 PM
Quote from: zedd151 on October 10, 2022, 04:01:10 PM
I'll leave that for when I have ample time to explore the resed code in more detail. Thank you KetilO for resed.

I agree, ResEd is a nice piece of work (and free to boot). I don't use it, but that's because I don't like having to invoke the resource editor for things like dialogs and menus.

But the code for that project? It's a friggin' nightmare. I know because I spent a long time looking through it a few years ago when I decided to implement my own dialog editor. I was able to extract what I needed (the code that displays the properties for dialog controls), but only after hours of excruciating analysis.

His code has no comments, extremely cryptic variable names and a bizarre structure. Sure, it's a testament to what you can do with code, but it sure as hell ain't no model for how anyone should write code if they want others to be able to use it (which I assume is the whole point of making your source code publicly available).
Title: Re: Resed
Post by: zedd151 on October 11, 2022, 02:25:32 PM
Quote from: hutch-- on October 11, 2022, 01:46:53 PM
As far as the IDC_whatever inclusions ....  its just additional clutter tha you don't need.
Thats why I endeavour to fix that one day, not any time soon though.
Title: Re: Resed
Post by: 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. I guess there was a reason at the time though.
Title: Re: Resed
Post by: jj2007 on October 11, 2022, 05:43:27 PM
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.

(http://www.jj2007.eu/pics/VersionInfo.png)
Title: Re: Resed
Post by: zedd151 on October 12, 2022, 12:18:09 AM
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:
Title: Re: Resed
Post by: zedd151 on October 12, 2022, 12:45:42 AM
I have sent KetilO a PM asking his thoughts on what I plan on doing.  :cool:
Title: Re: Resed
Post by: zedd151 on October 12, 2022, 07:22:45 AM
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.
Title: Re: Resed
Post by: hutch-- on November 04, 2022, 11:21:16 PM
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.
Title: Re: Resed
Post by: BugCatcher on November 05, 2022, 01:22:14 AM
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!
Title: Re: Resed
Post by: zedd151 on November 05, 2022, 03:04:48 AM
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:
Title: Re: Resed
Post by: zedd151 on June 30, 2023, 07:42:53 AM
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?
Title: Re: Resed
Post by: jj2007 on July 01, 2023, 01:32:00 AM
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.
Title: Re: Resed
Post by: 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:  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.
Title: Re: Resed
Post by: jj2007 on July 01, 2023, 01:58:37 AM
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.
Title: Re: Resed
Post by: sudoku on April 23, 2024, 02:03:47 PM
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.

Title: Re: Resed
Post by: sudoku on April 24, 2024, 06:20:14 AM
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 (https://masm32.com/board/index.php?topic=8279.0) )
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)