Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reset GYP_MSVS_VERSION for multi-arch builds before beforePack #7387

Merged
merged 4 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/purple-phones-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix: reset `GYP_MSVS_VERSION` for multi-arch builds before `beforePack`
1 change: 0 additions & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ issue_labeler_regex_version=0
* **Target**:

<!-- Enter your issue details below this comment. -->
<!-- If you want, you can donate to increase issue priority (https://www.electron.build/donate) -->
2 changes: 1 addition & 1 deletion docs/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Env file `electron-builder.env` in the current dir ([example](https://github.com
<hr>
<ul>
<li><code id="Configuration-linux">linux</code> <a href="linux">LinuxConfiguration</a> - Options related to how build Linux targets.</li>
<li><code id="Configuration-deb">deb</code> <a href="/configuration/linux#de">DebOptions</a> - Debian package options.</li>
<li><code id="Configuration-deb">deb</code> <a href="/configuration/linux#deb">DebOptions</a> - Debian package options.</li>
<li><code id="Configuration-snap">snap</code> <a href="snap">SnapOptions</a> - Snap options.</li>
<li><code id="Configuration-appImage">appImage</code> <a href="/configuration/linux#appimageoptions">AppImageOptions</a> - AppImage options.</li>
<li><code id="Configuration-flatpak">flatpak</code> <a href="flatpak">FlatpakOptions</a> - Flatpak options.</li>
Expand Down
1 change: 1 addition & 0 deletions docs/generated/PlatformSpecificBuildOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li><code id="ReleaseInfo-releaseNotes">releaseNotes</code> String | “undefined” - The release notes.</li>
<li><code id="ReleaseInfo-releaseNotesFile">releaseNotesFile</code> String | “undefined” - The path to release notes file. Defaults to <code>release-notes-${platform}.md</code> (where <code>platform</code> it is current platform — <code>mac</code>, <code>linux</code> or <code>windows</code>) or <code>release-notes.md</code> in the <a href="#MetadataDirectories-buildResources">build resources</a>.</li>
<li><code id="ReleaseInfo-releaseDate">releaseDate</code> String - The release date.</li>
<li><code id="ReleaseInfo-vendor">vendor</code> Object&lt;String, any&gt; | “undefined” - Vendor specific information.</li>
</ul>
</li>
<li>
Expand Down
13 changes: 10 additions & 3 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -4876,8 +4876,15 @@
]
},
"vendor": {
"description": "Vendor-specific informaton",
"type": "object"
"anyOf": [
{
"typeof": "function"
},
{
"type": "null"
}
],
"description": "Vendor specific information."
}
},
"type": "object"
Expand Down Expand Up @@ -7078,4 +7085,4 @@
}
},
"type": "object"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export interface ReleaseInfo {
/**
* Vendor specific information.
*/
vendor?: Record<string, unknown> | null
vendor?: { [key: string]: any } | null
}

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/app-builder-lib/src/platformPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
return
}

// Due to node-gyp rewriting GYP_MSVS_VERSION when reused across the same session, we must reset the env var: https://github.com/electron-userland/electron-builder/issues/7256
delete process.env.GYP_MSVS_VERSION

const beforePack = resolveFunction(this.config.beforePack, "beforePack")
if (beforePack != null) {
await beforePack({
Expand Down
2 changes: 1 addition & 1 deletion scripts/jsdoc2md2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async function render2(files, jsdoc2MdOptions) {
return "[AppImageOptions](/configuration/linux#appimageoptions)"
}
if (types.some(it => it.endsWith("DebOptions"))) {
return "[DebOptions](/configuration/linux#de)"
return "[DebOptions](/configuration/linux#deb)"
}
if (types.some(it => it.endsWith("LinuxTargetSpecificOptions"))) {
return "[LinuxTargetSpecificOptions](/configuration/linux#LinuxTargetSpecificOptions)"
Expand Down