royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [royale-asjs] branch feature/wast updated: FLEX_HOME != PLAYERGLOBAL_HOME
Date Wed, 15 Nov 2017 18:22:26 GMT
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 68b68e4  FLEX_HOME != PLAYERGLOBAL_HOME
     new 5ef9077  Merge branch 'feature/wast' of https://github.com/apache/royale-asjs into
wast
68b68e4 is described below

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

    FLEX_HOME != PLAYERGLOBAL_HOME
    
    Signed-off-by: Erik de Bruin <erik@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..4b95b28 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}/${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" <commits@royale.apache.org>'].

Mime
View raw message