Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ jobs:
run: yarn test-generated-typescript

build_debugger_shell:
runs-on: ubuntu-latest
runs-on: macos-26
needs: check_code_changes
if: needs.check_code_changes.outputs.debugger_shell == 'true'
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,25 @@
declare module '@electron/packager' {
declare export type AsarOptions = $FlowFixMe;

declare export type ElectronDownloadRequestOptions = $FlowFixMe;

declare export type TargetDefinition = {
arch: TargetArch,
platform: TargetPlatform,
};

declare export type FinalizePackageTargetsHookFunction = (
targets: TargetDefinition[],
callback: HookFunctionErrorCallback,
) => void;

declare export type HookFunction = (
declare export type HookFunctionArgs = {
buildPath: string,
electronVersion: string,
platform: TargetPlatform,
arch: TargetArch,
callback: HookFunctionErrorCallback,
) => void;
};

declare export type IgnoreFunction = (path: string) => boolean;
declare export type HookFunction = (args: HookFunctionArgs) => Promise<void>;

declare export type FinalizePackageTargetsHookFunction = (args: {
targets: TargetDefinition[],
}) => Promise<void>;

declare export type HookFunctionErrorCallback = (err?: Error | null) => void;
declare export type IgnoreFunction = (path: string) => boolean;

declare export interface MacOSProtocol {
name: string;
Expand Down Expand Up @@ -102,7 +98,6 @@ declare module '@electron/packager' {
buildVersion?: string;
darwinDarkModeSupport?: boolean;
derefSymlinks?: boolean;
download?: ElectronDownloadRequestOptions;
electronVersion?: string;
electronZipDir?: string;
executableName?: string;
Expand All @@ -118,7 +113,7 @@ declare module '@electron/packager' {
};
extraResource?: string | string[];
helperBundleId?: string;
icon?: string;
icon?: string | string[];
ignore?: RegExp | (string | RegExp)[] | IgnoreFunction;
junk?: boolean;
name?: string;
Expand All @@ -132,7 +127,7 @@ declare module '@electron/packager' {
protocols?: MacOSProtocol[];
prune?: boolean;
quiet?: boolean;
tmpdir?: string | false;
tmpdir?: string;
usageDescription?: {
[property: string]: string,
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@babel/plugin-transform-regenerator": "^7.24.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-flow": "^7.24.7",
"@electron/packager": "^18.3.6",
"@electron/packager": "^20.0.0",
"@expo/spawn-async": "^1.7.2",
"@jest/create-cache-key-function": "^29.7.0",
"@microsoft/api-extractor": "^7.52.2",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"fill" : {
"linear-gradient" : [
"display-p3:0.21574,0.21966,0.23974,1.00000",
"display-p3:0.13729,0.14116,0.15294,1.00000"
]
},
"groups" : [
{
"blur-material" : null,
"layers" : [
{
"glass" : false,
"image-name" : "logo_light.svg",
"name" : "logo_light",
"position" : {
"scale" : 1.37,
"translation-in-points" : [
0,
0
]
}
}
],
"shadow" : {
"kind" : "neutral",
"opacity" : 0.5
},
"specular" : true,
"translucency" : {
"enabled" : false,
"value" : 0.5
}
}
],
"supported-platforms" : {
"squares" : [
"macOS"
]
}
}
78 changes: 53 additions & 25 deletions scripts/debugger-shell/build-binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ const PACKAGE_ROOT = path.join(
'packages',
'debugger-shell',
);
const ICON_BASE = path.join(PACKAGE_ROOT, 'src/electron/resources');

const platformConfigs = [
{
platform: ['darwin'],
arch: ['x64', 'arm64'],
icon: [
path.join(ICON_BASE, 'React Native DevTools.icns'),
path.join(ICON_BASE, 'React Native DevTools.icon'),
],
},
{
platform: ['win32'],
arch: ['x64', 'arm64'],
icon: path.join(ICON_BASE, 'icon.ico'),
},
{
platform: ['linux'],
arch: ['x64', 'arm64'],
icon: path.join(ICON_BASE, 'icon.png'),
},
];

async function main() {
const pkg = JSON.parse(
Expand Down Expand Up @@ -73,31 +95,37 @@ async function main() {

await writeBuildInfo();

await packager({
dir: PACKAGE_ROOT,
icon: path.join(PACKAGE_ROOT, 'src/electron/resources/icon'),
platform: ['win32', 'darwin', 'linux'],
arch: ['x64', 'arm64'],
name: APP_NAME,
appVersion: pkg.version,
appCopyright: COPYRIGHT,
appCategoryType: 'public.app-category.developer-tools',
asar: true,
appBundleId: APP_BUNDLE_IDENTIFIER,
out: path.join(PACKAGE_ROOT, 'build'),
win32metadata: {
CompanyName: COMPANY_NAME,
ProductName: APP_NAME,
InternalName: APP_NAME,
FileDescription: `${APP_NAME}.exe`,
OriginalFilename: `${APP_NAME}.exe`,
},
overwrite: true,
ignore: [
...IGNORE_PREFIXES.map(prefix => new RegExp('^' + escapeRegex(prefix))),
...IGNORE_FILES.map(file => new RegExp('^' + escapeRegex(file) + '$')),
],
});
await Promise.all(
platformConfigs.map(platformConfig =>
packager({
...platformConfig,
dir: PACKAGE_ROOT,
name: APP_NAME,
appVersion: pkg.version,
appCopyright: COPYRIGHT,
appCategoryType: 'public.app-category.developer-tools',
asar: true,
appBundleId: APP_BUNDLE_IDENTIFIER,
out: path.join(PACKAGE_ROOT, 'build'),
win32metadata: {
CompanyName: COMPANY_NAME,
ProductName: APP_NAME,
InternalName: APP_NAME,
FileDescription: `${APP_NAME}.exe`,
OriginalFilename: `${APP_NAME}.exe`,
},
overwrite: true,
ignore: [
...IGNORE_PREFIXES.map(
prefix => new RegExp('^' + escapeRegex(prefix)),
),
...IGNORE_FILES.map(
file => new RegExp('^' + escapeRegex(file) + '$'),
),
],
}),
),
);
}

async function writeBuildInfo() {
Expand Down
Loading
Loading