Secretchronicles / TSC

An open source two-dimensional platform game.
https://secretchronicles.org/
GNU General Public License v3.0
204 stars 50 forks source link

cegui dependency not available for building Windows version #709

Open xet7 opened 10 months ago

xet7 commented 10 months ago

Hi, I tried to install dependencies to build Windows version of TSC:

https://github.com/Secretchronicles/TSC/blob/devel/INSTALL.md#2-installing-the-dependencies

But it said cegui dependency is not available. I'll think what to do about this.

bell07 commented 10 months ago

Today I got the message from portage in my Gento Linux system:

!!! The following installed packages are masked:
- dev-games/cegui-0.8.7-r100::gentoo (masked by: package.mask)
/var/db/repos/gentoo/profiles/package.mask:
# Michał Górny <mgorny@gentoo.org> (2023-10-27)
# dev-games/cegui is unmaintained, does not support Python 3.11 and has
# a ton of open bugs.  It is only used by games-rpg/sumwars.  CeGUI has
# had no release since 2016, and apparently the current git
# is incompatible with SumWars.  SumWars have had no activity
# since 2014.
# Removal on 2023-11-26.  Bug #896688.

Please remove the cegui dependency, replace the lib by any alternative...

Site note: The games-arcade/tsc is not mentioned in message because not in official gentoo repository (just in my public overlay).

xet7 commented 10 months ago

@bell07

What alternatives are there?

I looked for some at here:

https://alternativeto.net/software/crazy-eddie-s-gui-system/

But I have not tried any of them yet.

It would help if that alternative would be similar to cegui.

xet7 commented 10 months ago

@bell07

Site note: The `games-arcade/tsc` is not mentioned in message because not in official gentoo repository (just in my public overlay).

I do not know how to build TSC for gentoo. I only know how to make .deb and .exe packages.

xet7 commented 10 months ago

I have not yet tried to learn how to build AppImage or FlatPak packages.

xet7 commented 10 months ago

I think, that if I could figure out a way to make AppImage that would work on most distros, building it at Debian or Ubuntu where all dependencies exist, maybe that could be the best option.

For Windows, I could install newest source code for cegui, and use it to build Windows version of TSC.

cegui may be unmaintained, and have some bugs, but I do not notice any of them when playing TSC.

There has not been any contact from any distro, that would have had interest to package TSC directly to some distro. I have built packages myself.

bell07 commented 10 months ago

I do not know alternatives. Just wanted to warn the cegui is removed from one distribution for less maintenance reasons.

Gentoo is source based, that means the repository provides build instructions only (ebuilds). Like arch AUR or bsd ports, the package is built on target system with optimizations using the provided instructions. For Gentoo I maintain the ebuilds at https://github.com/bell07/gentoo-bell07_overlay/tree/master/games-arcade/tsc

If cegui is removed in a month, but you decides still to use it, I need adjust tsc ebuild, that cegui is built at the first and installed for tsc only as needed.

In this case I recommend for AppImage or FlatPak to include the cegui lib inside the package too, because maybe other distros remove the lib from repository too.

Quintus commented 10 months ago

Am Samstag, dem 28. Oktober 2023 schrieb bell07:

I do not know alternatives. Just wanted to warn the cegui is removed from one distribution for less maintenance reasons.

The thing is this. CEGUI is one of TSC's central dependencies; it is internally wired with CEGUI in lots of ways, which we have inherited from the original SMC project. Replacing CEGUI in TSC constitutes a partial rewrite of the game, it is even used for some internal calculations which have nothing to do with UI. CEGUI's former lead developer, CrazyEddy, contributed parts to SMC himself if I recall it correctly.

Over time, we have received numerous complaints about CEGUI, which you can easily find by searching the bugtracker here on GitHub. The internal use of undocumented parts of CEGUI however makes replacing it very hard. To be clear, I would be glad if someone came up with a PR to replace it in TSC.

I am currently not much involved into the programming field, and it is thus quite unlikely that I take it upon me to remove CEGUI. For the time being, it depends on other people to try their hand on this.

The only quick fix for this problem I see is to include a complete copy of CEGUI into the TSC sources and hope that it continues to build with newer toolchains and dependencies.

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite Passau, Deutschland | @.*** | O<

refi64 commented 10 months ago

There's already a Flatpak manifest in the repo root, though it needs a little TLC to update the base runtime.

xet7 commented 10 months ago

Here is where cegui was dropped from msys2:

https://github.com/msys2/MINGW-packages/commit/0cbc5ff1254d7fd0f8eb67691b87a9e887d128fb

xet7 commented 10 months ago

I'm currently compiling cegui for Windows. I'll see does it work.

bell07 commented 7 months ago

Found new upstream at https://github.com/cegui/cegui

The "default" branch is next-version with breaking ABI. Maybe it is worth to start porting the ABI changes in TSC. The "v0-8" branch is more up-to-date and contain more fixes than the 0.8.7 release.

I think the upstream is not as dead as thought.

xet7 commented 7 months ago

@bell07

Do you have time to try does it work? Does it fix any important bugs?

bell07 commented 7 months ago

I compiled the "v0-8" branch and use it with TSC for now.

The patches python3.patch and musl.patch I was needed to apply to the 0.8.7 release, are already applied in the branch.

The issue I got last week after system update (the reason why I searched for solution) - the cegui does not compile with CEGUI_BUILD_XMLPARSER_LIBXML2 anymore - is still not solved in both branches. My current solution is to move to XMLPARSER_EXPAT that is supported by TSC too.

I was able to compile the cegui "master" branch, but compiling TSC fails. The hard-coded paths "cegui-0.8" does not match (new is "cegui-0.9999"). After adjusting paths, the compiling fails with something about data type conversation not possible. I think that is the ABI and API breaking change, mentioned in README.md