MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
134 stars 173 forks source link

[0.50.0-SNAPSHOT] MekHQ nightly tarball contains duplicate files with different case #4559

Open azhais opened 3 months ago

azhais commented 3 months ago

Environment

20240805 MekHQ Nightly CI tarball

Description

The MekHQ and MekHQ.bat files are duplicated with lower case versions of themselves in the tarball Screenshot 2024-08-06 102555 Screenshot 2024-08-06 102537

I have not checked the MegaMek or MegaMekLab tarballs for similar issues.

IllianiCBT commented 3 months ago

Once tonight's nightly has built, could you use it to confirm whether this is still an issue? :)

azhais commented 3 months ago

I just downloaded MekHQ Nightly CI build 1588 and it does not appear to be an issue any longer.

IllianiCBT commented 2 months ago

I've had a confirmation on Discord that this is an issue as of tonight's 50.01 nightly MekHQ Nightly CI #1626

rjhancock commented 2 months ago

Good news. Been able to verify it. Bad news. Unable to duplicate it. Checking on a few things to see what can be done.

Tzahr commented 2 months ago

I'm encountering it consistently unzipping with 7-Zip on Windows 11, in case that might help narrowing it down.

rjhancock commented 2 months ago

The issue is during the build phase and is intermittent it seems. Only Windows is having the issue and it may be due to windows intercepting the process.

The thing about tar files is it's just one long file with all archived files added to the end. So having multiple of the same file ks possible and probable but standard extraction is to just overwrite as the files extract as the later files are newer.

It's something that can be ignored on windows but is something that should be fixed.

WeaverThree commented 2 months ago

File case counts on Linux so they come out as different files, e.g.:

❯ ll MekHQ-0.50.01-SNAPSHOT-2024-10-02/bin
total 96
-rwxr-xr-x 1 weaver weaver  9769 Oct  2 20:26 megamek
-rwxr-xr-x 1 weaver weaver  9920 Oct  2 20:24 MegaMek
-rw-r--r-- 1 weaver weaver  4012 Oct  2 20:26 megamek.bat
-rw-r--r-- 1 weaver weaver  4163 Oct  2 20:24 MegaMek.bat
-rwxr-xr-x 1 weaver weaver 10992 Oct  2 20:24 megameklab
-rwxr-xr-x 1 weaver weaver 11011 Oct  2 20:24 MegaMekLab
-rw-r--r-- 1 weaver weaver  5269 Oct  2 20:24 megameklab.bat
-rw-r--r-- 1 weaver weaver  5288 Oct  2 20:24 MegaMekLab.bat
-rwxr-xr-x 1 weaver weaver 11197 Oct  2 20:25 MekHQ
-rwxr-xr-x 1 weaver weaver  5481 Oct  2 20:25 MekHQ.bat

The files are actually slightly different from each other in the naming of some environment variables. The capitalized versions use MEGA_MEK_OPTS and MEGA_MEK_LAB_OPTS whereas the noncapitilzed versions use MEGAMEK_OPTS and MEGAMEKLAB_OPTS. The non-capitalized versions of the .bat files also do not appear to set DEFAULT_JVM_OPTS to anything where the capitilized versions do.

Very strange.