Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90541830
PhabricatorAphlictManagementBuildWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 2, 14:47
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Nov 4, 14:47 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22094978
Attached To
rPH Phabricator
PhabricatorAphlictManagementBuildWorkflow.php
View Options
<?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'
))
{
throw
new
PhutilArgumentUsageException
(
pht
(
"The `mxmlc` binary was not found in PATH. This compiler binary "
.
"is required to rebuild the Aphlict client.
\n\n
"
.
"Adjust your PATH, or install the Flex SDK from:
\n\n
"
.
" http://flex.apache.org
\n\n
"
.
"You may also be able to install it with `npm`:
\n\n
"
.
" $ npm install flex-sdk
\n\n
"
.
"(Note: you should only need to rebuild Aphlict if you are "
.
"developing Phabricator.)"
));
}
$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
;
}
}
Event Timeline
Log In to Comment