Skip to content

Commit b9deec5

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Add macOS 26 icon for RNDT (#56149)
Summary: Pull Request resolved: #56149 Add `React Native DevTools.icon` file (Icon Composer) for macOS 26 Tahoe. Also rename previous `.icns` file for consistency. `electron/packager` is updated to `^18.4.4`, as `.icon` support was added in `18.4.0`. Changelog: [Internal] Differential Revision: D97292364
1 parent d17ecca commit b9deec5

8 files changed

Lines changed: 120 additions & 32 deletions

File tree

.github/workflows/test-all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ jobs:
624624
run: yarn test-generated-typescript
625625

626626
build_debugger_shell:
627-
runs-on: ubuntu-latest
627+
runs-on: macos-26
628628
needs: check_code_changes
629629
if: needs.check_code_changes.outputs.debugger_shell == 'true'
630630
steps:

flow-typed/npm/electron-packager_v18.x.x.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ declare module '@electron/packager' {
118118
};
119119
extraResource?: string | string[];
120120
helperBundleId?: string;
121-
icon?: string;
121+
icon?: string | string[];
122122
ignore?: RegExp | (string | RegExp)[] | IgnoreFunction;
123123
junk?: boolean;
124124
name?: string;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@babel/plugin-transform-regenerator": "^7.24.7",
5454
"@babel/preset-env": "^7.25.3",
5555
"@babel/preset-flow": "^7.24.7",
56-
"@electron/packager": "^18.3.6",
56+
"@electron/packager": "^18.4.4",
5757
"@expo/spawn-async": "^1.7.2",
5858
"@jest/create-cache-key-function": "^29.7.0",
5959
"@microsoft/api-extractor": "^7.52.2",

packages/debugger-shell/src/electron/resources/icon.icns renamed to packages/debugger-shell/src/electron/resources/React Native DevTools.icns

File renamed without changes.
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"fill" : {
3+
"linear-gradient" : [
4+
"display-p3:0.21574,0.21966,0.23974,1.00000",
5+
"display-p3:0.13729,0.14116,0.15294,1.00000"
6+
]
7+
},
8+
"groups" : [
9+
{
10+
"blur-material" : null,
11+
"layers" : [
12+
{
13+
"glass" : false,
14+
"image-name" : "logo_light.svg",
15+
"name" : "logo_light",
16+
"position" : {
17+
"scale" : 1.37,
18+
"translation-in-points" : [
19+
0,
20+
0
21+
]
22+
}
23+
}
24+
],
25+
"shadow" : {
26+
"kind" : "neutral",
27+
"opacity" : 0.5
28+
},
29+
"specular" : true,
30+
"translucency" : {
31+
"enabled" : false,
32+
"value" : 0.5
33+
}
34+
}
35+
],
36+
"supported-platforms" : {
37+
"squares" : [
38+
"macOS"
39+
]
40+
}
41+
}

scripts/debugger-shell/build-binary.js

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@ const PACKAGE_ROOT = path.join(
4545
'packages',
4646
'debugger-shell',
4747
);
48+
const ICON_BASE = path.join(PACKAGE_ROOT, 'src/electron/resources');
49+
50+
const platformConfigs = [
51+
{
52+
platform: ['darwin'],
53+
arch: ['x64', 'arm64'],
54+
icon: [
55+
path.join(ICON_BASE, 'React Native DevTools.icns'),
56+
path.join(ICON_BASE, 'React Native DevTools.icon'),
57+
],
58+
},
59+
{
60+
platform: ['win32'],
61+
arch: ['x64', 'arm64'],
62+
icon: path.join(ICON_BASE, 'icon.ico'),
63+
},
64+
{
65+
platform: ['linux'],
66+
arch: ['x64', 'arm64'],
67+
icon: path.join(ICON_BASE, 'icon.png'),
68+
},
69+
];
4870

4971
async function main() {
5072
const pkg = JSON.parse(
@@ -73,31 +95,37 @@ async function main() {
7395

7496
await writeBuildInfo();
7597

76-
await packager({
77-
dir: PACKAGE_ROOT,
78-
icon: path.join(PACKAGE_ROOT, 'src/electron/resources/icon'),
79-
platform: ['win32', 'darwin', 'linux'],
80-
arch: ['x64', 'arm64'],
81-
name: APP_NAME,
82-
appVersion: pkg.version,
83-
appCopyright: COPYRIGHT,
84-
appCategoryType: 'public.app-category.developer-tools',
85-
asar: true,
86-
appBundleId: APP_BUNDLE_IDENTIFIER,
87-
out: path.join(PACKAGE_ROOT, 'build'),
88-
win32metadata: {
89-
CompanyName: COMPANY_NAME,
90-
ProductName: APP_NAME,
91-
InternalName: APP_NAME,
92-
FileDescription: `${APP_NAME}.exe`,
93-
OriginalFilename: `${APP_NAME}.exe`,
94-
},
95-
overwrite: true,
96-
ignore: [
97-
...IGNORE_PREFIXES.map(prefix => new RegExp('^' + escapeRegex(prefix))),
98-
...IGNORE_FILES.map(file => new RegExp('^' + escapeRegex(file) + '$')),
99-
],
100-
});
98+
await Promise.all(
99+
platformConfigs.map(platformConfig =>
100+
packager({
101+
...platformConfig,
102+
dir: PACKAGE_ROOT,
103+
name: APP_NAME,
104+
appVersion: pkg.version,
105+
appCopyright: COPYRIGHT,
106+
appCategoryType: 'public.app-category.developer-tools',
107+
asar: true,
108+
appBundleId: APP_BUNDLE_IDENTIFIER,
109+
out: path.join(PACKAGE_ROOT, 'build'),
110+
win32metadata: {
111+
CompanyName: COMPANY_NAME,
112+
ProductName: APP_NAME,
113+
InternalName: APP_NAME,
114+
FileDescription: `${APP_NAME}.exe`,
115+
OriginalFilename: `${APP_NAME}.exe`,
116+
},
117+
overwrite: true,
118+
ignore: [
119+
...IGNORE_PREFIXES.map(
120+
prefix => new RegExp('^' + escapeRegex(prefix)),
121+
),
122+
...IGNORE_FILES.map(
123+
file => new RegExp('^' + escapeRegex(file) + '$'),
124+
),
125+
],
126+
}),
127+
),
128+
);
101129
}
102130

103131
async function writeBuildInfo() {

yarn.lock

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,17 +1123,18 @@
11231123
minimist "^1.2.6"
11241124
plist "^3.0.5"
11251125

1126-
"@electron/packager@^18.3.6":
1127-
version "18.3.6"
1128-
resolved "https://registry.yarnpkg.com/@electron/packager/-/packager-18.3.6.tgz#3596399334866737bc33ab663e90376d7aad89e4"
1129-
integrity sha512-1eXHB5t+SQKvUiDpWGpvr90ZSSbXj+isrh3YbjCTjKT4bE4SQrKSBfukEAaBvp67+GXHFtCHjQgN9qSTFIge+Q==
1126+
"@electron/packager@^18.4.4":
1127+
version "18.4.4"
1128+
resolved "https://registry.yarnpkg.com/@electron/packager/-/packager-18.4.4.tgz#708458f73639c2aa919ce5f6250ac519fa53ee5c"
1129+
integrity sha512-fTUCmgL25WXTcFpM1M72VmFP8w3E4d+KNzWxmTDRpvwkfn/S206MAtM2cy0GF78KS9AwASMOUmlOIzCHeNxcGQ==
11301130
dependencies:
11311131
"@electron/asar" "^3.2.13"
11321132
"@electron/get" "^3.0.0"
11331133
"@electron/notarize" "^2.1.0"
11341134
"@electron/osx-sign" "^1.0.5"
11351135
"@electron/universal" "^2.0.1"
11361136
"@electron/windows-sign" "^1.0.0"
1137+
"@malept/cross-spawn-promise" "^2.0.0"
11371138
debug "^4.0.1"
11381139
extract-zip "^2.0.0"
11391140
filenamify "^4.1.0"
@@ -1143,6 +1144,7 @@
11431144
junk "^3.1.0"
11441145
parse-author "^2.0.0"
11451146
plist "^3.0.0"
1147+
prettier "^3.4.2"
11461148
resedit "^2.0.0"
11471149
resolve "^1.1.6"
11481150
semver "^7.1.3"
@@ -7832,6 +7834,11 @@ prettier@3.6.2:
78327834
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393"
78337835
integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==
78347836

7837+
prettier@^3.4.2:
7838+
version "3.8.1"
7839+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.8.1.tgz#edf48977cf991558f4fcbd8a3ba6015ba2a3a173"
7840+
integrity sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==
7841+
78357842
pretty-format@^29.0.0, pretty-format@^29.7.0:
78367843
version "29.7.0"
78377844
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812"

0 commit comments

Comments
 (0)