MWEdit

Home Forums Projects MWEdit

Viewing 9 posts - 181 through 189 (of 189 total)
  • Author
    Posts
  • #4629
    DeVaultSetter
    Keymaster

      Yeah, guessing that’s what the library machine type 'x86' conflicts with target machine type 'x64' warnings are on about. It would be easy to check that in the vcxproj files for Windows projects, unlikely they would have built it with anything other than cmake though.
      Couple of threads of interest, Hello, there is no 64-bit Debug version under the window and Best DevIL version to use? Should ReSIL be used over DevIL?

      #4631

      Meson has some form of compatibility with CMake but I haven’t looked into it yet.

      Yeah, that’s due to the libraries being 32-bit while the rest is 64-bit. You can use 32-bit code in 64-bit programs but it can have issues if one isn’t careful. It’s generally best to use the same architecture 🙂

      I’m leaning towards ResIL myself as DevIL is no longer being maintained. Generally best to go with something with active development in my opinion 🙂

      Haven’t heard back from the Meson devs or NimrodPSI yet so I may start working on a basic CMake script soon to see if that works before we start trying other stuff.

      Edit:

      Looks like C++23 has better Unicode support so we may want to update the standard (or https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html#prop_tgt:CXX_STANDARD) once we get things working under C++20.

      Looking over the CMake reference manual again now…..

      #4642

      Okay, I just finished setting up a basic CMake script: https://github.com/Walrus-Tech/MWEdit/pull/35

      Are you able to test it? I haven’t set up the CI yet for CMake, I’m looking into the command-line commands now.

      It is based off the Meson branch as it needs the source changes. It’s nothing fancy and doesn’t add the extra CMake options that I would like to use such as PIE; Windows conditionals; or messages, this is simply to test things to see if CMake works where Meson failed.

      Edit:

      Still tweaking things. Had to set some more CMake settings in the CMake script. Looks like it’s going now. Will find out what happens in a few minutes.

      Edit 2:

      Still working through re-learning things. If the latest CI build fails, I’ll go back to it tomorrow.

      #4645

      Still crapping out on DevIL so it’s the project, not Meson. I’ll take a closer look at the provided project file when I get the opportunity to see if I can figure out why it works but will plan on decoupling the bundled version if nothing stands out

      Once we get things working, we can decide on a final build system 🙂

      #4647
      DeVaultSetter
      Keymaster

        Looks good! Haven’t got things set up yet, sorry. Syntax-wise it certainly looks sturdy enough, if need be there’s always CMake: How to Unit-Test your own CMake Script Macros/Functions?.

        Aah, you mean the DevIL component is impacting on the issue with Meson? If so, might be an idea to update it, hopefully with new insights from the current config. 🙂

        Is there any chance of decoupling DevIL entirely and pointing the referenced functions to the new ResIL source with minimal drama?

        #4648

        No worries! Whenever you get things set up is fine 🙂

        Figured the CI stuff out: they changed how you use CMake from the command-line since I last used it. So the CI has been updated 🙂

        I think that’s a different issue. The bug looked to be an obscure parser bug that was occurring regularly but then disappeared randomly. Meson was complaining about not being able to run Ninja and to use Ninja instead before it even got to the build step.

        Yep, we’d just need to update the build script to point to the end result and then set up building the libraries separately. Sadly, the BOSS build docs are incomplete in that regard (I never got around to updating them for CMake) but we should be able to borrow the general idea from other projects. I’ve been using LOOT as a reference point as I was deeply involved with it in the early days so a lot of the build setup closely resembles what BOSS uses

        BOSS used a library subdirectory but I’m not sure if that’s still the best way to handle it. Definitely need to look around to see how others do it

        #4654

        Got the MFC stuff added to CMake locally. At least, I think it’s done. It’ll be in the next push. 🙂

        Now to work on a plan for the image library.

        Edit:

        Build instructions are a little sparse and the DevIL directory tree is weird, which may complicate things. ResIL also lacks build instructions and the directory structure is better but still weird: it just removes a couple of folder levels but has stuff named src-IL/src etc when we use it with IL/. The installation script may fix that, though. Going to take a few days to read through everything and see if I can figure it out.

        Quite a few dependencies: https://github.com/DentonW/DevIL/blob/master/DevIL/Libraries.txt

        Don’t see a similar list for ResIL but I do see bundled directories: https://sourceforge.net/p/resil/code/ci/master/tree/Input_Libs/

        Not sure if that’s the same thing. They don’t cover all of the dependencies, though.

        Edit 2:

        CMake has a module to help link with DevIL but we’d still need to set things up first and build it. Other option is to set CMake to download and unpack the binaries on its own (assuming they’re provided, haven’t looked at the packages yet) and then use the module to link everything together. As we know, Windows is a bit more cumbersome for development than *nix setups 🙂

        #4659
        DeVaultSetter
        Keymaster

          Ah, okay, and the lack of responses to this ResIL issue are a bit of a worry as well. Those input_Libs look good even they are all in C – seems the same with the DevIL sources.
          Sounds good, go with including the DevIL code modules rather than compiled DLLs looks to be a better option, although a C++ version of everything would be a plus. 🙂
          The link for sources is broken:
          http://openil.sourceforge.net/libs/LibSrc.zip
          There’s bound to be usable and more up-to-date C++ sources for all those somewhere, but where?
          Been looking at whether to get VS or VSC for Morrowind – see:
          https://stackoverflow.com/questions/30527522/what-are-the-differences-between-visual-studio-code-and-visual-studio
          For the sheer size of Morrowind it has to be VS no? Are you running that on Windows Server?
          Edit: Going with VS of course! MFC, SDK, MSVC and especially CLang use a fair bit of space – some way of leaving any of them out?

          • This reply was modified 12 hours, 5 minutes ago by DeVaultSetter.
          #4661

          VS with the usual SDKs (make sure you grab the C++20 runtime as that’s what we’re targeting right now but may switch to C++23 later) with the optional MFC package, along with Git so you don’t need to keep grabbing the tarballs and CMake (at least initially). From my investigating, MFC is the only optional Windows component in use. Visual Studio Code doesn’t provide the full development stack needed.

          I would recommend using MSVC instead of clang as the current setup relies on MSVC built packages, which can’t link to clang binaries due to a different ABI. All this will change, of course, when we switch to a cross platform UI toolkit (and sort out the image library) and then you should be able to use whatever you want. 🙂

          DevIL is provided in the repos over here on Linux but not ResIL so manual builds will be required for ResIL use on Linux. I’m leaning towards DevIL, at least initially, to make debugging easier if the files needed are in the download. Later on, after we get it working, we can look at switching to ResIL

          Do these work: https://openil.sourceforge.net/download.php ?

          Will also need to see if they can be acquired via the command line. If not, we’ll need to do some more thinking

          Yep, the CI is running MSVC through CMake at the moment. Before the build script, it was using MSBuild. 🙂

        Viewing 9 posts - 181 through 189 (of 189 total)
        • You must be logged in to reply to this topic.

        Home Forums Projects MWEdit