1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 05:10:05 +02:00

update dependencies

This commit is contained in:
s2
2018-10-09 09:51:34 +02:00
parent 4fcc873901
commit da4083f574
1112 changed files with 23205 additions and 21697 deletions

View File

@@ -31,6 +31,10 @@ class MacApp extends App {
return this.opts.buildVersion
}
get enableDarkMode () {
return this.opts.darwinDarkModeSupport
}
get protocols () {
return this.opts.protocols.map((protocol) => {
return {
@@ -147,25 +151,22 @@ class MacApp extends App {
determinePlistFilesToUpdate () {
const appPlistFilename = path.join(this.contentsPath, 'Info.plist')
const helperPlistFilename = this.ehPlistFilename('Electron Helper.app')
const helperEHPlistFilename = this.ehPlistFilename('Electron Helper EH.app')
const helperNPPlistFilename = this.ehPlistFilename('Electron Helper NP.app')
const loginHelperPlistFilename = this.helperPlistFilename(this.loginHelperPath)
const plists = [
[appPlistFilename, 'appPlist'],
[helperPlistFilename, 'helperPlist'],
[helperEHPlistFilename, 'helperEHPlist'],
[helperNPPlistFilename, 'helperNPPlist']
[this.ehPlistFilename('Electron Helper.app'), 'helperPlist']
]
return fs.pathExists(loginHelperPlistFilename)
.then(exists => {
if (exists) {
plists.push([loginHelperPlistFilename, 'loginHelperPlist'])
}
return plists
})
const possiblePlists = [
[this.ehPlistFilename('Electron Helper EH.app'), 'helperEHPlist'],
[this.ehPlistFilename('Electron Helper NP.app'), 'helperNPPlist'],
[this.helperPlistFilename(this.loginHelperPath), 'loginHelperPlist']
]
return Promise.all(possiblePlists.map(item =>
fs.pathExists(item[0])
.then(exists => exists ? item : null)
)).then(optional => plists.concat(optional.filter(item => item)))
}
updatePlistFiles () {
@@ -182,8 +183,12 @@ class MacApp extends App {
.then(() => {
this.appPlist = this.updatePlist(this.appPlist, this.executableName, appBundleIdentifier, this.appName)
this.helperPlist = this.updateHelperPlist(this.helperPlist)
this.helperEHPlist = this.updateHelperPlist(this.helperEHPlist, 'EH')
this.helperNPPlist = this.updateHelperPlist(this.helperNPPlist, 'NP')
if (this.helperEHPlist) {
this.helperEHPlist = this.updateHelperPlist(this.helperEHPlist, 'EH')
}
if (this.helperNPPlist) {
this.helperNPPlist = this.updateHelperPlist(this.helperNPPlist, 'NP')
}
if (this.loginHelperPlist) {
const loginHelperName = common.sanitizeAppName(`${this.appName} Login Helper`)
@@ -212,6 +217,10 @@ class MacApp extends App {
this.appPlist.NSHumanReadableCopyright = this.appCopyright
}
if (this.enableDarkMode) {
this.appPlist.NSRequiresAquaSystemAppearance = false
}
return Promise.all(plists.map(plistArgs => {
const filename = plistArgs[0]
const varName = plistArgs[1]
@@ -229,10 +238,24 @@ class MacApp extends App {
moveHelper (helperDirectory, suffix) {
const originalBasename = `Electron${suffix}`
const newBasename = `${common.sanitizeAppName(this.appName)}${suffix}`
return fs.pathExists(path.join(helperDirectory, `${originalBasename}.app`))
.then(exists => {
if (exists) {
return this.renameHelperAndExecutable(
helperDirectory,
originalBasename,
`${common.sanitizeAppName(this.appName)}${suffix}`
)
} else {
return Promise.resolve()
}
})
}
renameHelperAndExecutable (helperDirectory, originalBasename, newBasename) {
const originalAppname = `${originalBasename}.app`
const executableBasePath = path.join(helperDirectory, originalAppname, 'Contents', 'MacOS')
return this.relativeRename(executableBasePath, originalBasename, newBasename)
.then(() => this.relativeRename(helperDirectory, originalAppname, `${newBasename}.app`))
}