Commit bb63e4b3 authored by Pouya Kary's avatar Pouya Kary

Added build tools to extens macOS info.plist file

parent 9fae269f
......@@ -12,7 +12,7 @@
"CFBundleTypeExtensions": [
"orchestra"
],
"CFBundleTypeIconFile": "code_file.icns"
"CFBundleTypeIconFile": "app/file-icon.icns"
}
],
"CFBundleURLTypes": [
......
......@@ -21,6 +21,7 @@
const mv = require('mv')
const packageJson = require('./package.json')
const path = require('path')
const plist = require('plist')
const request = require('request')
const ugly = require('gulp-uglify')
const util = require('util')
......@@ -289,7 +290,28 @@
}
function updateDarwinInfoPlistFile ( ) {
// data
const plistFilePath = (( packageJson.productName !== 'Orchestra Nightly' )
? '_release/Orchestra-darwin-x64/Orchestra.app/Contents/Info.plist'
: '_release/Orchestra Nightly-darwin-x64/Orchestra.app/Contents/Info.plist'
)
// loading the info file
const plistFileString =
fs.readFileSync( plistFilePath, 'utf8' )
const infoJSON =
plist.parse( plistFileString )
// adding stuff to the plist data
const newInfoJSON =
Object.assign( infoJSON, darwinInfoPlistBase )
// making new plist info
const newPlistFileString =
plist.build( newInfoJSON )
// done, now saving it back
fs.writeFileSync( plistFilePath, newPlistFileString )
}
//
......
......@@ -33,6 +33,7 @@
"gulp-uglify": "1.5.3",
"less": "2.7.1",
"mv": "^2.1.1",
"plist": "^2.1.0",
"sloc": "0.1.10",
"yargs": "^6.4.0"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment