Page MenuHomePhabricator

D9338.id.diff
No OneTemporary

D9338.id.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1105,6 +1105,7 @@
'PhabricatorActionView' => 'view/layout/PhabricatorActionView.php',
'PhabricatorAllCapsTranslation' => 'infrastructure/internationalization/translation/PhabricatorAllCapsTranslation.php',
'PhabricatorAnchorView' => 'view/layout/PhabricatorAnchorView.php',
+ 'PhabricatorAphlictManagementBuildWorkflow' => 'applications/aphlict/management/PhabricatorAphlictManagementBuildWorkflow.php',
'PhabricatorAphlictManagementDebugWorkflow' => 'applications/aphlict/management/PhabricatorAphlictManagementDebugWorkflow.php',
'PhabricatorAphlictManagementRestartWorkflow' => 'applications/aphlict/management/PhabricatorAphlictManagementRestartWorkflow.php',
'PhabricatorAphlictManagementStartWorkflow' => 'applications/aphlict/management/PhabricatorAphlictManagementStartWorkflow.php',
@@ -3877,6 +3878,7 @@
'PhabricatorActionView' => 'AphrontView',
'PhabricatorAllCapsTranslation' => 'PhabricatorTranslation',
'PhabricatorAnchorView' => 'AphrontView',
+ 'PhabricatorAphlictManagementBuildWorkflow' => 'PhabricatorAphlictManagementWorkflow',
'PhabricatorAphlictManagementDebugWorkflow' => 'PhabricatorAphlictManagementWorkflow',
'PhabricatorAphlictManagementRestartWorkflow' => 'PhabricatorAphlictManagementWorkflow',
'PhabricatorAphlictManagementStartWorkflow' => 'PhabricatorAphlictManagementWorkflow',
diff --git a/src/applications/aphlict/management/PhabricatorAphlictManagementBuildWorkflow.php b/src/applications/aphlict/management/PhabricatorAphlictManagementBuildWorkflow.php
new file mode 100644
--- /dev/null
+++ b/src/applications/aphlict/management/PhabricatorAphlictManagementBuildWorkflow.php
@@ -0,0 +1,53 @@
+<?php
+
+final class PhabricatorAphlictManagementBuildWorkflow
+ extends PhabricatorAphlictManagementWorkflow {
+
+ public function didConstruct() {
+ $this
+ ->setName('build')
+ ->setSynopsis(pht('Build the Aphlict client.'))
+ ->setArguments(
+ array(
+ array(
+ 'name' => 'debug',
+ 'help' => 'Enable a debug build.',
+ ),
+ ));
+ }
+
+ public function execute(PhutilArgumentParser $args) {
+ $console = PhutilConsole::getConsole();
+ $root = dirname(__FILE__).'/../../../..';
+
+ if (!Filesystem::binaryExists('mxmlc')) {
+ $console->writeErr('`mxmlc` is not installed.');
+ return 1;
+ }
+
+ $argv = array(
+ "-source-path=$root/externals/vegas/src",
+ '-static-link-runtime-shared-libraries=true',
+ '-warnings=true',
+ '-strict=true',
+ );
+
+ if ($args->getArg('debug')) {
+ $argv[] = '-debug=true';
+ }
+
+ list ($err, $stdout, $stderr) = exec_manual('mxmlc %Ls -output=%s %s',
+ $argv,
+ $root.'/webroot/rsrc/swf/aphlict.swf',
+ $root.'/support/aphlict/client/src/AphlictClient.as');
+
+ if ($err) {
+ $console->writeErr($stderr);
+ return 1;
+ }
+
+ $console->writeOut("Done.\n");
+ return 0;
+ }
+
+}
diff --git a/support/aphlict/client/build_aphlict_client.sh b/support/aphlict/client/build_aphlict_client.sh
deleted file mode 100755
--- a/support/aphlict/client/build_aphlict_client.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-BASEDIR=`dirname $0`
-ROOT=`cd $BASEDIR/../../../ && pwd`;
-
-if [ -z "$MXMLC" ]; then
- echo "ERROR: Define environmental variable MXMLC to point to 'mxmlc' binary.";
- exit 1;
-fi;
-
-set -e
-
-$MXMLC \
- -output=$ROOT/webroot/rsrc/swf/aphlict.swf \
- -strict=true \
- -warnings=true \
- -source-path=$ROOT/externals/vegas/src \
- -static-link-runtime-shared-libraries=true \
- $BASEDIR/src/AphlictClient.as
diff --git a/support/aphlict/server/aphlict_launcher.php b/support/aphlict/server/aphlict_launcher.php
--- a/support/aphlict/server/aphlict_launcher.php
+++ b/support/aphlict/server/aphlict_launcher.php
@@ -22,5 +22,6 @@
new PhabricatorAphlictManagementStopWorkflow(),
new PhabricatorAphlictManagementRestartWorkflow(),
new PhabricatorAphlictManagementDebugWorkflow(),
+ new PhabricatorAphlictManagementBuildWorkflow(),
new PhutilHelpArgumentWorkflow(),
));

File Metadata

Mime Type
text/plain
Expires
Sat, May 18, 9:12 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6274488
Default Alt Text
D9338.id.diff (4 KB)

Event Timeline