You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by er...@apache.org on 2017/11/15 18:18:54 UTC

[royale-asjs] branch feature/wast updated: FLEX_HOME != PLAYERGLOBAL_HOME

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-asjs.git


The following commit(s) were added to refs/heads/feature/wast by this push:
     new ae2e360  FLEX_HOME != PLAYERGLOBAL_HOME
ae2e360 is described below

commit ae2e360cf0b8fff06ac82bb4e53da462a702b06e
Author: Erik de Bruin <er...@ixsoftware.nl>
AuthorDate: Wed Nov 15 19:18:47 2017 +0100

    FLEX_HOME != PLAYERGLOBAL_HOME
    
    Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
---
 wast/resources/build.js | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/wast/resources/build.js b/wast/resources/build.js
index b56a753..64d360b 100644
--- a/wast/resources/build.js
+++ b/wast/resources/build.js
@@ -19,7 +19,7 @@
 
 'use strict';
 
-let args, cmd, exec, fs, playerVersion, royaleHome, wastc;
+let args, cmd, exec, fs, playerHome, playerVersion, royaleHome, wastc;
 
 
 
@@ -63,6 +63,17 @@ if (!fs.existsSync(wastc)) {
   process.exit();
 }
 
+playerHome = args['playerglobal-home'];
+if (!playerHome || '' === playerHome) {
+  playerHome = process.env.PLAYERGLOBAL_HOME;
+  if (!playerHome || '' === playerHome) {
+    console.log('PLAYERGLOBAL_HOME is not defined. Create an environment variable (PLAYERGLOBAL_HOME) and point it to the skd dir, or use \'npm run build -- -playerglobal-home=[playerglobal dir]\'.');
+
+    process.exit();
+  }
+}
+console.log('PLAYERGLOBAL_HOME is ' + playerHome);
+
 playerVersion = args['player-version'];
 if (!playerVersion || '' === playerVersion) {
   playerVersion = process.env.PLAYERGLOBAL_VERSION;
@@ -75,13 +86,13 @@ if (!playerVersion || '' === playerVersion) {
   console.log('PLAYERGLOBAL_VERSION is ' + playerVersion + '.');
 }
 
-if (!fs.existsSync(royaleHome + '/frameworks/libs/player/' + playerVersion + '/playerglobal.swc')) {
-  console.log('\'playerglobal.swc\' could not be found. Make sure you have set ROYALE_HOME to a fully built sdk.');
+if (!fs.existsSync(playerHome + '/' + playerVersion + '/playerglobal.swc')) {
+  console.log('\'playerglobal.swc\' could not be found. Make sure you have set PLAYERGLOBAL_HOME to a correctly downloaded and stored playerglobal.swc');
 
   process.exit();
 }
 
-cmd = `/usr/bin/java -Xmx384m -Dsun.io.useCanonCaches=false -jar "${wastc}" -external-library-path="${royaleHome}/frameworks/libs/player/${playerVersion}/playerglobal.swc" ${args['src']}`;
+cmd = `/usr/bin/java -Xmx384m -Dsun.io.useCanonCaches=false -jar "${wastc}" -external-library-path="${playerHome}/frameworks/libs/player/${playerVersion}/playerglobal.swc" ${args['src']}`;
 
 exec(cmd, function (error, stdout, stderr) {
   console.log(stdout);

-- 
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <co...@royale.apache.org>'].