eventhorizon5 / skyscraper

The Skyscraper Project (Skyscrapersim) - an open source building, city, and elevator simulator
https://www.skyscrapersim.net
GNU General Public License v2.0
30 stars 7 forks source link

Maybe this project can be built under msys2 #61

Open asmwarrior opened 1 month ago

asmwarrior commented 1 month ago

I see msys2 has

Package: mingw-w64-x86_64-ogre3d - MSYS2 Packages

It also has wxWidgets:

Base Package: mingw-w64-wxwidgets3.2 - MSYS2 Packages

So, hopefully it can use those prebuild libraries to build under msys2.

eventhorizon5 commented 1 month ago

I'll see if I can built it under msys2, since the software is Linux compatible, it shouldn't need many modifications for it to work.

asmwarrior commented 1 month ago

I see it has a codeblocks cbp project file, but that file does not contain compiler options or linker options. What is this cbp file used for?

eventhorizon5 commented 1 month ago

The codeblocks project is used for editing the GUI elements like the control panel window, it's not used for building code right now. I use the wxSmith system for the GUI.

asmwarrior commented 1 month ago

The codeblocks project is used for editing the GUI elements like the control panel window, it's not used for building code right now. I use the wxSmith system for the GUI.

That's great! As I'm one of C::B developers, I'm grad you are using wxSmith for the GUI.

BTW: if skyscraper can be built under msys2, then I can simply add compiler option and linker option to the Code::Blocks cbp file, so that this project can be built inside Code::Blocks IDE.

Package: mingw-w64-x86_64-bullet - MSYS2 Packages

I think msys2 has many library prebuilt for skyscraper.

eventhorizon5 commented 1 month ago

Cool - feel free to play around with the building process and the source code if you want. I'll try that with Code::Blocks too, since the project has mostly used Visual Studio on Windows but still has leftover Code::Blocks project build stuff from a long time ago, which hasn't been updated for a while Skyscraper can use the default wxWidgets that msys provides, but needs a custom-built Ogre, so the prepackaged one won't work.

asmwarrior commented 1 month ago

If you would like to compile or link the wxWidgets library from msys2 inside Code::Blocks, a simple way is to use wx-config-msys2.exe, this can generate the compiler option or linker option you need, see a detailed description here:

Re: New Variable to support wx-config in MSys2 MinGW

If a library support pkg-config in msys2, then config it in C::B is very simple, just do something like for opencv4 library

`pkg-config --libs opencv4`