Fix unsigned Windows desktop icon
This commit is contained in:
1 parent
0b3ec20d55
commit
9a1c2df51e
2 files changed
+23
-2
No files matched your search
@@ -410,6 +410,25 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
|
||||
}).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
|
||||
);
|
||||
|
||||
it.effect("keeps executable resource editing enabled for unsigned Windows builds", () =>
|
||||
Effect.gen(function* () {
|
||||
const config = yield* createBuildConfig(
|
||||
"win",
|
||||
"nsis",
|
||||
"1.2.3",
|
||||
false,
|
||||
false,
|
||||
undefined,
|
||||
undefined,
|
||||
);
|
||||
|
||||
const win = config.win as Record<string, unknown>;
|
||||
assert.equal(win.icon, "icon.ico");
|
||||
assert.equal(win.signAndEditExecutable, true);
|
||||
assert.notProperty(win, "azureSignOptions");
|
||||
}).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
|
||||
);
|
||||
|
||||
it("promotes target fff binaries to direct staged dependencies", () => {
|
||||
assert.deepStrictEqual(resolveFffNativeDependencies("mac", "arm64", "0.9.4"), {
|
||||
"@ff-labs/fff-bin-darwin-arm64": "0.9.4",
|
||||
|
||||
@@ -1424,11 +1424,13 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
|
||||
const winConfig: Record<string, unknown> = {
|
||||
target: [target],
|
||||
icon: "icon.ico",
|
||||
// Resource editing applies the product metadata and icon independently
|
||||
// of code signing. Disabling it for local unsigned builds leaves the
|
||||
// packaged executable with Electron's stock icon.
|
||||
signAndEditExecutable: true,
|
||||
};
|
||||
if (signed) {
|
||||
winConfig.azureSignOptions = yield* AzureTrustedSigningOptionsConfig;
|
||||
} else {
|
||||
winConfig.signAndEditExecutable = false;
|
||||
}
|
||||
buildConfig.win = winConfig;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user