|
1 |
| -import { AppMetadata, DevMetadata, Platform, PlatformSpecificBuildOptions, Arch, archToString } from "./metadata" |
| 1 | +import { AppMetadata, DevMetadata, Platform, PlatformSpecificBuildOptions, Arch } from "./metadata" |
2 | 2 | import EventEmitter = NodeJS.EventEmitter
|
3 | 3 | import { Promise as BluebirdPromise } from "bluebird"
|
4 | 4 | import * as path from "path"
|
@@ -212,8 +212,8 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
|
212 | 212 |
|
213 | 213 | await BluebirdPromise.all(promises)
|
214 | 214 | }
|
215 |
| - await task(`Packaging for platform ${this.platform.name} ${archToString(arch)} using electron ${this.info.electronVersion} to ${path.relative(this.projectDir, appOutDir)}`, |
216 |
| - pack(options, appOutDir, platformName, archToString(arch), this.info.electronVersion)) |
| 215 | + await task(`Packaging for platform ${this.platform.name} ${Arch[arch]} using electron ${this.info.electronVersion} to ${path.relative(this.projectDir, appOutDir)}`, |
| 216 | + pack(options, appOutDir, platformName, Arch[arch], this.info.electronVersion)) |
217 | 217 |
|
218 | 218 | await this.doCopyExtraFiles(true, appOutDir, arch, platformSpecificBuildOptions)
|
219 | 219 | await this.doCopyExtraFiles(false, appOutDir, arch, platformSpecificBuildOptions)
|
@@ -375,16 +375,12 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
|
375 | 375 | return archiveApp(this.devMetadata.build.compression, format, outFile, this.platform === Platform.MAC ? path.join(appOutDir, `${this.appInfo.productFilename}.app`) : appOutDir)
|
376 | 376 | }
|
377 | 377 |
|
378 |
| - generateName(ext: string | null, arch: Arch, deployment: boolean): string { |
379 |
| - return this.generateName2(ext, arch === Arch.x64 ? null : Arch[arch], deployment) |
380 |
| - } |
381 |
| - |
382 |
| - generateName1(ext: string | null, arch: Arch, classifier: string, deployment: boolean): string { |
383 |
| - let c = arch === Arch.x64 ? null : Arch[arch] |
| 378 | + generateName(ext: string | null, arch: Arch, deployment: boolean, classifier: string | null = null): string { |
| 379 | + let c = arch === Arch.x64 ? (ext === "AppImage" ? "x86_64" : null) : Arch[arch] |
384 | 380 | if (c == null) {
|
385 | 381 | c = classifier
|
386 | 382 | }
|
387 |
| - else { |
| 383 | + else if (classifier != null) { |
388 | 384 | c += `-${classifier}`
|
389 | 385 | }
|
390 | 386 | return this.generateName2(ext, c, deployment)
|
|
0 commit comments