Add unique launcher parameters for resource archives vs. directories to support -folder

This commit is contained in:
spherallic 2023-04-23 23:48:44 +02:00
parent f8c313abaa
commit dde06fa12c
3 changed files with 33 additions and 1 deletions

View file

@ -83,7 +83,7 @@ defaultskytextures
defaultlumpname = "MAP01"; defaultlumpname = "MAP01";
// Default testing parameters // Default testing parameters
testparameters = "-file \"%AP\" \"%F\" -warp %L"; testparameters = "-folder \"%AF\" -file \"%AA\" \"%F\" -warp %L";
testshortpaths = true; testshortpaths = true;
// Default nodebuilder configurations // Default nodebuilder configurations

View file

@ -103,6 +103,8 @@ namespace CodeImp.DoomBuilder
DataLocation iwadloc; DataLocation iwadloc;
string p_wp = "", p_wf = ""; string p_wp = "", p_wf = "";
string p_ap = "", p_apq = ""; string p_ap = "", p_apq = "";
string p_aa = "", p_aaq = "";
string p_af = "", p_afq = "";
string p_l1 = "", p_l2 = ""; string p_l1 = "", p_l2 = "";
string p_nm = ""; string p_nm = "";
string f = tempwad; string f = tempwad;
@ -153,11 +155,31 @@ namespace CodeImp.DoomBuilder
{ {
p_ap += General.GetShortFilePath(dl.location) + " "; p_ap += General.GetShortFilePath(dl.location) + " ";
p_apq += "\"" + General.GetShortFilePath(dl.location) + "\" "; p_apq += "\"" + General.GetShortFilePath(dl.location) + "\" ";
if (dl.type == DataLocation.RESOURCE_WAD || dl.type == DataLocation.RESOURCE_PK3)
{
p_aa += General.GetShortFilePath(dl.location) + " ";
p_aaq += "\"" + General.GetShortFilePath(dl.location) + "\" ";
}
else
{
p_af += General.GetShortFilePath(dl.location) + " ";
p_afq += "\"" + General.GetShortFilePath(dl.location) + "\" ";
}
} }
else else
{ {
p_ap += dl.location + " "; p_ap += dl.location + " ";
p_apq += "\"" + dl.location + "\" "; p_apq += "\"" + dl.location + "\" ";
if (dl.type == DataLocation.RESOURCE_WAD || dl.type == DataLocation.RESOURCE_PK3)
{
p_aa += dl.location + " ";
p_aaq += "\"" + dl.location + "\" ";
}
else
{
p_af += dl.location + " ";
p_afq += "\"" + dl.location + "\" ";
}
} }
} }
} }
@ -166,6 +188,10 @@ namespace CodeImp.DoomBuilder
// Trim last space from resource file locations // Trim last space from resource file locations
p_ap = p_ap.TrimEnd(' '); p_ap = p_ap.TrimEnd(' ');
p_apq = p_apq.TrimEnd(' '); p_apq = p_apq.TrimEnd(' ');
p_aa = p_aa.TrimEnd(' ');
p_aaq = p_aaq.TrimEnd(' ');
p_af = p_af.TrimEnd(' ');
p_afq = p_afq.TrimEnd(' ');
// Try finding the L1 and L2 numbers from the map name // Try finding the L1 and L2 numbers from the map name
string numstr = ""; string numstr = "";
@ -230,7 +256,11 @@ namespace CodeImp.DoomBuilder
outp = outp.Replace("%L2", p_l2); outp = outp.Replace("%L2", p_l2);
outp = outp.Replace("%L", General.Map.Options.CurrentName); outp = outp.Replace("%L", General.Map.Options.CurrentName);
outp = outp.Replace("\"%AP\"", p_apq); outp = outp.Replace("\"%AP\"", p_apq);
outp = outp.Replace("\"%AA\"", p_aaq);
outp = outp.Replace("\"%AF\"", p_afq);
outp = outp.Replace("%AP", p_ap); outp = outp.Replace("%AP", p_ap);
outp = outp.Replace("%AA", p_aa);
outp = outp.Replace("%AF", p_af);
outp = outp.Replace("%S", skill.ToString()); outp = outp.Replace("%S", skill.ToString());
outp = outp.Replace("%NM", p_nm); outp = outp.Replace("%NM", p_nm);
outp = outp + " +skin " + skin.ToLowerInvariant(); outp = outp + " +skin " + skin.ToLowerInvariant();

View file

@ -182,6 +182,8 @@
%L1 - The first number found in the map lump name (as is set in the map options window). %L1 - The first number found in the map lump name (as is set in the map options window).
%L2 - The second number found in the map lump name (as is set in the map options window). %L2 - The second number found in the map lump name (as is set in the map options window).
%AP - All resource files, except the first IWAD, with full paths included. %AP - All resource files, except the first IWAD, with full paths included.
%AA - All archives (WAD and PK3 files), except the first IWAD, with full paths included.
%AF - All folder resources, with full paths included.
%S - Skill number at which to test. %S - Skill number at which to test.
%NM - Either -nomonsters when testing without monsters, or nothing at all.</value> %NM - Either -nomonsters when testing without monsters, or nothing at all.</value>
</data> </data>