@next2d/builder 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,12 +47,13 @@ export declare const createElectronPackagerOptions: (root: string, config: IElec
47
47
  entitlements: string;
48
48
  };
49
49
  } | undefined;
50
- extendInfo?: {
51
- NSLocalNetworkUsageDescription: string;
52
- } | undefined;
53
50
  extendHelperInfo?: {
54
51
  NSLocalNetworkUsageDescription: string;
55
52
  } | undefined;
53
+ extendInfo?: {
54
+ LSUIElement?: boolean | undefined;
55
+ NSLocalNetworkUsageDescription?: string | undefined;
56
+ } | undefined;
56
57
  icon?: string | undefined;
57
58
  name: string;
58
59
  executableName: string;
@@ -129,9 +129,16 @@ export const createElectronPackagerOptions = (root, config, os, resources) => {
129
129
  "extraResource": [resources, ...config.nativeBridge ? [path.join(path.dirname(resources), "native")] : []],
130
130
  "ignore": [/^\/native(?:\/|$)/, /^\/resources(?:\/|$)/, /^\/icons(?:\/|$)/, /^\/forge\.config\.[cm]?js$/, /^\/entitlements\.plist$/, /(?:^|\/)steam_appid\.txt$/],
131
131
  ...os !== "linux" && config.icons[os] ? { "icon": path.resolve(root, config.icons[os]) } : {},
132
- ...os === "macos" && config.macos.localNetworkUsageDescription ? {
133
- "extendInfo": { "NSLocalNetworkUsageDescription": config.macos.localNetworkUsageDescription },
134
- "extendHelperInfo": { "NSLocalNetworkUsageDescription": config.macos.localNetworkUsageDescription }
132
+ ...os === "macos" && (config.macos.localNetworkUsageDescription || config.window.overlay?.enabled) ? {
133
+ "extendInfo": {
134
+ ...config.macos.localNetworkUsageDescription ? { "NSLocalNetworkUsageDescription": config.macos.localNetworkUsageDescription } : {},
135
+ // An overlay starts as an agent app (no Dock icon) so that a second launch, which quits at once,
136
+ // never shows one. The first instance shows its Dock icon itself (templates/electron/index.js).
137
+ ...config.window.overlay?.enabled ? { "LSUIElement": true } : {}
138
+ },
139
+ ...config.macos.localNetworkUsageDescription ? {
140
+ "extendHelperInfo": { "NSLocalNetworkUsageDescription": config.macos.localNetworkUsageDescription }
141
+ } : {}
135
142
  } : {},
136
143
  ...os === "macos" && sign ? {
137
144
  "osxSign": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next2d/builder",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Multi-platform builder for Next2d Framework, supporting export to various platforms such as macOS, Windows, iOS, Android and Web(HTML)",
5
5
  "author": "Toshiyuki Ienaga <ienaga@next2d.app>",
6
6
  "license": "MIT",
@@ -144,6 +144,9 @@ const createWindow = async () => {
144
144
 
145
145
  app.whenReady().then(async () => {
146
146
  if (!hasLock) return;
147
+ // The overlay app is packaged as an agent app (LSUIElement) so a second launch never shows a Dock icon;
148
+ // the instance that keeps running shows it.
149
+ if (process.platform === "darwin" && overlay) app.dock?.show();
147
150
  Menu.setApplicationMenu(process.platform === "darwin" ? Menu.buildFromTemplate([
148
151
  { role: "appMenu" }, { role: "editMenu" }, { role: "windowMenu" }
149
152
  ]) : null);