Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 08323200D3A for ; Wed, 15 Nov 2017 16:15:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0657F160BEA; Wed, 15 Nov 2017 15:15:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4B799160BF6 for ; Wed, 15 Nov 2017 16:15:00 +0100 (CET) Received: (qmail 26908 invoked by uid 500); 15 Nov 2017 15:14:59 -0000 Mailing-List: contact commits-help@royale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@royale.apache.org Delivered-To: mailing list commits@royale.apache.org Received: (qmail 26899 invoked by uid 99); 15 Nov 2017 15:14:59 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Nov 2017 15:14:59 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id C7ED781B47; Wed, 15 Nov 2017 15:14:58 +0000 (UTC) Date: Wed, 15 Nov 2017 15:15:00 +0000 To: "commits@royale.apache.org" Subject: [royale-compiler] 02/02: Use actual source name instead of fixed string MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: erikdebruin@apache.org In-Reply-To: <151075889870.3365.7113801623911132925@gitbox.apache.org> References: <151075889870.3365.7113801623911132925@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: royale-compiler X-Git-Refname: refs/heads/feature/wast X-Git-Reftype: branch X-Git-Rev: b17978dd13f2b931ec0ee078d6e8d21b7a7c6bbb X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20171115151458.C7ED781B47@gitbox.apache.org> archived-at: Wed, 15 Nov 2017 15:15:01 -0000 This is an automated email from the ASF dual-hosted git repository. erikdebruin pushed a commit to branch feature/wast in repository https://gitbox.apache.org/repos/asf/royale-compiler.git commit b17978dd13f2b931ec0ee078d6e8d21b7a7c6bbb Author: Erik de Bruin AuthorDate: Wed Nov 15 15:55:33 2017 +0100 Use actual source name instead of fixed string Signed-off-by: Erik de Bruin --- .../compiler/internal/codegen/wast/WASTPublisher.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/wast/WASTPublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/wast/WASTPublisher.java index f1fb81b..fa2c182 100644 --- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/wast/WASTPublisher.java +++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/wast/WASTPublisher.java @@ -40,6 +40,8 @@ public class WASTPublisher implements IWASTPublisher { private Configuration configuration; + + private String mainProjectFileName; private File outputFolder; private File outputParentFolder; @@ -47,6 +49,7 @@ public class WASTPublisher implements IWASTPublisher { private EnvProperties env; + @Override public File getOutputFolder() { outputParentFolder = new File(configuration.getTargetFileDirectory()).getParentFile(); @@ -65,11 +68,13 @@ public class WASTPublisher implements IWASTPublisher { try { String targetPath = getOutputFolder().getPath(); - String targetWatFilePath = targetPath + "/HelloWorld.wat"; + mainProjectFileName = configuration.getMainDefinition(); + + String targetWatFilePath = targetPath + "/" + mainProjectFileName + ".wat"; env = EnvProperties.initiate(); - String[] cmd = { env.WAT2WASM + "/wat2wasm", targetWatFilePath, "-o", targetPath + "/HelloWorld.wasm" }; + String[] cmd = { env.WAT2WASM + "/wat2wasm", targetWatFilePath, "-o", targetPath + "/" + mainProjectFileName + ".wasm" }; Process p = new ProcessBuilder(cmd).redirectError(Redirect.INHERIT) .redirectOutput(Redirect.INHERIT) @@ -138,7 +143,7 @@ public class WASTPublisher implements IWASTPublisher { htmlFile.append(" \n"); htmlFile.append(" \n"); htmlFile.append("\n"); - htmlFile.append(" Royale WASM\n"); + htmlFile.append(" " + mainProjectFileName + " - Royale WAST\n"); htmlFile.append("\n"); htmlFile.append(" \n"); htmlFile.append("\n"); @@ -150,7 +155,7 @@ public class WASTPublisher implements IWASTPublisher { htmlFile.append("\n"); htmlFile.append("