mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Allow Atom to be installed on OS X
This commit is contained in:
parent
518c02e329
commit
af9fd41723
@ -12,6 +12,7 @@ const copyAssets = require('./lib/copy-assets')
|
||||
const dumpSymbols = require('./lib/dump-symbols')
|
||||
const generateMetadata = require('./lib/generate-metadata')
|
||||
const generateModuleCache = require('./lib/generate-module-cache')
|
||||
const installApplication = require('./lib/install-application')
|
||||
const packageApplication = require('./lib/package-application')
|
||||
const prebuildLessCache = require('./lib/prebuild-less-cache')
|
||||
const transpileBabelPaths = require('./lib/transpile-babel-paths')
|
||||
@ -41,4 +42,10 @@ dumpSymbols()
|
||||
} else {
|
||||
console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing...')
|
||||
}
|
||||
|
||||
if (argv.install) {
|
||||
installApplication(packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping installation. Specify the --install option to install Atom...')
|
||||
}
|
||||
})
|
||||
|
19
script/lib/install-application.js
Normal file
19
script/lib/install-application.js
Normal file
@ -0,0 +1,19 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('fs-extra')
|
||||
const path = require('path')
|
||||
|
||||
module.exports = function (packagedAppPath) {
|
||||
if (process.platform === 'darwin') {
|
||||
const packagedAppPathFileName = path.basename(packagedAppPath)
|
||||
const installationDirPath = path.join(path.sep, 'Applications', packagedAppPathFileName)
|
||||
if (fs.existsSync(installationDirPath)) {
|
||||
console.log(`Removing previously installed ${packagedAppPathFileName} at ${installationDirPath}...`)
|
||||
fs.removeSync(installationDirPath)
|
||||
}
|
||||
console.log(`Installing ${packagedAppPath} at ${installationDirPath}...`)
|
||||
fs.copySync(packagedAppPath, installationDirPath)
|
||||
} else {
|
||||
throw new Error("Not implemented yet.")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user