Warning when file specified with -file parameter not found

Sun Jun 27, 2021 6:32 am

Currently, if a user tries to load a file with -file command line parameter, and the specified file is not found, GZDoom doesn't warn the user. The file simply doesn't appear in the "adding ..." list. It may be confusing to the user why the file isn't loaded. I think that a message like "File nope.pk3 is not found." (or other appropriate error) logged after "adding ..." list would help.

Code:
gzdoom -file nope.pk3
GZDoom g4.6.0 - 2021-05-22 16:34:22 +0200 - SDL version
Compiled on May 22 2021

OS: Debian GNU/Linux 10 (buster), Linux 4.19.0-14-amd64 on x86_64
M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /opt/gzdoom/gzdoom.pk3, 633 lumps
 adding /opt/gzdoom/game_support.pk3, 2514 lumps
 adding /home/allkromm/Games/doom/iwads/DOOM2.WAD, 2919 lumps
 adding /opt/gzdoom/game_widescreen_gfx.pk3, 98 lumps
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
...


This also applies to -iwad command line parameter.

Re: Warning when file specified with -file parameter not fou

Sun Jun 27, 2021 7:06 am

By looking at void FileSystem::AddFile (const char *filename, FileReader *filer, bool quiet, LumpFilterInfo* filter) this should be already in.

Re: Warning when file specified with -file parameter not fou

Sun Jun 27, 2021 7:36 am

If it's in, it isn't displayed:
Code:
.-(~/src/build-gzdoom-Desktop-Debug)
`--> ./gzdoom -file nope.pk3
GZDoom g4.7.0pre-40-g256451115 - 2021-06-15 10:35:33 +0300 - SDL version
Compiled on Jun 27 2021

OS: Debian GNU/Linux 10 (buster), Linux 4.19.0-14-amd64 on x86_64
M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /home/allkromm/src/build-gzdoom-Desktop-Debug/gzdoom.pk3, 634 lumps
 adding /home/allkromm/src/build-gzdoom-Desktop-Debug/game_support.pk3, 2514 lumps
 adding /home/allkromm/Games/doom/iwads/DOOM2.WAD, 2919 lumps
 adding /home/allkromm/src/build-gzdoom-Desktop-Debug/game_widescreen_gfx.pk3, 122 lumps
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
  Name: AMD Ryzen 3 2200G with Radeon Vega Graphics
  Family 23 (23), Model 17, Stepping 0
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 F16C FMA3 BMI1 BMI2 HyperThreading
V_Init: allocate screen.
S_Init: Setting up sound.
I_InitSound: Initializing OpenAL
  Opened device Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo
  EFX enabled
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
script parsing took 380.86 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
Vulkan device: GeForce GTX 1070
Vulkan device type: discrete gpu
Vulkan version: 1.1.95 (api) 418.608.0 (driver)
Max. texture size: 32768
Max. uniform buffer range: 65536
Min. uniform buffer offset alignment: 256
Resolution: 1920 x 1080
.-(~/src/build-gzdoom-Desktop-Debug)
`-->

Re: Warning when file specified with -file parameter not fou

Sun Jun 27, 2021 8:16 am

I don't see what's wrong, may be we should do some debugging.

Re: Warning when file specified with -file parameter not fou

Sun Jun 27, 2021 12:36 pm

Of course it could never work, if a file doesn't exist it's not added to allwads. See void D_AddWildFile(TArray<FString>& wadfiles, const char* value, const char *extension, FConfigFile* config)