Set x64 default architecture and .pkg target for RN-only builds

Summary: These are local changes required to make an installer for the last RN-only Electron distribution of Flipper. Instead of just throwing this away, let's keep it in the history of the repository, just in case.

Reviewed By: passy

Differential Revision: D50838207

fbshipit-source-id: 4966e046161e24a616c04d5cf57fee2512f06525
This commit is contained in:
Lorenzo Blasa
2023-11-01 04:44:48 -07:00
committed by Facebook GitHub Bot
parent 43530e3bbf
commit 6dd1fcd569

View File

@@ -211,15 +211,20 @@ async function buildDist(buildFolder: string) {
const postBuildCallbacks: (() => void)[] = [];
if (argv.mac || argv['mac-dmg']) {
let macPath = path.join(
distDir,
process.arch === 'arm64' ? 'mac-arm64' : 'mac',
);
if (argv['react-native-only']) {
targetsRaw.push(Platform.MAC.createTarget(['pkg'], Arch.x64));
macPath = path.join(distDir, 'mac');
} else {
targetsRaw.push(Platform.MAC.createTarget(['dir']));
// You can build mac apps on Linux but can't build dmgs, so we separate those.
if (argv['mac-dmg']) {
targetsRaw.push(Platform.MAC.createTarget(['dmg']));
}
const macPath = path.join(
distDir,
process.arch === 'arm64' ? 'mac-arm64' : 'mac',
);
}
postBuildCallbacks.push(() =>
spawn('zip', ['-qyr9', '../Flipper-mac.zip', 'Flipper.app'], {
cwd: macPath,