Skip to content

Commit

Permalink
Fix for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tangb committed Mar 13, 2018
1 parent f75a09f commit 37369f0
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions cleepdesktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,17 +358,31 @@ function launchCore(rpcport)

if( !isDev )
{
//launch release
//launch release mode
logger.debug('Launch release mode');
let commandline = path.join(__dirname + '.unpacked/', 'cleepdesktopcore/cleepdesktopcore');

//prepare command line
let commandline = path.join(__dirname + '.unpacked/', 'cleepdesktopcore/');
logger.info('cmdline with asar: ' + commandline);
if( !require('fs').existsSync(commandline) )
{
commandline = path.join(__dirname, 'cleepdesktopcore/cleepdesktopcore');
commandline = path.join(__dirname, 'cleepdesktopcore/');
logger.info('cmdline without asar: ' + commandline);
}

//append bin name
if( process.platform=='win32' )
{
commandline = path.join(commandline, 'cleepdesktopcore.exe');
}
else
{
commandline = path.join(commandline, 'cleepdesktopcore');
}

//launch command line
let debug = settings.has('cleep.debug') && settings.get('cleep.debug') ? 'debug' : 'release';
logger.debug('Core commandline: '+commandline+' ' + rpcport + ' ' + configPath + ' ' + configFilename + ' ' + debug);
logger.info('Core commandline: '+commandline+' ' + rpcport + ' ' + configPath + ' ' + configFilename + ' ' + debug);
coreProcess = require('child_process').spawn(commandline, [rpcport, configPath, configFilename, 'release', 'false']);
}
else
Expand Down

0 comments on commit 37369f0

Please sign in to comment.