mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 03:41:10 +08:00
add -defaultconf command-line option
This commit is contained in:
parent
db4683443c
commit
116196c706
10
CHANGELOG
10
CHANGELOG
@ -101,7 +101,11 @@
|
||||
or the DOSBox-X configuration directory, and they
|
||||
will automatically appear on the Z drive. If any of
|
||||
the files have the same names as the built-in ones,
|
||||
they will replace the built-in files. (Wengier).
|
||||
they will replace the built-in files. For example,
|
||||
you can replace the built-in EDIT.COM and XCOPY.EXE
|
||||
programs (from FreeDOS) with MS-DOS counterparts.
|
||||
For subdirectories please use normal directory
|
||||
mounts (i.e. MOUNT command) instead. (Wengier).
|
||||
0.83.5
|
||||
- Windows installer now offers the option to upgrade
|
||||
the DOSBox-X config file (dosbox-x.conf) to the
|
||||
@ -174,7 +178,9 @@
|
||||
"auto" (default), DOSBox-X will warn only if at
|
||||
least one file handle is still open, or you are
|
||||
currently running a guest system. (Wengier)
|
||||
- Add command-line option "-defaultdir" to specify
|
||||
- Added command-line option "-defaultconf" to use the
|
||||
default config settings. (Wengier)
|
||||
- Added command-line option "-defaultdir" to specify
|
||||
a directory (instead of the current directory) as
|
||||
the working directory. DOSBox-X will look for the
|
||||
dosbox-x.conf file in this directory. (Wengier)
|
||||
|
@ -92,6 +92,7 @@ public:
|
||||
opt_showcycles = false;
|
||||
opt_earlydebug = false;
|
||||
opt_break_start = false;
|
||||
opt_defaultconf = false;
|
||||
opt_erasemapper = false;
|
||||
opt_resetmapper = false;
|
||||
opt_startmapper = false;
|
||||
@ -134,6 +135,7 @@ public:
|
||||
bool opt_erasemapper;
|
||||
bool opt_resetmapper;
|
||||
bool opt_startmapper;
|
||||
bool opt_defaultconf;
|
||||
bool opt_noautoexec;
|
||||
bool opt_securemode;
|
||||
bool opt_fullscreen;
|
||||
|
@ -6770,6 +6770,7 @@ bool DOSBOX_parse_argv() {
|
||||
fprintf(stderr," -fullscreen Start in fullscreen\n");
|
||||
fprintf(stderr," -savedir <path> Set save path\n");
|
||||
fprintf(stderr," -defaultdir <path> Set the default working path\n");
|
||||
fprintf(stderr," -defaultconf Use the default config settings\n");
|
||||
#if defined(WIN32)
|
||||
fprintf(stderr," -disable-numlock-check Disable NumLock check (Windows version only)\n");
|
||||
#endif
|
||||
@ -6915,6 +6916,9 @@ bool DOSBOX_parse_argv() {
|
||||
if (!control->cmdline->NextOptArgv(tmp)) return false;
|
||||
control->config_file_list.push_back(tmp);
|
||||
}
|
||||
else if (optname == "defaultconf") {
|
||||
control->opt_defaultconf = true;
|
||||
}
|
||||
else if (optname == "editconf") {
|
||||
if (!control->cmdline->NextOptArgv(control->opt_editconf)) return false;
|
||||
}
|
||||
@ -8700,6 +8704,7 @@ int main(int argc, char* argv[]) SDL_MAIN_NOEXCEPT {
|
||||
}
|
||||
}
|
||||
|
||||
if (!control->opt_defaultconf) {
|
||||
/* -- -- if none found, use dosbox-x.conf or dosbox.conf */
|
||||
if (!control->configfiles.size()) control->ParseConfigFile("dosbox-x.conf");
|
||||
if (!control->configfiles.size()) control->ParseConfigFile("dosbox.conf");
|
||||
@ -8812,6 +8817,7 @@ int main(int argc, char* argv[]) SDL_MAIN_NOEXCEPT {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MSG_Add("PROGRAM_CONFIG_PROPERTY_ERROR","No such section or property.\n");
|
||||
MSG_Add("PROGRAM_CONFIG_NO_PROPERTY","There is no property %s in section %s.\n");
|
||||
|
@ -655,7 +655,7 @@ void DOS_Shell::CMD_HELP(char * args){
|
||||
WriteOut("External commands such as \033[33;1mMOUNT\033[0m and \033[33;1mIMGMOUNT\033[0m can be found on the Z: drive.\n");
|
||||
else if (*args&&!show) {
|
||||
std::string argc=std::string(StripArg(args));
|
||||
if (argc!=""&&argc!="CWSDPMI") DoCommand((char *)(argc+(argc=="DOS4GW"||argc=="DOS32A"?"":" /?")).c_str());
|
||||
if (argc!=""&&argc!="CWSDPMI") DoCommand((char *)(argc+(argc=="DOS4GW"||argc=="DOS32A"||argc=="ZIP"||argc=="UNZIP"?"":" /?")).c_str());
|
||||
}
|
||||
if (!*args&&show)
|
||||
WriteOut("Type \033[33;1mHELP command\033[0m or \033[33;1mcommand /?\033[0m for help information for the specified command.\n");
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
src/dosbox-x -fastlaunch -defaultdir . -c 'config -all -wcp dosbox-x.reference.conf' -c 'exit' || exit 1
|
||||
src/dosbox-x -defaultconf -defaultdir . -exit -fastlaunch -c 'config -all -wcp dosbox-x.reference.conf' || exit 1
|
||||
|
||||
# Convert to Unix format if needed
|
||||
dos2unix dosbox-x.reference.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user