mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
fix(desktop): ship the plugin SDK inside Mac App Store builds (#1551)
This commit is contained in:
1 parent
7b2198e18c
commit
ab7a68aa84
2 files changed
+47
-10
No files matched your search
@@ -30,6 +30,20 @@ function copyPluginSdk(resourcesDir, sdkDir = path.join(repoRoot, "packages", "p
|
||||
|
||||
exports.copyPluginSdk = copyPluginSdk;
|
||||
|
||||
/** Mac App Store builds report "mas", not "darwin", but are still .app bundles. */
|
||||
function resourcesDirFor({ electronPlatformName, appOutDir, packager }) {
|
||||
return ["darwin", "mas"].includes(electronPlatformName)
|
||||
? path.join(
|
||||
appOutDir,
|
||||
`${packager.appInfo.productFilename}.app`,
|
||||
"Contents",
|
||||
"Resources",
|
||||
)
|
||||
: path.join(appOutDir, "resources");
|
||||
}
|
||||
|
||||
exports.resourcesDirFor = resourcesDirFor;
|
||||
|
||||
exports.default = async function afterPack(context) {
|
||||
const { targets, appOutDir } = context;
|
||||
|
||||
@@ -39,15 +53,7 @@ exports.default = async function afterPack(context) {
|
||||
fs.writeFileSync(markerPath, "");
|
||||
}
|
||||
|
||||
const resourcesDir =
|
||||
context.electronPlatformName === "darwin"
|
||||
? path.join(
|
||||
appOutDir,
|
||||
`${context.packager.appInfo.productFilename}.app`,
|
||||
"Contents",
|
||||
"Resources",
|
||||
)
|
||||
: path.join(appOutDir, "resources");
|
||||
const resourcesDir = resourcesDirFor(context);
|
||||
|
||||
copyPluginSdk(resourcesDir);
|
||||
|
||||
|
||||
Reference in new issue
Block a user