official-antistasi-community / A3-Antistasi

Antistasi Community Version - work in progress - Discord https://discord.com/invite/TYDwCRKnKX
https://antistasi.de
Other
227 stars 154 forks source link

[Bug]: Problems with Case Sensitivity on Linux dedicated server #2588

Closed returntoreality closed 1 year ago

returntoreality commented 1 year ago

Describe the bug

On linux the dedicated server would not start with an error "ErrorMessage: Cannot open file '/srv/steamcmd/arma3/@Antistasi\addons\garage' " Linux filesystems are case sensitive, so the paths to the addons need to be in the correct case. When creating symlinks to the pbos the server starts. inside the @Antistasi/addons folder:

ln -s JeroenArsenal.pbo jeroenarsenal.pbo
ln -s Garage.pbo garage.pbo
ln -s Logistics.pbo logistics.pbo
ln -s Events.pbo events.pbo
ln -s GUI.pbo gui.pbo

I guess the addons are referenced somewhere in lower case and this works on Windows but not on Linux

How to reproduce

Try starting a dedicated server on a Linux machine.

Version

3.0.0

Have you altered the code?

No

What i have changed

I did not alter the code

Map

n/a

What server?

Private dedicated server

Time bug occured (Server time/UTC)

No response

Mods

No response

Additional context

No response

jaj22 commented 1 year ago

Can you confirm that you needed all five of those symlinks? Or did you only test with five or none?

Not seeing anything plausible as a miscasing from our end, although I may have lost something in the preprocessor spaghetti. Will keep looking.

returntoreality commented 1 year ago

Well at least the first two. I have not checked if the others are definitely needed.

jaj22 commented 1 year ago

Also, what if you just lowercase the original folders rather than using the symlinks? Wondering if Arma itself is just lowercasing all PBO references.

returntoreality commented 1 year ago

I tested now all files and they all have to be lowercase. I also tested to just rename instead of symlinking GUI.pbo to gui.pbo and that worked as well.

Bob-Murphy commented 1 year ago

So us lowercasing the folders which create the PBOs will solve this issue for others that use linux based Arma servers, correct?

returntoreality commented 1 year ago

I have not tried building the mod after lowercasing the folders (just renaming the files) but if that results in lowercased files I'd guess that this is the case.

jaj22 commented 1 year ago

Yeah, looks like Arma just forces all references to lower-case rather than trying the given case first, which is disappointing. Means we should lowercase all the addon folder/PBO names for the next version. Not sure whether JeroenArsenal should be changed to jeroen_arsenal or jeroenarsenal. @HakonRydland ?

HakonRydland commented 1 year ago

jeroenarsenal for readability, should be accepted on both linux and windows

arron1993 commented 1 year ago

An FYI to anyone encountering this the Arma wiki has documented this problem with mods in general and provides a command you can run on the mod directories.

The command - find . -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

The docs - https://community.bistudio.com/wiki/Arma_3:_Dedicated_Server#Case_sensitivity_.26_Mods

Tested this myself and it appears to work.

Bob-Murphy commented 1 year ago

merged