mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
add configargs
This commit is contained in:
parent
3bb494bbf0
commit
877d8ed142
@ -48,6 +48,10 @@ INLINE void ConfigTable::ConfigSuffixDefault(void) {
|
|||||||
configsuffix = "";
|
configsuffix = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INLINE void ConfigTable::ConfigArgsDefault(void) {
|
||||||
|
configargs = "";
|
||||||
|
}
|
||||||
|
|
||||||
INLINE void ConfigTable::ConfigPathDefault(void) {
|
INLINE void ConfigTable::ConfigPathDefault(void) {
|
||||||
configpath = "CFG_PATH";
|
configpath = "CFG_PATH";
|
||||||
}
|
}
|
||||||
|
@ -180,8 +180,7 @@ void ConfigTable::ReadConfigFile(void) {
|
|||||||
microconfig_cat->spam() << "examining file '" << config_file << "'"
|
microconfig_cat->spam() << "examining file '" << config_file << "'"
|
||||||
<< endl;
|
<< endl;
|
||||||
if (config_file.is_executable()) {
|
if (config_file.is_executable()) {
|
||||||
ConfigString line = config_file.to_os_specific() + " "
|
ConfigString line = config_file.to_os_specific() + " " + configargs;
|
||||||
+ ExecutionEnvironment::get_binary_name();
|
|
||||||
if (microconfig_cat->is_spam())
|
if (microconfig_cat->is_spam())
|
||||||
microconfig_cat->spam() << "file is executable, running '"
|
microconfig_cat->spam() << "file is executable, running '"
|
||||||
<< line << "'" << endl;
|
<< line << "'" << endl;
|
||||||
@ -342,6 +341,7 @@ void ConfigTable::MicroConfig(void)
|
|||||||
bool fsep = false;
|
bool fsep = false;
|
||||||
bool cname = false;
|
bool cname = false;
|
||||||
bool csuff = false;
|
bool csuff = false;
|
||||||
|
bool cargs = false;
|
||||||
bool cpath = false;
|
bool cpath = false;
|
||||||
bool ccmt = false;
|
bool ccmt = false;
|
||||||
bool asuff = false;
|
bool asuff = false;
|
||||||
@ -414,6 +414,15 @@ void ConfigTable::MicroConfig(void)
|
|||||||
<< "setting the config file suffix to '"
|
<< "setting the config file suffix to '"
|
||||||
<< configsuffix << "'"
|
<< configsuffix << "'"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
} else if (tok == "configargs") {
|
||||||
|
configargs = rest;
|
||||||
|
cargs = true;
|
||||||
|
if (microconfig_cat->is_spam())
|
||||||
|
microconfig_cat->spam()
|
||||||
|
<< "got a microconfig configargs directive, "
|
||||||
|
<< "setting the config file args to '"
|
||||||
|
<< configargs << "'"
|
||||||
|
<< endl;
|
||||||
} else if (tok == "configpath") {
|
} else if (tok == "configpath") {
|
||||||
if (cpath) {
|
if (cpath) {
|
||||||
configpath += " " + rest;
|
configpath += " " + rest;
|
||||||
@ -526,6 +535,13 @@ void ConfigTable::MicroConfig(void)
|
|||||||
<< "setting to default '" << configsuffix
|
<< "setting to default '" << configsuffix
|
||||||
<< "'" << endl;
|
<< "'" << endl;
|
||||||
}
|
}
|
||||||
|
if (!cargs) {
|
||||||
|
ConfigArgsDefault();
|
||||||
|
if (microconfig_cat->is_spam())
|
||||||
|
microconfig_cat->spam() << "no microconfig for configargs, "
|
||||||
|
<< "setting to default '" << configargs
|
||||||
|
<< "'" << endl;
|
||||||
|
}
|
||||||
if (!cpath) {
|
if (!cpath) {
|
||||||
ConfigPathDefault();
|
ConfigPathDefault();
|
||||||
if (microconfig_cat->is_spam())
|
if (microconfig_cat->is_spam())
|
||||||
|
@ -49,6 +49,7 @@ class EXPCL_DTOOLCONFIG ConfigTable {
|
|||||||
ConfigString filesep;
|
ConfigString filesep;
|
||||||
ConfigString configname;
|
ConfigString configname;
|
||||||
ConfigString configsuffix;
|
ConfigString configsuffix;
|
||||||
|
ConfigString configargs;
|
||||||
ConfigString configpath;
|
ConfigString configpath;
|
||||||
ConfigString configcmt;
|
ConfigString configcmt;
|
||||||
ConfigString argsuffix;
|
ConfigString argsuffix;
|
||||||
@ -70,6 +71,7 @@ class EXPCL_DTOOLCONFIG ConfigTable {
|
|||||||
INLINE void FileSepDefault(void);
|
INLINE void FileSepDefault(void);
|
||||||
INLINE void ConfigNameDefault(void);
|
INLINE void ConfigNameDefault(void);
|
||||||
INLINE void ConfigSuffixDefault(void);
|
INLINE void ConfigSuffixDefault(void);
|
||||||
|
INLINE void ConfigArgsDefault(void);
|
||||||
INLINE void ConfigPathDefault(void);
|
INLINE void ConfigPathDefault(void);
|
||||||
INLINE void ConfigCmtDefault(void);
|
INLINE void ConfigCmtDefault(void);
|
||||||
INLINE void ArgSuffixDefault(void);
|
INLINE void ArgSuffixDefault(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user