I finally managed to make it work by
- storing myprogram.exe in the root directory,
- keeping the original file package.json, and
- adding in forge.config.js:
module.exports = {
packagerConfig: {
asar: true,
extraResource: ['myprogram.exe']
},
Note that there is no final "s" in ExtraResource