From 6dd1fcd5691fd5776d0be6071435550da2358402 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Wed, 1 Nov 2023 04:44:48 -0700 Subject: [PATCH] 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 --- desktop/scripts/build-release.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/desktop/scripts/build-release.tsx b/desktop/scripts/build-release.tsx index 8bdafe38f..8e79ee791 100755 --- a/desktop/scripts/build-release.tsx +++ b/desktop/scripts/build-release.tsx @@ -211,15 +211,20 @@ async function buildDist(buildFolder: string) { const postBuildCallbacks: (() => void)[] = []; if (argv.mac || argv['mac-dmg']) { - 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( + 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'])); + } + } postBuildCallbacks.push(() => spawn('zip', ['-qyr9', '../Flipper-mac.zip', 'Flipper.app'], { cwd: macPath,