<s> import os , os . path <EOL> import shutil <EOL> from play . utils import * <EOL> COMMANDS = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> HELP = { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> def execute ( ** kargs ) : <EOL> command = kargs . get ( "<STR_LIT>" ) <EOL> app = kargs . get ( "<STR_LIT>" ) <EOL> args = kargs . get ( "<STR_LIT:args>" ) <EOL> play_env = kargs . get ( "<STR_LIT>" ) <EOL> app . check ( ) <EOL> modules = app . modules ( ) <EOL> classpath = app . getClasspath ( ) <EOL> application_name = app . readConf ( '<STR_LIT>' ) <EOL> imlFile = os . path . join ( app . path , application_name + '<STR_LIT>' ) <EOL> shutil . copyfile ( os . path . join ( play_env [ "<STR_LIT>" ] , '<STR_LIT>' ) , imlFile ) <EOL> cpXML = "<STR_LIT>" <EOL> playHome = play_env [ "<STR_LIT>" ] . replace ( '<STR_LIT:\\>' , '<STR_LIT:/>' ) <EOL> if os . name == '<STR_LIT>' : <EOL> if playHome [ <NUM_LIT:1> : <NUM_LIT:2> ] == '<STR_LIT::>' : <EOL> playHome = playHome [ <NUM_LIT:0> : <NUM_LIT:1> ] . upper ( ) + playHome [ <NUM_LIT:1> : ] <EOL> replaceAll ( imlFile , r'<STR_LIT>' , playHome ) <EOL> replaceAll ( imlFile , r'<STR_LIT>' , play_env [ "<STR_LIT:version>" ] . replace ( '<STR_LIT:\\>' , '<STR_LIT:/>' ) ) <EOL> lXML = "<STR_LIT>" <EOL> mlXML = "<STR_LIT>" <EOL> msXML = "<STR_LIT>" <EOL> jdXML = "<STR_LIT>" <EOL> if os . path . exists ( os . path . join ( app . path , '<STR_LIT>' ) ) : <EOL> mlXML += '<STR_LIT>' <EOL> if len ( modules ) : <EOL> for i , module in enumerate ( modules ) : <EOL> libpath = os . path . join ( module , '<STR_LIT>' ) <EOL> srcpath = os . path . join ( module , '<STR_LIT:src>' ) <EOL> lXML += '<STR_LIT>' % ( module , os . path . join ( module , '<STR_LIT>' ) . replace ( '<STR_LIT:\\>' , '<STR_LIT:/>' ) ) <EOL> if os . path . exists ( srcpath ) : <EOL> msXML += '<STR_LIT>' % ( app . toRelative ( srcpath ) . replace ( '<STR_LIT:\\>' , '<STR_LIT:/>' ) ) <EOL> if os . path . exists ( libpath ) : <EOL> mlXML += '<STR_LIT>' % ( app . toRelative ( libpath ) . replace ( '<STR_LIT:\\>' , '<STR_LIT:/>' ) ) <EOL> jdXML += '<STR_LIT>' % ( app . toRelative ( libpath ) . replace ( '<STR_LIT:\\>' , '<STR_LIT:/>' ) ) <EOL> replaceAll ( imlFile , r'<STR_LIT>' , lXML ) <EOL> replaceAll ( imlFile , r'<STR_LIT>' , mlXML ) <EOL> replaceAll ( imlFile , r'<STR_LIT>' , msXML ) <EOL> replaceAll ( imlFile , r'<STR_LIT>' , jdXML ) <EOL> iprFile = os . path . join ( app . path , application_name + '<STR_LIT>' ) <EOL> if not os . path . exists ( iprFile ) : <EOL> shutil . copyfile ( os . path . join ( play_env [ "<STR_LIT>" ] , '<STR_LIT>' ) , iprFile ) <EOL> replaceAll ( iprFile , r'<STR_LIT>' , application_name ) <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" + application_name + "<STR_LIT>" <EOL> print "<STR_LIT>" </s>
