Better appId and productName
Summary: As to not conflict with non-electron installations, this will ensure the product name and app id matches the installation. By doing this, both Flipper installations can co-exist, which I think is desirable. Reviewed By: antonk52 Differential Revision: D51078955 fbshipit-source-id: fabaa6eb2a45ac542297b0456a09e938a2ec2e0b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3dc9cc5d3d
commit
9164e04e29
@@ -210,6 +210,13 @@ async function buildDist(buildFolder: string) {
|
|||||||
const targetsRaw: Map<Platform, Map<Arch, string[]>>[] = [];
|
const targetsRaw: Map<Platform, Map<Arch, string[]>>[] = [];
|
||||||
const postBuildCallbacks: (() => void)[] = [];
|
const postBuildCallbacks: (() => void)[] = [];
|
||||||
|
|
||||||
|
const productName = process.env.FLIPPER_REACT_NATIVE_ONLY
|
||||||
|
? 'Flipper-Electron'
|
||||||
|
: 'Flipper';
|
||||||
|
const appId = process.env.FLIPPER_REACT_NATIVE_ONLY
|
||||||
|
? 'com.facebook.sonar-electron'
|
||||||
|
: `com.facebook.sonar`;
|
||||||
|
|
||||||
if (argv.mac || argv['mac-dmg']) {
|
if (argv.mac || argv['mac-dmg']) {
|
||||||
let macPath = path.join(
|
let macPath = path.join(
|
||||||
distDir,
|
distDir,
|
||||||
@@ -226,10 +233,14 @@ async function buildDist(buildFolder: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
postBuildCallbacks.push(() =>
|
postBuildCallbacks.push(() =>
|
||||||
spawn('zip', ['-qyr9', '../Flipper-mac.zip', 'Flipper.app'], {
|
spawn(
|
||||||
cwd: macPath,
|
'zip',
|
||||||
encoding: 'utf-8',
|
['-qyr9', `../${productName}-mac.zip`, `${productName}.app`],
|
||||||
}),
|
{
|
||||||
|
cwd: macPath,
|
||||||
|
encoding: 'utf-8',
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (argv.linux || argv['linux-deb'] || argv['linux-snap']) {
|
if (argv.linux || argv['linux-deb'] || argv['linux-snap']) {
|
||||||
@@ -268,8 +279,8 @@ async function buildDist(buildFolder: string) {
|
|||||||
await build({
|
await build({
|
||||||
publish: 'never',
|
publish: 'never',
|
||||||
config: {
|
config: {
|
||||||
appId: `com.facebook.sonar`,
|
appId,
|
||||||
productName: 'Flipper',
|
productName,
|
||||||
directories: {
|
directories: {
|
||||||
buildResources: buildFolder,
|
buildResources: buildFolder,
|
||||||
output: distDir,
|
output: distDir,
|
||||||
|
|||||||
Reference in New Issue
Block a user