New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoexec fixes #3007
Autoexec fixes #3007
Conversation
1a758dd
to
cb84c23
Compare
Thanks, @FeralChild64.
I think it's probably good overall that we restored this functionality, but if it's ultimately something no one in the dev team cares about and it's weird, counterintuitive, obscure, complicated, and edge case-y, maybe it's chopping block time... 😄 We'll see how this goes and how much trouble it causes down the road. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine @FeralChild64 and I have really low interest in this feature so I trust your manual testing 😄
Did some testing.
This works 👍
This does not work and is a regression from 0.80.1
I believe this is the problem. Behavior should not be to mount current directory but instead mount the directory the .exe is located in. I'm going to stay out of the argument of whether we should keep this feature in. I think @kcgen made some good points about why we should have this. |
cb84c23
to
d13b2c5
Compare
OK, I'll investigate it. Switching back to draft for now. |
b51832d
to
831ca38
Compare
831ca38
to
23e982a
Compare
@weirddan455 Should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great, @FeralChild64.
Executables with relative paths, absolute paths, and those without any path (local files) all mount and launch without issue. 👍
Baseline tests (-c
, -conf
, and without args) are running good too.
I think everyone's reviewed the code, and with the regression fixed, it's time to merge. |
Thanks for the fix, number one 🥇 |
Description
dosbox FOOBAR.EXE
automounting current directory as drive C:[autoexec]
sections if directory, file, or boot image was provided on the command line, andautoexec_section
from[dosbox]
has value different fromjoin
SHELL: Redirecting output to ...
log, it is printed out much too often, also when executing some autoexecsNote: The
Z:\AUTOEXEC.BAT
generator tries to be smart and friendly - but IMHO it often works in a way which is strange and counterintuitive:FOOBAR.BAT
in the current directory;dosbox FOOBAR.BAT
will generateCALL FOOBAR.BAT
, butdosbox FOOBAR
ordosbox "FOOBAR.BAT /switch=y"
won't prefix the batch file invocation withCALL
AUTOEXEC.BAT
should get an exit command at the end is the startup verbosity parameter, and it is the valueauto
that is handled differentlyDOOM.BAT
file andDOOM
directory,dosbox DOOM
will try to mount the directory, but won't launch the gameI'm not using this functionality, I don't know what was the rationale behind them, so it is hard for me to propose a solution that is logical and won't upset users.
Related issues
#2987
Manual testing
I recomment to uncomment
#define DEBUG_AUTOEXEC
insrc/shell/autoexec.cpp
and recompile before playing with various options - this will print out the generatedZ:\AUTOEXEC.BAT
to the logs, making it easier to see what is actually happening.Checklist
Please tick the items as you have addressed them. Don't remove items; leave the ones that are not applicable unchecked.
I have: