Skip to content

Commit

Permalink
fix: Arch & pacman use i686 instead of i386 and pkg.tar.xz (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
hleitzell authored and develar committed Jan 21, 2017
1 parent e3ab55b commit 5fe94ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
14 changes: 12 additions & 2 deletions packages/electron-builder/src/platformPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>

generateName(ext: string | null, arch: Arch, deployment: boolean, classifier: string | null = null): string {
let c: string | null = null
let e: string | null = null
if (arch === Arch.x64) {
if (ext === "AppImage") {
c = "x86_64"
Expand All @@ -409,6 +410,12 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
else if (arch === Arch.ia32 && ext === "deb") {
c = "i386"
}
else if (ext === "pacman") {
if (arch === Arch.ia32) {
c = "i686"
}
e = "pkg.tar.xz"
}
else {
c = Arch[arch]
}
Expand All @@ -419,7 +426,10 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
else if (classifier != null) {
c += `-${classifier}`
}
return this.generateName2(ext, c, deployment)
if (e == null) {
e = ext
}
return this.generateName2(e, c, deployment)
}

generateName2(ext: string | null, classifier: string | n, deployment: boolean): string {
Expand Down Expand Up @@ -476,4 +486,4 @@ async function dependencies(dir: string, result: Set<string>): Promise<void> {
result.add(dep.path)
}
}
}
}
5 changes: 4 additions & 1 deletion packages/electron-builder/src/targets/fpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class FpmTarget extends Target {
const args = [
"-s", "dir",
"-t", target,
"--architecture", toLinuxArchString(arch),
"--architecture", (target === "pacman" && arch === Arch.ia32) ? "i686" : toLinuxArchString(arch),
"--name", appInfo.name,
"--force",
"--after-install", scripts[0],
Expand Down Expand Up @@ -133,6 +133,9 @@ export default class FpmTarget extends Target {
if (target === "deb") {
depends = ["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]
}
else if (target === "pacman") {
depends = ["c-ares", "ffmpeg", "gtk3", "http-parser", "libevent", "libvpx", "libxslt", "libxss", "minizip", "nss", "re2", "snappy"]
}
else {
depends = []
}
Expand Down

0 comments on commit 5fe94ee

Please sign in to comment.