Skip to content

Commit

Permalink
Build script fixes
Browse files Browse the repository at this point in the history
* Made file copy less spammy
* Made cpp build wait for cef unzip
* Made copy wait for cpp build (which it probably was anyway.)
  • Loading branch information
JoeLudwig committed Nov 17, 2019
1 parent 0fb5b9f commit e6b51ab
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ async function cppBuild()

async function copyDir( from, to )
{
if ( verbose )
{
console.log( `Copying ${ from } to ${ to }` );
}

ensureDirExists( to );
let fromDir = fs.opendirSync( from );
let ent
while( ent = fromDir.readSync() )
{
if ( verbose )
{
console.log( "Copying", ent.name );
}

let fromPath = path.resolve( from, ent.name );
let toPath = path.resolve( to, ent.name );
if( ent.isDirectory() )
Expand All @@ -142,8 +142,7 @@ async function copyDir( from, to )
fs.copyFileSync( fromPath, toPath );
}
}


fromDir.closeSync();
}

async function copyRelease()
Expand All @@ -168,9 +167,9 @@ async function runBuild()

runCommand( "npm", ["install"], webDir, 60, "npm install" );
runCommand( "npm", ["run", "build"], webDir, 30, "web build" );
unzipCef();
cppBuild();
copyRelease();
await unzipCef();
await cppBuild();
await copyRelease();

console.log( "build finished" );
}
Expand Down

0 comments on commit e6b51ab

Please sign in to comment.