Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ public Object execute(ModelManager modelManager) throws IOException {
File targetMap = new File(buildDir, fileName.isEmpty() ? projectConfig.getProjectName() + ".w3x" : fileName + ".w3x");
File compiledScript = compileScript(modelManager, gui, targetMap);

gui.sendProgress("Applying Map Config...");
ProjectConfigBuilder.apply(projectConfig, targetMap, compiledScript, buildDir, runArgs);
if (!runArgs.isDisableMapConfig()) {
gui.sendProgress("Applying Map Config...");
ProjectConfigBuilder.apply(projectConfig, targetMap, compiledScript, buildDir, runArgs);
}

JMpqEditor finalizer = new JMpqEditor(targetMap, MPQOpenOption.FORCE_V0);
finalizer.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ public Object execute(ModelManager modelManager) throws IOException {
mpqEditor.insertFile(mapScriptName, compiledScript);
}

gui.sendProgress("Applying Map Config...");
ProjectConfigBuilder.apply(projectConfig, testMap, compiledScript, buildDir, runArgs);
if (!runArgs.isDisableMapConfig()) {
gui.sendProgress("Applying Map Config...");
ProjectConfigBuilder.apply(projectConfig, testMap, compiledScript, buildDir, runArgs);
}

File mapCopy = copyToWarcraftMapDir(testMap);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class RunArgs {
private RunOption optionMeasureTimes;
private RunOption optionHotStartmap;
private RunOption optionHotReload;
private RunOption optionDisableMapConfig;

private RunOption optionBuild;

Expand Down Expand Up @@ -124,7 +125,7 @@ public RunArgs(String... args) {
addOptionWithArg("workspaceroot", "The next argument should be the root folder of the project to build.", arg -> workspaceroot = arg);
addOptionWithArg("inputmap", "The next argument should be the input map.", arg -> inputmap = arg);
optionLua = addOption("lua", "Choose Lua as the compilation target.");

optionDisableMapConfig = addOption("disableMapConfig", "Disable map configuration when building or running maps");

nextArg:
for (int i = 0; i < args.length; i++) {
Expand Down Expand Up @@ -344,4 +345,7 @@ public boolean isLua() {
return optionLua.isSet;
}

public boolean isDisableMapConfig() {
return optionDisableMapConfig.isSet;
}
}