Ejemplo n.º 1
0
async function packageAppAsync(signed) {
  await checkNativeModulesVersionAsync();

  let [xdeVersion, electronVersion] = await Promise.all([
    JsonFile.getAsync(path.join(XDE_ROOT, 'package.json'), 'version'),
    getElectronVersionAsync(),
  ]);

  let iconPath = path.join(XDE_ROOT, 'dev/xde.icns');
  let appPath = await electronPackager.promise({
    dir: path.resolve(__dirname, '..'),
    name: APP_NAME,
    platform: PLATFORM,
    arch: ARCH,
    version: electronVersion,
    'app-bundle-id': APP_BUNDLE_ID,
    'app-copyright': `Copyright (c) ${new Date().getFullYear()} Exponent`,
    'build-version': xdeVersion,
    icon: iconPath,
    ignore: [/^\/src(\/|$)/, /^\/\.babelrc$/],
    overwrite: true,
    prune: true,
    'osx-sign': signed ? { identity: CODE_SIGNING_IDENTITY } : null,
    // sign: signed ? CODE_SIGNING_IDENTITY : null,
  });

  logger.info(`Packaged ${signed ? 'signed' : 'unsigned'} app at ${appPath}`);
  return appPath;
}
Ejemplo n.º 2
0
async function packageAppAsync(signed) {
  await checkNativeModulesVersionAsync();

  let electronVersion = await getElectronVersionAsync();
  let iconPath = path.join(XDE_ROOT, 'dev', 'Design', 'xde.icns');

  let appPath = await electronPackager.promise({
    dir: path.resolve(__dirname, '..'),
    name: APP_NAME,
    platform: PLATFORM,
    arch: ARCH,
    version: electronVersion,
    'app-bundle-id': APP_BUNDLE_ID,
    icon: iconPath,
    ignore: [/^\/src(\/|$)/, /^\/\.babelrc$/],
    overwrite: true,
    prune: true,
    sign: signed ? CODE_SIGNING_IDENTITY : null
  });

  logger.info(`Packaged ${signed ? 'signed' : 'unsigned'} app at ${appPath}`);
  return appPath;
}