Skip to content

Commit 99c1025

Browse files
committed
fix(linux): correctly set size of icon converted using openjpeg2
Close #2599
1 parent f799062 commit 99c1025

File tree

9 files changed

+68
-29
lines changed

9 files changed

+68
-29
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"////": "All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).",
3030
"dependencies": {
3131
"7zip-bin": "~3.1.0",
32-
"app-builder-bin": "1.3.6",
32+
"app-builder-bin": "1.3.7",
3333
"archiver": "^2.1.1",
3434
"async-exit-hook": "^2.0.1",
35-
"aws-sdk": "^2.198.0",
35+
"aws-sdk": "^2.199.0",
3636
"bluebird-lst": "^1.0.5",
3737
"chalk": "^2.3.0",
3838
"chromium-pickle-js": "^0.2.0",

packages/builder-util/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"out"
1212
],
1313
"dependencies": {
14-
"app-builder-bin": "1.3.6",
14+
"app-builder-bin": "1.3.7",
1515
"temp-file": "^3.1.1",
1616
"fs-extra-p": "^4.5.2",
1717
"is-ci": "^1.1.0",

packages/builder-util/src/util.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,15 @@ function handleProcess(event: string, childProcess: ChildProcess, command: strin
228228

229229
childProcess.once(event, (code: number) => {
230230
if (log.isDebugEnabled) {
231-
log.debug({
231+
const fields: any = {
232232
command: path.basename(command),
233233
code,
234234
pid: childProcess.pid,
235-
}, "exited")
235+
}
236+
if (out.length > 0) {
237+
fields.out = out
238+
}
239+
log.debug(fields, "exited")
236240
}
237241

238242
if (code === 0) {

packages/electron-builder-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"homepage": "https://github.com/electron-userland/electron-builder",
4343
"dependencies": {
4444
"7zip-bin": "~3.1.0",
45-
"app-builder-bin": "1.3.6",
45+
"app-builder-bin": "1.3.7",
4646
"async-exit-hook": "^2.0.1",
4747
"bluebird-lst": "^1.0.5",
4848
"chromium-pickle-js": "^0.2.0",

packages/electron-builder-lib/src/targets/AppImageTarget.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export default class AppImageTarget extends Target {
4242
const artifactPath = path.join(this.outDir, artifactName)
4343
this.logBuilding("AppImage", artifactPath, arch)
4444

45-
// pax doesn't like dir with leading dot (e.g. `.__appimage`)
4645
const stageDir = await createStageDir(this, packager, arch)
4746
const resourceName = `appimagekit-${this.packager.executableName}`
4847
const installIcons = await this.copyIcons(stageDir.dir, resourceName)

packages/electron-publisher-s3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"dependencies": {
1414
"fs-extra-p": "^4.5.2",
15-
"aws-sdk": "^2.198.0",
15+
"aws-sdk": "^2.199.0",
1616
"mime": "^2.2.0",
1717
"electron-publish": "~0.0.0-semantic-release",
1818
"builder-util": "^0.0.0-semantic-release",

test/out/linux/__snapshots__/linuxPackagerTest.js.snap

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,22 @@ Object {
128128
}
129129
`;
130130

131+
exports[`icons dir with images without size in the filename 1`] = `
132+
Object {
133+
"linux": Array [
134+
Object {
135+
"arch": "x64",
136+
"file": "TestApp-1.1.0-x86_64.AppImage",
137+
"updateInfo": Object {
138+
"blockMapSize": "@blockMapSize",
139+
"sha512": "@sha512",
140+
"size": "@size",
141+
},
142+
},
143+
],
144+
}
145+
`;
146+
131147
exports[`icons from ICNS (mac) 1`] = `
132148
Object {
133149
"linux": Array [

test/src/linux/linuxPackagerTest.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ test.ifNotWindows.ifNotCiMac("AppImage - default icon, custom executable and cus
7474
},
7575
}))
7676

77-
// test prepacked asar also https://github.com/electron-userland/electron-builder/issues/1102
7877
test.ifNotWindows("icons from ICNS (mac)", app({
7978
targets: appImageTarget,
8079
config: {
@@ -92,6 +91,27 @@ test.ifNotWindows("icons from ICNS (mac)", app({
9291
},
9392
}))
9493

94+
test.ifNotWindows("icons dir with images without size in the filename", app({
95+
targets: appImageTarget,
96+
config: {
97+
publish: null,
98+
win: {
99+
// doesn't matter, but just to be sure that presense of this configuration doesn't lead to errors
100+
icon: "icons/icon.ico",
101+
},
102+
},
103+
}, {
104+
projectDirCreated: async projectDir => {
105+
await rename(path.join(projectDir, "build", "icons", "256x256.png"), path.join(projectDir, "build", "icon.png"))
106+
await remove(path.join(projectDir, "build", "icons"))
107+
await rename(path.join(projectDir, "build"), path.join(projectDir, "icons"))
108+
},
109+
packed: async context => {
110+
const projectDir = context.getResources(Platform.LINUX)
111+
await assertThat(projectDir).isDirectory()
112+
},
113+
}))
114+
95115
// test prepacked asar also https://github.com/electron-userland/electron-builder/issues/1102
96116
test.ifNotWindows("icons from ICNS", app({
97117
targets: appImageTarget,

yarn.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -275,25 +275,25 @@ anymatch@^1.3.0:
275275
micromatch "^2.1.5"
276276
normalize-path "^2.0.0"
277277

278-
app-builder-bin-linux@1.3.6:
279-
version "1.3.6"
280-
resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.3.6.tgz#45344c4b09b3c2febc3a452e8916fa00aa645b62"
278+
app-builder-bin-linux@1.3.7:
279+
version "1.3.7"
280+
resolved "https://registry.yarnpkg.com/app-builder-bin-linux/-/app-builder-bin-linux-1.3.7.tgz#9eeb28f7f2c9eb91f4dcd02f03e9117b45891cae"
281281

282-
app-builder-bin-mac@1.3.6:
283-
version "1.3.6"
284-
resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.3.6.tgz#c7df8f4c349292c789e557a285df2279d05b8201"
282+
app-builder-bin-mac@1.3.7:
283+
version "1.3.7"
284+
resolved "https://registry.yarnpkg.com/app-builder-bin-mac/-/app-builder-bin-mac-1.3.7.tgz#43705d9f0c75ef8ac2a07dcf9c31d9c0d3e27770"
285285

286-
app-builder-bin-win@1.3.6:
287-
version "1.3.6"
288-
resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.3.6.tgz#b492c0573cfa4206fb9f33756d6ab844e04ce0b8"
286+
app-builder-bin-win@1.3.7:
287+
version "1.3.7"
288+
resolved "https://registry.yarnpkg.com/app-builder-bin-win/-/app-builder-bin-win-1.3.7.tgz#f5ddef00b0822885fd376f4323aa48c14a5788bf"
289289

290-
app-builder-bin@1.3.6:
291-
version "1.3.6"
292-
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.3.6.tgz#fbc49a3b74917f5e23632c71ea1a3ea9b083424e"
290+
app-builder-bin@1.3.7:
291+
version "1.3.7"
292+
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-1.3.7.tgz#4df1bc9b9448935caaa2f45283655b0704ab994f"
293293
optionalDependencies:
294-
app-builder-bin-linux "1.3.6"
295-
app-builder-bin-mac "1.3.6"
296-
app-builder-bin-win "1.3.6"
294+
app-builder-bin-linux "1.3.7"
295+
app-builder-bin-mac "1.3.7"
296+
app-builder-bin-win "1.3.7"
297297

298298
append-transform@^0.4.0:
299299
version "0.4.0"
@@ -484,9 +484,9 @@ atob@^2.0.0:
484484
version "2.0.3"
485485
resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d"
486486

487-
aws-sdk@^2.198.0:
488-
version "2.198.0"
489-
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.198.0.tgz#2245311337ddc844cc34c13f3fcf3b7ea843f434"
487+
aws-sdk@^2.199.0:
488+
version "2.199.0"
489+
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.199.0.tgz#94c2484b030f299dda494c94bacc4f66e4b32de9"
490490
dependencies:
491491
buffer "4.9.1"
492492
events "^1.1.1"
@@ -3688,8 +3688,8 @@ map-visit@^1.0.0:
36883688
object-visit "^1.0.0"
36893689

36903690
marked@^0.3.12, marked@~0.3.6:
3691-
version "0.3.15"
3692-
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.15.tgz#de96982e54c880962f5093a2fa93d0866bf73668"
3691+
version "0.3.16"
3692+
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.16.tgz#2f188b7dfcfa6540fe9940adaf0f3b791c9a5cba"
36933693

36943694
media-typer@0.3.0:
36953695
version "0.3.0"

0 commit comments

Comments
 (0)