mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Remove obsolete configuration properties
This commit is contained in:
parent
45b0836ac6
commit
f0637fda41
|
@ -86,10 +86,6 @@ public final class TeaVMRunner {
|
||||||
.withDescription("how to attach runtime. Possible values are: separate|merge|none")
|
.withDescription("how to attach runtime. Possible values are: separate|merge|none")
|
||||||
.withLongOpt("runtime")
|
.withLongOpt("runtime")
|
||||||
.create("r"));
|
.create("r"));
|
||||||
options.addOption(OptionBuilder
|
|
||||||
.withDescription("causes TeaVM to include default main page")
|
|
||||||
.withLongOpt("mainpage")
|
|
||||||
.create());
|
|
||||||
options.addOption(OptionBuilder
|
options.addOption(OptionBuilder
|
||||||
.withDescription("Generate debug information")
|
.withDescription("Generate debug information")
|
||||||
.withLongOpt("debug")
|
.withLongOpt("debug")
|
||||||
|
@ -185,9 +181,6 @@ public final class TeaVMRunner {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (commandLine.hasOption("mainpage")) {
|
|
||||||
tool.setMainPageIncluded(true);
|
|
||||||
}
|
|
||||||
if (commandLine.hasOption('g')) {
|
if (commandLine.hasOption('g')) {
|
||||||
tool.setDebugInformationGenerated(true);
|
tool.setDebugInformationGenerated(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,8 @@ import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
import java.io.Reader;
|
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -77,7 +75,6 @@ public class TeaVMTool implements BaseTeaVMTool {
|
||||||
private String mainClass;
|
private String mainClass;
|
||||||
private RuntimeCopyOperation runtime = RuntimeCopyOperation.SEPARATE;
|
private RuntimeCopyOperation runtime = RuntimeCopyOperation.SEPARATE;
|
||||||
private Properties properties = new Properties();
|
private Properties properties = new Properties();
|
||||||
private boolean mainPageIncluded;
|
|
||||||
private boolean debugInformationGenerated;
|
private boolean debugInformationGenerated;
|
||||||
private boolean sourceMapsFileGenerated;
|
private boolean sourceMapsFileGenerated;
|
||||||
private boolean sourceFilesCopied;
|
private boolean sourceFilesCopied;
|
||||||
|
@ -155,14 +152,6 @@ public class TeaVMTool implements BaseTeaVMTool {
|
||||||
this.runtime = runtime;
|
this.runtime = runtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMainPageIncluded() {
|
|
||||||
return mainPageIncluded;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMainPageIncluded(boolean mainPageIncluded) {
|
|
||||||
this.mainPageIncluded = mainPageIncluded;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDebugInformationGenerated() {
|
public boolean isDebugInformationGenerated() {
|
||||||
return debugInformationGenerated;
|
return debugInformationGenerated;
|
||||||
}
|
}
|
||||||
|
@ -524,17 +513,6 @@ public class TeaVMTool implements BaseTeaVMTool {
|
||||||
if (runtime == RuntimeCopyOperation.SEPARATE) {
|
if (runtime == RuntimeCopyOperation.SEPARATE) {
|
||||||
resourceToFile("org/teavm/backend/javascript/runtime.js", "runtime.js");
|
resourceToFile("org/teavm/backend/javascript/runtime.js", "runtime.js");
|
||||||
}
|
}
|
||||||
if (mainPageIncluded) {
|
|
||||||
String text;
|
|
||||||
try (Reader reader = new InputStreamReader(classLoader.getResourceAsStream(
|
|
||||||
"org/teavm/tooling/main.html"), "UTF-8")) {
|
|
||||||
text = IOUtils.toString(reader).replace("${classes.js}", getResolvedTargetFileName());
|
|
||||||
}
|
|
||||||
File mainPageFile = new File(targetDirectory, "main.html");
|
|
||||||
try (Writer mainPageWriter = new OutputStreamWriter(new FileOutputStream(mainPageFile), "UTF-8")) {
|
|
||||||
mainPageWriter.append(text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copySourceFiles() {
|
private void copySourceFiles() {
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
<!--
|
|
||||||
Copyright 2013 Alexey Andreev.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script type="text/javascript" src="runtime.js"></script>
|
|
||||||
<script type="text/javascript" src="${classes.js}"></script>
|
|
||||||
</head>
|
|
||||||
<body onload="main()">
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -51,9 +51,6 @@ public class TeaVMCompileMojo extends AbstractTeaVMMojo {
|
||||||
@Parameter
|
@Parameter
|
||||||
private String mainClass;
|
private String mainClass;
|
||||||
|
|
||||||
@Parameter
|
|
||||||
private boolean mainPageIncluded;
|
|
||||||
|
|
||||||
@Parameter
|
@Parameter
|
||||||
private ClassAlias[] classAliases;
|
private ClassAlias[] classAliases;
|
||||||
|
|
||||||
|
@ -92,7 +89,6 @@ public class TeaVMCompileMojo extends AbstractTeaVMMojo {
|
||||||
tool.setLog(new MavenTeaVMToolLog(log));
|
tool.setLog(new MavenTeaVMToolLog(log));
|
||||||
try {
|
try {
|
||||||
tool.setMainClass(mainClass);
|
tool.setMainClass(mainClass);
|
||||||
tool.setMainPageIncluded(mainPageIncluded);
|
|
||||||
tool.setRuntime(runtime);
|
tool.setRuntime(runtime);
|
||||||
if (!targetFileName.isEmpty()) {
|
if (!targetFileName.isEmpty()) {
|
||||||
tool.setTargetFileName(targetFileName);
|
tool.setTargetFileName(targetFileName);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user