mirror of
https://github.com/atom/atom.git
synced 2026-02-10 14:45:11 -05:00
32 lines
784 B
JavaScript
32 lines
784 B
JavaScript
// This module exports paths, names, and other metadata that is referenced
|
|
// throughout the build.
|
|
|
|
'use strict'
|
|
|
|
const path = require('path')
|
|
|
|
const appMetadata = require('../package.json')
|
|
|
|
const repositoryRootPath = path.resolve(__dirname, '..')
|
|
const buildOutputPath = path.join(repositoryRootPath, 'out')
|
|
|
|
let appName = appMetadata.productName
|
|
const appFileName = appMetadata.name
|
|
|
|
let electronRootPath, electronAppPath
|
|
|
|
switch (process.platform) {
|
|
case 'darwin':
|
|
appName += '.app'
|
|
electronRootPath = path.join(buildOutputPath, appName, 'Contents')
|
|
electronAppPath = path.join(electronRootPath, 'Resources', 'app')
|
|
break;
|
|
}
|
|
|
|
module.exports = {
|
|
appMetadata,
|
|
repositoryRootPath, buildOutputPath,
|
|
appName, appFileName,
|
|
electronRootPath, electronAppPath
|
|
}
|