diff --git a/package.json b/package.json index 5c4bf09a93b..00b59a95128 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "cuint": "^0.2.2", "debug": "^2.3.2", "electron-download": "2.1.2", - "electron-macos-sign": "~1.2.3", + "electron-macos-sign": "~1.3.2", "fs-extra-p": "^2.0.6", "hosted-git-info": "^2.1.5", "ini": "^1.3.4", @@ -134,7 +134,7 @@ [ "transform-inline-imports-commonjs", { - "excludeModules": "path" + "excludeModules": ["path"] } ] ] diff --git a/src/appInfo.ts b/src/appInfo.ts index 58555e4d971..0cbbf144b2d 100644 --- a/src/appInfo.ts +++ b/src/appInfo.ts @@ -66,13 +66,7 @@ export class AppInfo { } get copyright(): string { - const metadata = this.devMetadata.build - const old = (metadata)["app-copyright"] - if (old != null) { - warn('"app-copyright" is deprecated — please use "copyright" instead') - } - - const copyright = metadata.copyright || old + const copyright = this.devMetadata.build.copyright if (copyright != null) { return copyright } diff --git a/src/packager.ts b/src/packager.ts index 0a8751546a2..ef60118f474 100644 --- a/src/packager.ts +++ b/src/packager.ts @@ -202,7 +202,13 @@ export class Packager implements BuildInfo { throw new Error("osx-sign is deprecated and not supported — please see https://github.com/electron-userland/electron-builder/wiki/Code-Signing") } if (build["osx"] != null) { - throw new Error(`"osx" in the "build" is deprecated and not supported — please see use "mac" instead`) + throw new Error(`build.osx is deprecated and not supported — please use build.mac instead`) + } + if (build["app-copyright"] != null) { + throw new Error(`build.app-copyright is deprecated and not supported — please use build.copyright instead`) + } + if (build["app-category-type"] != null) { + throw new Error(`build.app-category-type is deprecated and not supported — please use build.mac.category instead`) } const author = appMetadata.author @@ -218,10 +224,6 @@ export class Packager implements BuildInfo { throw new Error(`'directories' in the 'build' is not correct. Please move 'directories' from 'build' to root`) } - if (build.osx != null) { - warn('"build.osx" is deprecated — please use "mac" instead of "osx"') - } - if (build.prune != null) { warn("prune is deprecated — development dependencies are never copied in any case") } diff --git a/src/packager/mac.ts b/src/packager/mac.ts index 3b786b98c03..5c389598b46 100644 --- a/src/packager/mac.ts +++ b/src/packager/mac.ts @@ -1,4 +1,4 @@ -import { rename, readFile, writeFile, copy, unlink } from "fs-extra-p" +import { rename, readFile, writeFile, copy, unlink, utimes } from "fs-extra-p" import * as path from "path" import { parse as parsePlist, build as buildPlist } from "plist" import BluebirdPromise from "bluebird-lst-c" @@ -117,14 +117,8 @@ export async function createApp(packager: PlatformPackager, appOutDir: stri }) } - const oldCategory = (buildMetadata)["app-category-type"] - if (oldCategory != null) { - warn("app-category-type is deprecated, please set as build.mac.category") - } - - let category = packager.platformSpecificBuildOptions.category || (buildMetadata).category || oldCategory - use(category || oldCategory, it => appPlist.LSApplicationCategoryType = it) - use(appInfo.copyright, it => appPlist.NSHumanReadableCopyright = it) + use(packager.platformSpecificBuildOptions.category || (buildMetadata).category, it => appPlist.LSApplicationCategoryType = it) + appPlist.NSHumanReadableCopyright = appInfo.copyright const promises: Array> = [ writeFile(appPlistFilename, buildPlist(appPlist)), @@ -142,5 +136,9 @@ export async function createApp(packager: PlatformPackager, appOutDir: stri await BluebirdPromise.all(promises) await moveHelpers(frameworksPath, appFilename) - await rename(path.dirname(contentsPath), path.join(appOutDir, `${appFilename}.app`)) + const appPath = path.join(appOutDir, `${appFilename}.app`) + await rename(path.dirname(contentsPath), appPath) + // https://github.com/electron-userland/electron-builder/issues/840 + const now = Date.now() / 1000 + await utimes(appPath, now, now) } \ No newline at end of file diff --git a/src/targets/fpm.ts b/src/targets/fpm.ts index 3d1891c9168..86054f29a21 100644 --- a/src/targets/fpm.ts +++ b/src/targets/fpm.ts @@ -35,7 +35,7 @@ export default class FpmTarget extends TargetEx { private readonly desktopEntry: Promise constructor(name: string, private packager: LinuxPackager, private helper: LinuxTargetHelper, private outDir: string) { - super(name) + super(name, false) this.scriptFiles = this.createScripts() this.desktopEntry = helper.computeDesktopEntry(this.options)