@@ -796,29 +796,25 @@ ipc.on('launchProjectinIDE', function(event, arg) {
796796
797797 // // launch xcode
798798 if ( arg . platform == 'osx' ) {
799- var osxPath = pathTemp . join ( fullPath , arg [ 'projectName' ] + '.xcodeproj' ) ;
799+ var osxPath = pathTemp . join ( fullPath , arg [ 'projectName' ] + '.xcodeproj' ) ;
800800 console . log ( osxPath ) ;
801801 if ( fsTemp . statSync ( osxPath ) . isDirectory ( ) == true ) { // note: .xcodeproj is a folder, not a file
802- var exec = require ( 'child_process' ) . exec ;
803- exec ( 'open ' + osxPath , function callback ( error , stdout , stderr ) {
804- event . sender . send ( 'projectLaunchCompleted' , ( error == null ) ) ;
805- return ;
806- } ) ;
802+ var exec = require ( 'child_process' ) . exec ;
803+ exec ( 'open ' + osxPath , function callback ( error , stdout , stderr ) {
804+ return ;
805+ } ) ;
807806 }
808807 else {
809- // console.log('OSX project file not found!');
810- // event.sender.send('projectLaunchCompleted', false );
811- // return;
808+ console . log ( 'OSX project file not found!' ) ;
812809 }
813- }
814-
815- // linux
816- else if ( arg . platform == 'linux' || arg . platform == 'linux64' ) {
817- // xdg-open $DESTINATION_PATH
818- }
819-
820- // unknown platform
821- else {
810+ } else if ( arg . platform == 'linux' || arg . platform == 'linux64' ) {
811+ var linuxPath = pathTemp . join ( fullPath , arg [ 'projectName' ] + '.cbp' ) ;
812+ console . log ( linuxPath ) ;
813+ var exec = require ( 'child_process' ) . exec ;
814+ exec ( 'xdg-open ' + linuxPath , function callback ( error , stdout , stderr ) {
815+ return ;
816+ } ) ;
817+ } else {
822818 console . log ( "Unsupported platform for Launch feature..." ) ;
823819 event . sender . send ( 'projectLaunchCompleted' , false ) ;
824820 return ;
0 commit comments