flamerobin icon indicating copy to clipboard operation
flamerobin copied to clipboard

Build System(s) are a Mess

Open blumf opened this issue 4 years ago • 6 comments

Looking at ditching the Boost dependency, and the code part is easy, but changing the various build systems we have is a real PITA.

Theoretically, we just use the bake file, but that it out of date, both in format (current Bakefile uses a different file format, legacy doesn't support recent IDEs) and content (the flamerobin.bkl file is missing some recent source files)

So, rather than trying to repair that, does anyone want to look at my CMakeLists.txt file?

I've tested it on Windows (VS2019) and Linux (Slackware 14.2). It calls the update-revision-info script, builds, and sets up the *-templates directories ready for debugging. All that's missing is the install commands (for Linux, i.e. make install)

Special feature, for Windows devs, is you can directly specify the wxWidgets root (WXDIR) which makes it easier to try different wx versions on the same machine (it should check the WXDIR environment var too, but untested)

Quick guide for Win/Visual Studio use:

  • Grab CMake from https://cmake.org/download/ (I recommend adding it to PATH)
  • Place the CMakeLists.txt in the root of the FlameRobin (where all the other project file currently exist)
  • Create a sub-dir 'build' (can be any name, like 'build-wx302-64bit', but 'build' for now)
  • Run the CMake GUI
  • Point 'Where is the source code' to the FlameRobin root
  • Point 'Where to build the binaries' to the 'build' sub-dir
  • Click 'Add Entry' (button to the right of window)
    • Give it the name WXDIR
    • Set Type to PATH
    • Select the root of your wxWidgets library
  • Now click 'Generate'
  • Select your Visual Studio version, and platform type (x86)
  • If that all worked without issue, you can click 'Open Project' and you're into Visual Studio ready to build

I'm not the biggest fan of CMake, but it does seem to be the standard. Should we switch?

blumf avatar Sep 28 '20 14:09 blumf

I agree that cmake is the way to go , then we can add vcpkg depdendency for wxwidgets

mariuz avatar Sep 29 '20 19:09 mariuz

Bit more work on the build, Linux seems to work well now.

Only issue is no MacOS testing. Does anybody here currently do Mac dev?

Created a PR: #122

I'd suggest to following steps:

  1. Merge this PR
  2. Check everyone is okay with the new CMake system (hopefully this'll help #115)
  3. Update the GitHub test script (ccpp.yml) to use it
  4. Remove all the old build cruft

blumf avatar Sep 30 '20 10:09 blumf

Are people doing okay with the CMake system?

blumf avatar Oct 02 '20 11:10 blumf

I still couldn't test it, I had a busy week

arvanus avatar Oct 02 '20 13:10 arvanus

Before I forget what I did, PR #129 changes the workflow test to use the new CMake system and drop the Boost requirements.

It's working, so we can look at the final step in all this, removing the old build files.

blumf avatar Oct 29 '20 15:10 blumf

It's been a while (work), would everybody be okay if we get rid of the old build files now?

blumf avatar Jun 08 '21 12:06 blumf