add multi-architecture support for MacOS
This commit is contained in:
8
bin/builders/MacBuilder.ts
vendored
8
bin/builders/MacBuilder.ts
vendored
@@ -45,13 +45,13 @@ export default class MacBuilder implements IBuilder {
|
|||||||
dmgName = `${name}_${tauriConf.package.version}_universal.dmg`;
|
dmgName = `${name}_${tauriConf.package.version}_universal.dmg`;
|
||||||
} else {
|
} else {
|
||||||
await shellExec(`cd ${npmDirectory} && npm install && npm run build`);
|
await shellExec(`cd ${npmDirectory} && npm install && npm run build`);
|
||||||
let arch: string;
|
let arch = "x64";
|
||||||
if (process.arch === "x64") {
|
if (process.arch === "arm64") {
|
||||||
arch = "amd64";
|
arch = "aarch64";
|
||||||
} else {
|
} else {
|
||||||
arch = process.arch;
|
arch = process.arch;
|
||||||
}
|
}
|
||||||
dmgName = `${name}_${tauriConf.package.version}_${arch}.deb`;
|
dmgName = `${name}_${tauriConf.package.version}_${arch}.dmg`;
|
||||||
}
|
}
|
||||||
const appPath = this.getBuildAppPath(npmDirectory, dmgName);
|
const appPath = this.getBuildAppPath(npmDirectory, dmgName);
|
||||||
const distPath = path.resolve(`${name}.dmg`);
|
const distPath = path.resolve(`${name}.dmg`);
|
||||||
|
|||||||
8
dist/cli.js
vendored
8
dist/cli.js
vendored
@@ -2024,14 +2024,14 @@ class MacBuilder {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
yield shellExec(`cd ${npmDirectory} && npm install && npm run build`);
|
yield shellExec(`cd ${npmDirectory} && npm install && npm run build`);
|
||||||
let arch;
|
let arch = "x64";
|
||||||
if (process.arch === "x64") {
|
if (process.arch === "arm64") {
|
||||||
arch = "amd64";
|
arch = "aarch64";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
arch = process.arch;
|
arch = process.arch;
|
||||||
}
|
}
|
||||||
dmgName = `${name}_${tauriConf.package.version}_${arch}.deb`;
|
dmgName = `${name}_${tauriConf.package.version}_${arch}.dmg`;
|
||||||
}
|
}
|
||||||
const appPath = this.getBuildAppPath(npmDirectory, dmgName);
|
const appPath = this.getBuildAppPath(npmDirectory, dmgName);
|
||||||
const distPath = path.resolve(`${name}.dmg`);
|
const distPath = path.resolve(`${name}.dmg`);
|
||||||
|
|||||||
Reference in New Issue
Block a user