Skip to content

Commit de1ea75

Browse files
authored
Revert "feat: allow riscv64 support via custom electron dist (#8143)" (#8427)
This reverts commit b306895.
1 parent b306895 commit de1ea75

File tree

8 files changed

+4
-30
lines changed

8 files changed

+4
-30
lines changed

.changeset/stupid-avocados-appear.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/api/electron-builder.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Developer API only. See [Configuration](../configuration/configuration.md) for u
3636
<li><strong><code id="Arch-armv7l">armv7l</code></strong></li>
3737
<li><strong><code id="Arch-arm64">arm64</code></strong></li>
3838
<li><strong><code id="Arch-universal">universal</code></strong></li>
39-
<li><strong><code id="Arch-riscv64">riscv64</code></strong></li>
4039
</ul>
4140
<p><a name="module_electron-builder.build"></a></p>
4241
<h2 id="electron-builder.build(rawoptions)-%E2%87%92-promise%3Carray%3Cstring%3E%3E"><code>electron-builder.build(rawOptions)</code> ⇒ <code>Promise&lt;Array&lt;String&gt;&gt;</code></h2>

packages/app-builder-lib/scheme.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@
311311
"arm64",
312312
"armv7l",
313313
"ia32",
314-
"riscv64",
315314
"universal",
316315
"x64"
317316
],
@@ -5942,7 +5941,6 @@
59425941
"arm64",
59435942
"armv7l",
59445943
"ia32",
5945-
"riscv64",
59465944
"universal",
59475945
"x64"
59485946
],

packages/app-builder-lib/src/linuxPackager.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export function toAppImageOrSnapArch(arch: Arch): string {
8181
return "arm"
8282
case Arch.arm64:
8383
return "arm_aarch64"
84-
case Arch.riscv64:
85-
return "riscv64"
8684

8785
default:
8886
throw new Error(`Unsupported arch ${arch}`)

packages/app-builder-lib/src/targets/snap.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,6 @@ function archNameToTriplet(arch: Arch): string {
328328
return "arm-linux-gnueabihf"
329329
case Arch.arm64:
330330
return "aarch64-linux-gnu"
331-
case Arch.riscv64:
332-
return "riscv64-linux-gnu"
333331

334332
default:
335333
throw new Error(`Unsupported arch ${arch}`)

packages/builder-util/src/arch.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ export enum Arch {
44
armv7l,
55
arm64,
66
universal,
7-
riscv64,
87
}
98

10-
export type ArchType = "x64" | "ia32" | "armv7l" | "arm64" | "universal" | "riscv64"
9+
export type ArchType = "x64" | "ia32" | "armv7l" | "arm64" | "universal"
1110

1211
export function toLinuxArchString(arch: Arch, targetName: string): string {
1312
switch (arch) {
@@ -19,15 +18,14 @@ export function toLinuxArchString(arch: Arch, targetName: string): string {
1918
return targetName === "snap" || targetName === "deb" ? "armhf" : targetName === "flatpak" ? "arm" : "armv7l"
2019
case Arch.arm64:
2120
return targetName === "pacman" || targetName === "rpm" || targetName === "flatpak" ? "aarch64" : "arm64"
22-
case Arch.riscv64:
23-
return "riscv64"
21+
2422
default:
2523
throw new Error(`Unsupported arch ${arch}`)
2624
}
2725
}
2826

2927
export function getArchCliNames(): Array<string> {
30-
return [Arch[Arch.ia32], Arch[Arch.x64], Arch[Arch.armv7l], Arch[Arch.arm64], Arch[Arch.riscv64]]
28+
return [Arch[Arch.ia32], Arch[Arch.x64], Arch[Arch.armv7l], Arch[Arch.arm64]]
3129
}
3230

3331
export function getArchSuffix(arch: Arch, defaultArch?: string): string {
@@ -47,8 +45,6 @@ export function archFromString(name: string): Arch {
4745
return Arch.armv7l
4846
case "universal":
4947
return Arch.universal
50-
case "riscv64":
51-
return Arch.riscv64
5248
default:
5349
throw new Error(`Unsupported arch ${name}`)
5450
}

packages/electron-builder/src/builder.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export interface CliOptions extends PackagerOptions, PublishOptions {
1818
armv7l?: boolean
1919
arm64?: boolean
2020
universal?: boolean
21-
riscv64?: boolean
2221

2322
dir?: boolean
2423
}
@@ -49,9 +48,6 @@ export function normalizeOptions(args: CliOptions): BuildOptions {
4948
if (args.universal) {
5049
result.push(Arch.universal)
5150
}
52-
if (args.riscv64) {
53-
result.push(Arch.riscv64)
54-
}
5551

5652
return result.length === 0 && currentIfNotSpecified ? [archFromString(process.arch)] : result
5753
}

test/src/helpers/downloadElectron.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,13 @@ export function downloadAllRequiredElectronVersions(): Promise<any> {
4242

4343
const versions: Array<any> = []
4444
for (const platform of platforms) {
45-
const archs =
45+
const archs: string[] =
4646
platform === "mas" || platform === "darwin"
4747
? ["x64"]
4848
: platform === "win32"
4949
? ["ia32", "x64"]
5050
: require(`${path.join(__dirname, "../../..")}/packages/builder-util/out/util`).getArchCliNames()
5151
for (const arch of archs) {
52-
if (arch === "riscv64") {
53-
// No prebuilt electron for riscv64
54-
continue
55-
}
5652
if (gte(ELECTRON_VERSION, "19.0.0") && platform === "linux" && arch === "ia32") {
5753
// Chromium dropped support for ia32 linux binaries in 102.0.4999.0
5854
// https://www.electronjs.org/docs/latest/breaking-changes#removed-ia32-linux-binaries

0 commit comments

Comments
 (0)