RupertAvery / PSXPackager

A utility to convert Playstation disc images in various formats to PBP format and back
Other
230 stars 15 forks source link

Resource files cannot be found on case-sensitive filesystems. #48

Closed joshbarrass closed 1 year ago

joshbarrass commented 1 year ago

When running the latest release on a case-sensitive filesystem, as is typical on Linux, PSXPackager fails to find the default resources files. This is due to PSXPackager searching for Resources/PIC0.png, but the actual file included with the release is Resources/PIC0.PNG. This prevents the file from being found.

A temporary fix is to rename the resource files as any errors occur to match the cases expected by PSXPackager. However, it would be better to handle the cases correctly in the program itself.

Steps:

Expected results:

PSXPackager runs without error.

Actual results:

Could not find file '/home/user/psxpackager-linux-x64/Resources/PIC0.png'.
RupertAvery commented 1 year ago

Thank you for reporting this. I have a solution that involves searching for matching files based on the filename, more or less making the resource file case-insensitive. This works in both Windows and Linux and probably OSX too. This means that if there are more than one of the same filename but with different case, an error will be thrown. I think it unlikely that users will do this.

joshbarrass commented 1 year ago

Just tested the latest build and sadly the error is still there (though the error codes are working now :).

$ ./psxpackager -i game.cue -o . -f "%MAINTITLE% [%MAINGAMEID%] (%REGION%)"
PSXPackager v1.6.2 by RupertAvery

Input : game.cue
Output: .
Compression Level: 5

Processing started: 18:59:31
Processing game.cue
Using Title 'Game Title'

Could not find file '/home/user/psxpackager-linux-x64/Resources/PIC0.png'.
Processing completed: 00h 00m 00s

$ echo $?
253
RupertAvery commented 1 year ago

Please try this build and let me know if it fixes the issue

linux-x64.zip

RupertAvery commented 1 year ago

Let me know if this is still an issue in v1.6.2

joshbarrass commented 1 year ago

Apologies, your last reply seems to have slipped through my notifications. I just tried the latest v1.6.2 build on GitHub and am still seeing the same problem.

$ ./psxpackager -i game.cue -o . -f "%MAINTITLE% [%MAINGAMEID%] (%REGION%)"
PSXPackager v1.6.2 by RupertAvery

Input : game.cue
Output: .
Compression Level: 5

Processing started: 14:44:01
Processing game.cue
Using Title 'Game Title'

Could not find file '/home/user/psxpackager-linux-x64/Resources/PIC0.png'.
Processing completed: 00h 00m 00s

$ echo $?
253
joshbarrass commented 1 year ago

I just tried the build in the zip file you posted above and this appears to fix the problem! :)

I have encountered another bug in the process of testing this, however, but I'll open a separate issue for this.

takano32 commented 1 year ago

Thanks for your report!

And now, I close this ticket.