Commander_Wars icon indicating copy to clipboard operation
Commander_Wars copied to clipboard

on ArchLinux the game fails to get acsess to folders

Open xray-tango opened this issue 2 years ago • 9 comments

the game displays a blank folder when trying to assess most folders from in-game. This mainly an issue when trying to select a map, and instead of displaying the maps in the maps folder it's blank, making the game fully unusable. The game even crashes when trying to start a random map.

To Reproduce

  1. On Arch-Linux or any fork of it (for example Manajro) Git clone the project and build it or build it from the AUR
  2. start the game and click on single-player or anywhere in-game where you can browse files

Expected behavior The game displays the files in the folders

Screenshot image

Desktop

  • OS: Arch Linux x86_64 (and Manjaro Linux "Ruah" Stable as backup)
  • Version: Rolling release and fully up to date

@Lukas1818

xray-tango avatar Jun 18 '22 13:06 xray-tango

This sounds like a problem with your comilation. Normally all files are compiled into the exe as a virtual folder of qt, unless the compile time define GAMEDEBUG was set. So there shouldn't be an access problem. You could try setting the log level to 0 in the ini-file and checkout what the console.log shows. Also you should make sure you have the latest qt version installed for compiling.

Since other people with a linux system don't have a problem as far as i heard and i'm not fully supporting linux due to a lack of that on my end. I can't really help you. :(

Robosturm avatar Jun 19 '22 09:06 Robosturm

Also you should make sure you have the latest qt version installed for compiling.

Since other people with a linux system don't have a problem as far as i heard and i'm not fully supporting linux due to a lack of that on my end. I can't really help you. :(

the problem is that my system is way too up to date You can't know since you don't really use unix system but Arch Linux is one of the most bleeding edge OSes out there. Running arch is the equivalent of git clone-ing every part of your os every day twice. Partial updates are not even supported on Arch nor I ever force partial update so all packages are the latest as possible

I first tried to compile the game on Vanilla Arch with a simple xorg window manager running. After it failed i tried to compile it on a different arch based system "Manajro" they hold up the updates for 1 week and won't ship known unstable stuff by default meaning it's still very up to date and bleeding edge but much more controlled and stable. I compiled the game on it using Wayland and KDE plasma (DE based on QT) as my Desktop environment (meaning everything that could have caused problems was switched to something different) yet it still yielded the same results P.S.: the pre compiled Ubuntu binary just shows up blank on the lattest QT for me

xray-tango avatar Jun 19 '22 22:06 xray-tango

I usually follow the steps described here: http://198.58.112.124/wiki/Compiling_on_Linux Never had an issue when following that path. Also check your make qt and cmake versions. A pattern I have noticed is that the game does not compile properly unless all the dependencies required by cmake are met. On the other hand, and sorry for making the most dumb question, but have you checked the chmod permissions assigned to the folders that make generates?

P.S. I have tested this through Fedora and Debian 10 P.S. 2 I would highly suggest checking the console output, the game tends to yield clues on what's breaking.

lonewolf19991 avatar Jun 20 '22 02:06 lonewolf19991

Update: the game is just simply cursed. if i move in folders just the right way sometimes i'm able to get folders to show up

Update2: I was able to start a map by manually downloading the map files and copying one into the main gamefolder and if i'm lucky enough i can get the main game folder to sometimes show up

Update3: never-mind soon as the AI gets their turn the game crashes

xray-tango avatar Jun 20 '22 16:06 xray-tango

I met a similar situation. The game only created the map folders but did not extract map files into it. I copied them manually, then it worked.

wyykak avatar Aug 14 '22 03:08 wyykak

@wyykak That behaviour would be correct. The game creates the empty folders for the purpose for saving new files created by the player. The pre-made maps are compiled into the exe and the game uses a virtual and a real folder using qt's resouce system and merges them together...

Robosturm avatar Aug 14 '22 07:08 Robosturm

In the latest version, that is 0.24.3-dev, I have the same issue.

I am using: Qt 6.3.1, Debian Bullseye, Cmake 3.23.2

However by copying the map files from the source code, it works again.

lonewolf19991 avatar Aug 16 '22 01:08 lonewolf19991

@lonewolf19991 @wyykak And you only need to do this for the map files?

In that case either this function fails: GlobalUtils::getInfoList(const QString & folder, const QStringList & list) or something fails in the function: MapSelection::changeFolder(QString folder)

I did a small change to differ between folder and file detection which works fine on windows but might fail on linux. So you could try the latest commit....

Robosturm avatar Aug 16 '22 15:08 Robosturm

I have compiled the up to the latest master branch, and the maps display as intended now.

lonewolf19991 avatar Aug 16 '22 18:08 lonewolf19991

👍

xray-tango avatar Aug 20 '22 02:08 xray-tango