Mailspring/packages/client-app/build/create-signed-windows-installer.js
Juan Tejada a7b1034dc6 [client-app] Prevent NM from overwriting N1 binary on windows
Summary:
This changes the `name` option we pass to `electron-windows-installer`,
which makes it so that the app is installed under
`AppData\Local\NylasMail` instead of `AppData\Local\Nylas` where the
old N1 binary lives

Test Plan: manually tested the builds from `ci-test-4` branch on the surface machine

Reviewers: mark, spang, khamidou, halla

Reviewed By: khamidou, halla

Differential Revision: https://phab.nylas.com/D4419
2017-04-13 11:07:16 -07:00

32 lines
1.1 KiB
JavaScript

/* eslint import/no-dynamic-require:0 */
/**
* NOTE: Due to path issues, this script must be run outside of grunt
* directly from a powershell command.
*/
const path = require('path')
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller
const appDir = path.join(__dirname, "..");
const version = require(path.join(appDir, 'package.json')).version;
const config = {
usePackageJson: false,
outputDirectory: path.join(appDir, 'dist'),
appDirectory: path.join(appDir, 'dist', 'nylas-win32-ia32'),
loadingGif: path.join(appDir, 'build', 'resources', 'win', 'loading.gif'),
iconUrl: 'http://edgehill.s3.amazonaws.com/static/nylas.ico',
certificateFile: process.env.CERTIFICATE_FILE,
certificatePassword: process.env.WINDOWS_CODESIGN_KEY_PASSWORD,
description: "Nylas Mail",
version: version,
title: "nylas",
authors: 'Nylas Inc.',
setupIcon: path.join(appDir, 'build', 'resources', 'win', 'nylas.ico'),
setupExe: 'NylasMailSetup.exe',
exe: 'nylas.exe',
name: 'NylasMail',
}
console.log(config);
console.log("---> Starting")
createWindowsInstaller(config, console.log, console.error)