@@ -2,6 +2,8 @@ const path = require('path');
22const { promises : fs } = require ( 'fs' ) ;
33const { spawn : spawnSync } = require ( 'child_process' ) ;
44
5+ const { getTargetArch } = require ( './utils/getTarget' ) ;
6+
57const spawn = ( ...args ) => new Promise ( ( resolve , reject ) => {
68 let stdout = Buffer . alloc ( 0 ) ;
79 let stderr = Buffer . alloc ( 0 ) ;
@@ -27,12 +29,13 @@ const exists = async (filePath) => fs.access(filePath).then(() => true).catch(e
2729module . exports . exists = exists ;
2830
2931const exe = process . platform === 'win32' ? '.exe' : '' ;
30- const paths = {
32+ const getPaths = ( arch ) => ( {
3133 submodule : path . join ( __dirname , 'deps' , 'dump_syms' ) ,
32- bin : path . join ( __dirname , 'bin' , `${ process . platform } -${ process . arch } ` ) ,
34+ bin : path . join ( __dirname , 'bin' , `${ process . platform } -${ arch } ` ) ,
3335 build : path . join ( __dirname , 'build' ) ,
3436 exeOut : path . join ( __dirname , 'build' , 'release' , `dump_syms${ exe } ` ) ,
35- exeFinal : path . join ( __dirname , 'bin' , `${ process . platform } -${ process . arch } ` , `dump_syms${ exe } ` ) ,
36- } ;
37+ exeFinal : path . join ( __dirname , 'bin' , `${ process . platform } -${ arch } ` , `dump_syms${ exe } ` ) ,
38+ } ) ;
3739
38- module . exports . paths = paths ;
40+ module . exports . runtimePaths = getPaths ( process . arch ) ;
41+ module . exports . buildPaths = getPaths ( getTargetArch ( ) ) ;
0 commit comments