Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15480182
D9338.id22479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D9338.id22479.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 9, 12:30 PM (2 w, 5 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7586651
Default Alt Text
D9338.id22479.diff (4 KB)
Attached To
Mode
D9338: Add a `./bin/aphlict build` workflow.
Attached
Detach File
Event Timeline
Log In to Comment