How to use the electron-packager function in electron-packager

To help you get started, we’ve selected a few electron-packager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github henryboldi / felony / package.js View on Github external
arch,
    'prune': true,
    'app-version': pkg.version || DEFAULT_OPTS.version,
    'out': `release/${ plat }-${ arch }`,
  })

  if (`${ plat }-${ arch }` === 'darwin-x64') {
    opts['osx-sign'] = {
      app: '/release/darwin-x64/Felony-darwin-x64/Felony.app',
      identity: 'xxxxxxxxx', // Developer ID Application: * (*)
    }
  }

  console.log('opts', opts)

  packager(opts, cb)
}
github electron-userland / electron-forge / packages / api / core / src / api / package.ts View on Github external
if (!packageJSON.version && !packageOpts.appVersion) {
    // eslint-disable-next-line max-len
    warn(interactive, 'Please set "version" or "config.forge.packagerConfig.appVersion" in your application\'s package.json so auto-updates work properly'.yellow);
  }

  if (packageOpts.prebuiltAsar) {
    throw new Error('config.forge.packagerConfig.prebuiltAsar is not supported by Electron Forge');
  }

  await runHook(forgeConfig, 'generateAssets');
  await runHook(forgeConfig, 'prePackage');

  d('packaging with options', packageOpts);

  await packager(packageOpts);

  await runHook(forgeConfig, 'postPackage');

  if (packagerSpinner) packagerSpinner!.succeed();
};
github bluedaniel / Kakapo-app / gulpfile.babel.js / tasks / package.js View on Github external
["linux", "win32", "darwin"].forEach(plat => {
      packager(assign({}, DEFAULT_OPTS, {
        platform: plat,
        arch: "x64",
        out: config.tempDirectory + "/" + plat
      }), () => console.log(plat + " finished!"));
    });
  })
github toyobayashi / mishiro / script / packager.ts View on Github external
}).then(() => {
  return packager(packagerOptions)
}).then(appPaths => {
  let dirName: string | string[] = path.basename(appPaths[0]).split('-')
github Urucas / electron-packager-interactive / lib / index.js View on Github external
function runElectronPackager (settings) {
    log.log('Electron packager settings:')
    log.log(settings)
    packager(settings, (err, appPath) => {
      if (err) {
        return error(err)
      }
      log.ok(`Application packaged successfully to '${appPath}'`)
    })
  }
github zalmoxisus / crossbuilder / gulp / tasks / pack.js View on Github external
gulp.task('pack:electron', () => {
  packager(packagerOptions, function (error, appPath) {
    if (error) throw error;
  });
});
github keybase / client / shared / desktop / package.desktop.tsx View on Github external
prune: true,
  }

  if (plat === 'win32') {
    opts = {
      ...opts,
      'version-string': {
        CompanyName: companyName,
        FileDescription: appName,
        OriginalFilename: appName + '.exe',
        ProductName: appName,
      },
    }
  }

  return packager(opts)
}
github wireapp / wire-desktop / bin / build-tools / lib / build-macos.ts View on Github external
const {commonConfig} = await getCommonConfig(envFileResolved, wireJsonResolved);

  logger.info(`Building ${commonConfig.name} ${commonConfig.version} for macOS ...`);

  const backup = await backupFiles([packageJsonResolved, wireJsonResolved]);
  const packageJsonContent = await fs.readJson(packageJsonResolved);

  await fs.writeJson(
    packageJsonResolved,
    {...packageJsonContent, productName: commonConfig.name, version: commonConfig.version},
    {spaces: 2},
  );
  await fs.writeJson(wireJsonResolved, commonConfig, {spaces: 2});

  try {
    let buildDir = await electronPackager(packagerConfig);

    if (Array.isArray(buildDir)) {
      buildDir = buildDir[0];
    }

    logger.log(`Built app in "${buildDir}".`);

    if (macOSConfig.certNameInstaller) {
      const appFile = path.join(buildDir, `${commonConfig.name}.app`);
      await fs.ensureDir(commonConfig.distDir);
      const pkgFile = path.join(commonConfig.distDir, `${commonConfig.name}.pkg`);

      if (signManually) {
        await manualMacOSSign(appFile, pkgFile, commonConfig, macOSConfig);
      } else {
        await buildPkg({

electron-packager

Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI

BSD-2-Clause
Latest version published 1 year ago

Package Health Score

58 / 100
Full package analysis