Forum Replies Created
-
AuthorPosts
-
Unfortunately, without that flag, it exposed a known bug in the Windows API where it tries to use WinSock 1 even though it’s unneeded where MFC needs version 2 and refused to build. Release had no issues so it’s something on Microsoft’s end with the
_DEBUGflag and disabling everything extra and manually adding only the stuff we use was the only way to fix it (I hope, we’ll find out once I finish adding the headers and try to build it). Here are the details. It’s a bit of a mess. If it gets too frustrating, I may fast track ripping out the Windows API but I hope to do that later once the code quality has improved more.Where do we need to call
InitCommonControlsEx?Thanks, I’ll work on getting together the control categories in use 🙂
-
This reply was modified 2 months, 3 weeks ago by
Spastic Hamburger.
-
This reply was modified 2 months, 3 weeks ago by
Spastic Hamburger.
-
This reply was modified 2 months, 3 weeks ago by
Spastic Hamburger.
-
This reply was modified 2 months, 3 weeks ago by
Spastic Hamburger.
-
This reply was modified 2 months, 3 weeks ago by
Spastic Hamburger.
Looks like MinGW supports them in resource files. Not sure about standalone ones but referencing them in the resource file with
#include "winuser.h" // required for RT_MANIFEST constant CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "application.manifest"should be fine. Not sure which method I prefer but it looks like it’ll work regardless for cross-compiling. Not sure if we’ll want anything else in the manifest. Maybe the runtime version since we’re using the newest? On Linux, that’s handled by the package manager settings file
Still need to research
InitCommonControlsEx(const INITCOMMONCONTROLSEX *picce)and figure out how that works-
This reply was modified 2 months, 3 weeks ago by
Spastic Hamburger.
-
This reply was modified 2 months, 3 weeks ago by
Spastic Hamburger.
This could be a result of MFC updates over the years, where the old stuff was superseded by newer functions. Here’s a sample of what I’m looking at:
int CCustRichEdit::GetCurLineCharPos() { long StartChar; long EndChar; int CharPos; GetSel(StartChar, EndChar); CharPos = StartChar - LineIndex(-1); return CharPos; }GetSel() isn’t defined in MWEdit so it’s probably coming from MFC somewhere.
Edit: Looks like it’s coming from the parent class after all: https://learn.microsoft.com/en-us/cpp/mfc/reference/cricheditctrl-class?view=msvc-170#getsel
So I just missed it. That mystery has been solved.
CMake is supposed to have support for
.manifestfiles like it does for resource files so I’ll try adding the file to thetarget_sourcescommand first.stdafx.hwould be nice but it broke when I turned onWIN32_LEAN_AND_MEANfor some reason.
Failing CMake, we should be able to tell the CI to run the manifest embedding command. No idea how to useInitCommonControls()and its newer version (InitCommonControlsEx(const INITCOMMONCONTROLSEX *picce)) makes even less sense to me as they don’t provide examples but we’ll get there when we get there. Things may be different when we switch GUI toolkits but it doesn’t hurt to do the minor work needed to make the GUI look more pleasing in the time leading up to the GUI change 🙂The way the CMake script is being set up, it only worries about the
.rcand.manifestfiles on Windows and ignores them on other platforms so that won’t be an issue. The toolkit change will take care of the latter and we’ll need to come up with a solution for the former but we’ll get there!I could put the manifest bundling in an
MSVCcheck instead of aWIN32check so that it only tried to bundle it when VS is being used. MinGW supports resource files, not sure about manifest files. Will need to check on that.ui/cust_rich_edit.ccand its header will need to be reviewed at some point. There are some symbols that I was unable to properly track down, such asGetSel(), so I’m not entirely sure if I’ve got the correct header files. There may be a few that we don’t needAnother symbol in other files that is hard to track down is
POSITION. The difficulty comes from the fact that it’s such a generic symbol name. A search only turns upSetWindowPosition()instead.Additionally, I’m thinking about including tag files for the project to help with editors highlighting the symbols. It’d be nice to set that up on the CI end but I’m not sure how to do that just yet. Will add it to the research list.
And I’m going to try to add a manifest file to the project to see if I can get the GUI looking more modern as per this page once the debug build is working.
There are a few references to other shorts in there. The dog is a reference to one of the Marvin the Martian ones, for instance. It’s a lot of fun!
Ugh. And the AI response isn’t very helpful, either 😛
And had this come in the other day: https://phys.org/news/2026-02-reproduction-space-environment-hostile-human.html
Just one problem we’ll need to work out as we colonize space. One option would be setting up a station that spins very fast (small for safety reasons) just for reproduction purposes but that has its own problems
I really should use an actual compost bin. Instead, I just toss all of my biodegradables into a pile in the garden. All sorts of things sprout up from it. Though, most don’t survive long due to it not being the right environment. I’ve even had apple seeds sprout up in my coffee grounds 😛
May need to do some replanting next month. It all depends on how much I lost with the hard freeze over the weekend.
And 8k TVs can be added to the list: https://arstechnica.com/gadgets/2026/01/lg-joins-the-rest-of-the-world-accepts-that-people-dont-want-8k-tvs/
Not a big surprise, really. In order to even see the difference, one had to have a large viewing space and the TV had to be around 75-inches. Both of which were mighty impractical in a typical viewing space. 8k would have also required a lot of storage space for films, which would mean beefier streaming services or a new disc standard. That doesn’t even mention how large game files would need to be. With 4k, they’re already pushing 100 GBs.
Monitors are another matter entirely as it means more windows open and a larger workspace without losing detail.
We just finished having an extreme cold spell over here. Wind chill of below 10F! I loved it!
Not a clue. I don’t have any earbuds (can’t stand them and use headphones instead) so I can’t really test it. 😛
Better watch him in the garden! Don’t want him raiding the carrot patch!
And devakm just uploaded the code!
It looks like most of the ClassWizard notations in the files can be removed as it was just a marker for the GUI tool instead of something being done in the tool-chain? Not entirely sure but if so, that’ll help clean up the headers to be more readable.
Additionally, the custom string implementation in
common/string/sstring.hisn’t used much andCStringis used more predominantly so we may be able to mark it for removal. Ultimately, the plan is to replace the nonstandard string types withstd::stringbut that will take some time to retool the code to use the functions in the C++ standardStill need to update the tasks list from this thread more but I’d rather code than go through the thread and do that mindless work…. 😛
Adding the missing includes to the GUI files is coming along nicely and the code is becoming much more readable, as well 🙂
Also asked devakm about the TES4Gecko code 🙂
I’ll start by asking devakm about the original code. All that’s available publicly is the packaged JAR file.
AndalayBay still has some of the project files as they are currently working on a straight C# rewrite. No idea if they abandoned the previous attempts or not, though. As I recall, the Morrowind version wasn’t that far along but may still have something useful in it if we’re able to get permission. I’ll need to give that aspect some thought due to stuff in the past. In the meantime, I’ll talk to devakm 🙂
We may not need to actually run the code but time will tell. Don’t remember much about the tool-chain since I last worked with Java in 2010 (I switched to C++ as soon as I learned it) but I do remember that
javaccompiles the files and you run them withjava. Should be the same in OpenJDK.Spent the last few days watching old Addams Family reruns while recovering from the sinus issue. Was quite fun. It’s a shame the show didn’t go on longer as it had a lot of potential.
Also taking a break from Reincarnated as a Slime to watch How Not to Summon a Demon Lord. It’s another in the goofy anime genre that I really enjoy (Slime just wasn’t cutting it).
Probably should go back to watching old films and/or B-movies at some point but we’ll get there! Got a lot of good quality classics that I want to watch again, such as the Basil Rathbone Holmes films. Those were always enjoyable.
Okay, so we have permission to use TES4Gecko as inspiration for the algorithms with the only stipulation that we provide credit to Gecko for what we borrow. 🙂
Okay, started updating the includes for the UI stuff, which is where most of the missing stuff is. Some of them are a bit obscure but I’ve been adding each one individually. We’ve got things like this:
#include <afx.h> #include <afxdd_.h> #include <afxwin.h> #include <atlstr.h>Not exactly pretty and commenting them to explain what they’re for may be necessary as the names are a bit obscure.
Additionally, I’ve reached out to devakm regarding TES4Gecko. Since MWEdit will ultimately have a lot of feature overlap, I’ve asked them about the possibility of sharing information to reduce the need to come up with the same algorithms.
Doom now runs on an earbud: https://doombuds.com/
Ugh. BIOS issues like that are no fun. Definitely an odd one 🙁
Need to see The Thomas Crown Affair. Been on the list for years, just haven’t gotten there yet. Still reading a lot! 😛
But the Muppets are wonderful!
Been watching That Time I Got Reincarnated as a Slime. It’s not bad but I can’t seem to really get into it so I may move on soon
Wasn’t able to finish Date A Live: the mid-series OVAs weren’t dubbed and they cover critical aspects of the plot for the final season. 🙁
Yeah, it’s so big GitHub won’t load it. The MWEdit code is pretty crusty. 😛
In reality, most of those are memory alignment warnings in the Windows API. I think GCC ignores warnings in system includes by default (not sure, it’s been a while since I used it) and there may be a switch for VS to turn on.
The MFC stuff will be removed down the road when we make it system agnostic so explicitly defining them where they’re needed will also help with the porting 🙂
Sounds good. We can worry about the PCH stuff later on and focus on getting things working for now. GCC uses a different method than VS for PCH: you can simply have it compile the header files and then it’ll give them preference over the text-based headers without changing anything in the code.
Now that I’ve thought about it, I’m tired of making tiny commits for each file and then waiting several minutes for them to build. It also adds stress to my storage device, which isn’t good. So I’m going to go back to fixing up the includes now that we know that they are the problem. In the process, I’ll probably look at removing stdafx as well. Any objections?
Fixed the WinSock2 errors. Had to add
WIN32_LEAN_AND_MEANto the definitions in the build script. It didn’t work in the code but that may been due to include order (which is still being worked on). The build script will need some cleaning up at some point, more than likely. It’s already on the tracker 🙂Still working through getting the debug build working.
Edit:
We’re getting closer. There’s at least one error buried somewhere in the 25,000-line build log. Could do a search for it but, even then, it’ll be hard to spot among all of the warning noise.
Looks like it’s complaining about
mwedit/script_options.hnow when it was fine before. I added the necessary Windows includes but still no luck. It’s complaining about syntax errors but I’m not seeing them. It could be something with the macros. Any ideas? I may merge it into master and see what happens on a release build as it didn’t happen before debug builds were turned on and I started messing with the file paths. I’ll start by doing a direct comparison though that may fail due to the file name changes.Edit 2:
I was afraid of that. The diff fails between master and dev due to the changes to the file names. May do a test commit with release instead of debug on the dev branch or I may create a new branch so I don’t mess up master… :/
Test branch using Release config comes up with different errors: https://github.com/deathssoul/MWEdit/actions/runs/21091754553/job/60663963134
Weird. Going to start trying to sort through them. Not sure what’s going on here but it looks like we’re dealing with some Windows breakage. Could also be due to WIN32_LEAN_AND_MEAN. Whelp. Will add all of the missing includes it’s complaining about on Release and will go from there and hopefully Debug will get fixed in the meantime.
Maybe this is a good opportunity to go back to adding all of the missing includes?
Working on adding them. Previously, the project was set up in VS to implicitly add the stdafx.h file to each instead of explicitly so several files were missing it. Changing the project structure somehow triggered it crapping out without the explicit includes for some reason. Maybe due to how VS works, not sure. Normally, the compiler would crap out regardless. In any case, I’m going through and adding the missing Windows includes that are necessary for building on Release. Hopefully that’ll also fix Debug but we’ll revisit that once I get these issues fixed. We’ll be moving away from a stdafx.h file in favor of more explicit definitions so that we have a better handle on what’s going on and for better portability.
-
This reply was modified 2 months, 3 weeks ago by
-
AuthorPosts
