Skip to content

Commit

Permalink
Fix use of glob in beforePackHook, as glob has lost its observer
Browse files Browse the repository at this point in the history
parameter in favour of a promise return.
  • Loading branch information
highperformancecoder committed Jan 9, 2024
1 parent 879440d commit c844b27
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions gui-js/beforePackHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ let glob=require('glob');
exports.default = async function(context) {
let p=context.packager;
// if libravel is present in dynamic_libraries, this is a ravel build.
glob.glob(p.info.projectDir+"/dynamic_libraries/libravel.*",function(er,files)
{
if (files.length>0)
{
p.appInfo.productName="ravel";
p.appInfo.sanitizedProductName="ravel";
p.appInfo.productFilename="ravel";
if (p.platform.name==="windows")
p.platformSpecificBuildOptions.icon="apps/minsky-electron/src/assets/RavelLogo.ico"
}
});
let files=glob.globSync(p.info.projectDir+"/dynamic_libraries/libravel.*")
if (files.length>0)
{
console.log('updating appInfo');
p.appInfo.productName="ravel";
p.appInfo.sanitizedProductName="ravel";
p.appInfo.productFilename="ravel";
if (p.platform.name==="windows")
p.platformSpecificBuildOptions.icon="apps/minsky-electron/src/assets/RavelLogo.ico"
}
}

0 comments on commit c844b27

Please sign in to comment.