Skip to content

Commit f791781

Browse files
committed
#16 Elctronの書き出しを修正
1 parent 531cda9 commit f791781

File tree

8 files changed

+37
-11
lines changed

8 files changed

+37
-11
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v3
1818
- uses: actions/setup-node@v3
19-
- run: cd template && npm install && npx eslint ./src/**/*.ts
19+
- run: npm install
20+
- run: npx eslint ./src/**/*.ts
21+
working-directory: ./template
2022

2123
windows-browser-test:
2224
runs-on: windows-latest
2325
steps:
2426
- uses: actions/checkout@v3
2527
- uses: actions/setup-node@v3
26-
- run: cd template && npm install && npx eslint ./src/**/*.ts
28+
- run: npm install
29+
- run: npx eslint ./src/**/*.ts
30+
working-directory: ./template

template/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ dist-ssr
2525

2626
src/Packages.*
2727
src/config/Config.*
28-
electron.index.json
28+
electron.index.json
29+
electron/resources/*

template/electron/icons/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# App Icons
2+
3+
Windows、macOSのアプリケーションで利用するアイコン画像を格納してます。
4+
デフォルトはNext2Dのロゴを配置しているので、アプリケーションのイメージに合わせて上書きしてください。
5+
6+
Icon images used for Windows and macOS applications are stored.
7+
The default is the Next2D logo, which can be overridden to match the image of the application.

template/electron/icons/icon.icns

145 KB
Binary file not shown.

template/electron/icons/icon.png

18.9 KB
Loading
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = "1";
22

33
const { app, screen, BrowserWindow } = require("electron");
44

5-
/**
6-
* 自動生成ファイルの読み込み
7-
* Loading of auto-generated files
8-
*/
9-
const config = require("./electron.index.json");
10-
115
app.commandLine.appendSwitch("disable-http-cache");
126

137
const createWindow = () =>
@@ -18,6 +12,7 @@ const createWindow = () =>
1812
const browserWindow = new BrowserWindow({
1913
"width": width,
2014
"height": height,
15+
"titleBarStyle": "hidden",
2116
"webPreferences": {
2217
"nodeIntegration": false
2318
}
@@ -28,7 +23,7 @@ const createWindow = () =>
2823
*/
2924
// browserWindow.webContents.openDevTools();
3025

31-
browserWindow.loadFile(config.path);
26+
browserWindow.loadFile("./resources/index.html");
3227
};
3328

3429
app

template/electron/package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "example-product-name",
3+
"version": "0.0.1",
4+
"description": "A divine garden adventure",
5+
"main": "index.js",
6+
"config": {
7+
"forge": {
8+
"packagerConfig": {
9+
"icon": "./icons"
10+
}
11+
}
12+
},
13+
"devDependencies": {
14+
"electron": "^27.0.4"
15+
}
16+
}

template/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,8 @@
3434
"typescript": "^5.2.2",
3535
"vite": "^4.5.0",
3636
"vitest": "^0.34.6"
37+
},
38+
"dependencies": {
39+
"example-product-name": "file:electron"
3740
}
38-
}
41+
}

0 commit comments

Comments
 (0)