exoscoriae / eXoDOS

eXoDOS
71 stars 3 forks source link

AltLauncher.bat appends a new glshader line to alt_settings.txt when previous settings chosen #5370

Open parricc opened 2 months ago

parricc commented 2 months ago

With the way AltLauncher.bat is currently implemented, a new glshader line gets added to the alt_settings.txt file on each run. For people that constantly use the alternate launcher, this could result in the file getting very large over time.

:install
echo glshader:%filter%>>.\emulators\dosbox\alt_settings.txt
Python-Exoproject commented 2 months ago

Not in my experience when using the alt launcher, always just the four lines. Might be a linux thing?

parricc commented 2 months ago

Not the output in the window, but the actual contents. Even the file currently synced in WIP has the line several times.

parricc commented 2 months ago

Actually, looking at the file, this happens specifically when you launch with existing settings:

:blip
echo.
echo Would you like to launch with these settings?
echo.
.\util\choice /C:YN /N [Y]es or [N]o to reconfigure

if errorlevel = 2 goto next
if errorlevel = 1 goto preinstall
:preinstall
if %conf%==".\emulators\dosbox\Staging_PP.conf" goto install
if %conf%==".\emulators\dosbox\Staging_noline.conf" goto install
if %conf%==".\emulators\dosbox\Staging_noline_PP.conf" goto install
.\util\ssr 0 glshader= glshader=%filter% %conf%
goto postinstall

If the conf is set to one of those 3 files, it goes to install, which adds a new line. Renaming ticket to reflect this.

parricc commented 2 months ago

I think the gotos in the preinstall label are supposed to be goto postinstall.

parricc commented 2 months ago

Verified that preinstall only gets called if launching with previous settings. So yeah, that's the issue.

:preinstall
if %conf%==".\emulators\dosbox\Staging_PP.conf" goto install
if %conf%==".\emulators\dosbox\Staging_noline.conf" goto install
if %conf%==".\emulators\dosbox\Staging_noline_PP.conf" goto install
.\util\ssr 0 glshader= glshader=%filter% %conf%
goto postinstall

Should be:

:preinstall
if %conf%==".\emulators\dosbox\Staging_PP.conf" goto postinstall
if %conf%==".\emulators\dosbox\Staging_noline.conf" goto postinstall
if %conf%==".\emulators\dosbox\Staging_noline_PP.conf" goto postinstall
.\util\ssr 0 glshader= glshader=%filter% %conf%
goto postinstall

Not in a position to test this at the moment, though.

Python-Exoproject commented 2 months ago

Yep, thats it. Good catch, the frequently used options of using the auto crt shader didnt have the issue and I missed it during testing.

@exoscoriae please make the above change to AltLauncher.bat and AltLauncher3x.bat as it impacts both eXoDOS and Win3x

parricc commented 2 months ago

Note this issue is also present in the !languagepacks\Alternate Launcher.bat file.

Python-Exoproject commented 2 months ago

Since I also remembered that John has created a version of the no FMV interlace patch that retains subtle CRT scanline (which can help sharpen an image) I have taken the time to implement the user option for either the current version or the new version of the shader. I have also applied the above fix.

Here is the eXoDOS version: ForReview - eXoDOS.zip

Here is the Win3x version: ForReview - eXoWin3x.zip

I looked at the alt language version but left it alone since it will involve some extra translation. If\once the above is implemented ill ping Timber about it

exoscoriae commented 2 months ago

applied your changed versions @Python-Exoproject

This should address the above issue as well as add the new interlace option

Python-Exoproject commented 2 months ago

@TimberlAndRE-de With the alt launcher changes now implemented by eXo Im pinging you to bring it to your attention for the German language pack.

eXoDOS\eXoDOS WIP\eXo\util!languagepacks\Alternate Launcher.bat will need updating to match the new English eXoDOS\eXoDOS WIP\eXo\util\AltLauncher.bat and whatever file stores all the translated text that the %AltLauncherline0001% lines use will need the translation updated and or expanded

Python-Exoproject commented 2 months ago

Actually looking at it again, the German alt launcher is still using the old approach of individual alt launcher files for every game isnt it? We now have a singular alt launcher file in the util folder that has the majority of the script and each game just has a pointer stub, just like the main launch bat process

parricc commented 1 month ago

Timber clarified that GLP 1.0 did not use alternate launchers. He said @boohyaka is taking the lead with implementing alternate launchers for language packs.