Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rpath-fix.js 570B

123456789101112131415161718192021222324
  1. if (process.platform !== 'darwin') process.exit(0);
  2. const cp = require('child_process');
  3. const path = require('path');
  4. const pathToChromedriver = require.resolve(
  5. 'electron-chromedriver/chromedriver'
  6. );
  7. const pathToChromedriverBin = path.resolve(
  8. pathToChromedriver,
  9. '..',
  10. 'bin',
  11. 'chromedriver'
  12. );
  13. const result = cp.spawnSync(
  14. 'install_name_tool',
  15. ['-add_rpath', '@executable_path/.', pathToChromedriverBin],
  16. {}
  17. );
  18. if (result.status !== 0) {
  19. if (result.stderr.includes('file already has LC_RPATH')) process.exit(0);
  20. process.exit(result.status);
  21. }