@next2d/builder 0.1.11 → 0.3.0
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.
- package/README.md +90 -57
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +68 -3
- package/dist/colors.d.ts +6 -0
- package/dist/colors.js +7 -0
- package/dist/context.d.ts +10 -1
- package/dist/context.js +7 -0
- package/dist/description.d.ts +2 -0
- package/dist/description.js +8 -0
- package/dist/electron-config.d.ts +62 -0
- package/dist/electron-config.js +134 -0
- package/dist/electron-host.d.ts +7 -0
- package/dist/electron-host.js +54 -0
- package/dist/electron-native.d.ts +15 -0
- package/dist/electron-native.js +73 -0
- package/dist/electron.d.ts +4 -9
- package/dist/electron.js +85 -133
- package/dist/index.js +21 -0
- package/dist/native.d.ts +9 -24
- package/dist/native.js +48 -106
- package/dist/project-vite.d.ts +3 -0
- package/dist/project-vite.js +21 -0
- package/dist/resolve-tool-packages.d.ts +1 -0
- package/dist/resolve-tool-packages.js +29 -0
- package/dist/steam-upload.d.ts +27 -0
- package/dist/steam-upload.js +131 -0
- package/dist/steam.d.ts +22 -0
- package/dist/steam.js +193 -0
- package/dist/tool-packages.d.ts +15 -0
- package/dist/tool-packages.js +74 -0
- package/dist/web.js +10 -4
- package/dist/xbox.d.ts +1 -1
- package/dist/xbox.js +60 -57
- package/docs/capacitor.md +201 -0
- package/docs/native-bridge.md +147 -0
- package/docs/steam.md +384 -0
- package/docs/xbox.md +145 -0
- package/package.json +9 -12
- package/templates/electron/entitlements.plist +12 -0
- package/templates/electron/icons/icon.icns +0 -0
- package/templates/electron/icons/icon.ico +0 -0
- package/templates/electron/icons/icon.png +0 -0
- package/templates/electron/index.js +119 -0
- package/templates/electron/local-assets.cjs +24 -0
- package/templates/electron/native-bridge.cjs +98 -0
- package/templates/electron/package.json +11 -0
- package/templates/electron/preload.cjs +11 -0
- package/templates/xbox/src/platform/StbTextRasterizer.cpp +14 -10
- package/templates/xbox/tests/check_local.sh +12 -4
- package/templates/xbox/tests/stb_safety_test.cpp +126 -0
- package/templates/xbox/third_party/LICENSES.md +15 -0
- package/templates/xbox/third_party/stb_image.h +15 -10
- package/templates/xbox/third_party/stb_truetype.h +4 -4
- package/templates/xbox/third_party/stb_vorbis.c +1 -1
package/docs/steam.md
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Steam 書き出し / アップロード / Export / Upload
|
|
2
|
+
|
|
3
|
+
[日本語](#日本語) | [English](#english)
|
|
4
|
+
|
|
5
|
+
## 日本語
|
|
6
|
+
|
|
7
|
+
ローカル書き出しはSTEP1・3・5を実施する。Steam配布時は全STEPが必要。
|
|
8
|
+
|
|
9
|
+
OS機能やネイティブSDKを別プロセスで接続する場合は [ネイティブ機能の拡張](native-bridge.md) を参照。EOSはその利用例として紹介しています。
|
|
10
|
+
|
|
11
|
+
### STEP1:環境・アイコンを用意する
|
|
12
|
+
|
|
13
|
+
macOSのUniversal書き出し・署名・公証はmacOSで実行する。
|
|
14
|
+
テンプレートの `src/assets/icons/` の仮アイコンを、Windows用ICO・macOS用ICNS・Linux用PNGに差し替える。
|
|
15
|
+
|
|
16
|
+
| OS | 既定CPU | `architectures` / `--arch` の対応値 |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Windows | `x64` | `x64`, `arm64` |
|
|
19
|
+
| macOS | `universal` | `x64`, `arm64`, `universal` |
|
|
20
|
+
| Linux | `x64` | `x64`, `arm64` |
|
|
21
|
+
|
|
22
|
+
### STEP2:Steamworksを設定する
|
|
23
|
+
|
|
24
|
+
1. 発行済みApp IDを確認する。
|
|
25
|
+
2. SteamPipe > DepotsでDepotを作成し、対象OS・言語を設定する。保存後、公開(Publish)タブで反映する。
|
|
26
|
+
3. 開発用・テスト用・販売用の該当Packageに必要なDepotを含める。
|
|
27
|
+
4. SteamPipe > Buildsで `internal` ブランチを作成し、パスワードを設定する。
|
|
28
|
+
5. テスターにゲーム・Depotの利用権とブランチのパスワードを渡す。未発売ゲームの外部テストにはRelease State Overrideキー等を使う。
|
|
29
|
+
|
|
30
|
+
**パスワードだけではゲームの利用権は付与されない。** builderはブランチ作成やパスワード設定を行わない。
|
|
31
|
+
|
|
32
|
+
| Depot構成 | 設定 |
|
|
33
|
+
|---|---|
|
|
34
|
+
| OS別(Valve推奨) | OSごとに異なる発行済みDepot IDを指定する。 |
|
|
35
|
+
| 複数OSで共用 | 同じIDを指定し、Steamworksの対象OSをAll OSesなどに合わせる。全対象OSのファイルを配布する。 |
|
|
36
|
+
|
|
37
|
+
Steamは複数Depotに対応。builderは各OSに1 IDまでで、一部OSだけの共用も可能。
|
|
38
|
+
同一OSを複数Depotへ分割する構成は未対応。ブランチごとにDepotを作る必要はない。
|
|
39
|
+
|
|
40
|
+
公式:[Depot](https://partner.steamgames.com/doc/store/application/depots) / [Package](https://partner.steamgames.com/doc/store/application/packages) / [テストと利用権](https://partner.steamgames.com/doc/store/testing)
|
|
41
|
+
|
|
42
|
+
### STEP3:electron.config.jsonを設定する
|
|
43
|
+
|
|
44
|
+
ゲームルートの設定を変更する。バージョンはルートの `package.json` を使う。
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"appId": "app.example.game",
|
|
49
|
+
"appName": "My Game",
|
|
50
|
+
"executableName": "my-game",
|
|
51
|
+
"companyName": "Example Company",
|
|
52
|
+
"icons": {
|
|
53
|
+
"windows": "src/assets/icons/icon.ico",
|
|
54
|
+
"macos": "src/assets/icons/icon.icns",
|
|
55
|
+
"linux": "src/assets/icons/icon.png"
|
|
56
|
+
},
|
|
57
|
+
"architectures": { "windows": "x64", "macos": "universal", "linux": "x64" },
|
|
58
|
+
"window": { "width": 1280, "height": 720, "fullscreen": false },
|
|
59
|
+
"steam": {
|
|
60
|
+
"appId": null,
|
|
61
|
+
"branch": "internal",
|
|
62
|
+
"depots": { "windows": null, "macos": null, "linux": null }
|
|
63
|
+
},
|
|
64
|
+
"macos": { "sign": false, "notarize": false }
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
| 項目 | 設定・確認事項 |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `appId` | bundle ID・保存先識別子。Steam App IDとは別。配布前に自分の値へ変更する。 |
|
|
71
|
+
| `appName` / `executableName` | アプリ表示名 / 実行ファイル名。 |
|
|
72
|
+
| `companyName` | Windowsの会社名。省略時は `package.json` の `author.name`、なければゲーム名。 |
|
|
73
|
+
| `description` | 任意。未指定・`null` は `package.json` の説明を使用。 |
|
|
74
|
+
| `icons` | ゲームルートからの相対パスまたは絶対パス。省略したOSは仮アイコン、指定ファイルがなければ失敗。 |
|
|
75
|
+
| `architectures` | STEP1のCPU設定。`--arch` が優先。 |
|
|
76
|
+
| `steam.appId` / `steam.depots` | 配布時は `null` を実際のApp ID・Depot IDへ変更する。Depot IDをApp IDから推測しない。未設定のOSはアップロード対象外。 |
|
|
77
|
+
| `steam.branch` | 反映先。既定は `internal`。 |
|
|
78
|
+
| `macos.sign` / `macos.notarize` | ローカル検証は `false`、配布時は両方 `true`。 |
|
|
79
|
+
| `macos.localNetworkUsageDescription` | LAN通信の利用目的。指定時のみ、メインアプリとElectron HelperのInfo.plistへ`NSLocalNetworkUsageDescription`を設定する。macOSの許可操作はユーザーが行う。 |
|
|
80
|
+
|
|
81
|
+
### STEP4:認証を用意する
|
|
82
|
+
|
|
83
|
+
#### macOSの署名・公証
|
|
84
|
+
|
|
85
|
+
キーチェーンに **Developer ID Application証明書と秘密鍵** を登録し、署名IDを確認する。
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
security find-identity -v -p codesigning
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
表示された `Developer ID Application: ...` の名前全体を指定する。
|
|
92
|
+
公証プロファイルは `xcrun notarytool store-credentials` で事前登録した名前を使う。
|
|
93
|
+
Apple ID認証ではアプリ用パスワードが必要。認証情報はJSONへ保存しない。
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
export APPLE_SIGNING_IDENTITY='Developer ID Application: YOUR NAME (TEAMID)'
|
|
97
|
+
export APPLE_NOTARY_PROFILE='your-notary-profile'
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
署名・公証が失敗したらアップロードへ進まない。`Signature=adhoc` / `TeamIdentifier=not set` はDeveloper ID署名未完了。
|
|
101
|
+
|
|
102
|
+
#### SteamCMD
|
|
103
|
+
|
|
104
|
+
[Steamworks SDKのContentBuilder](https://partner.steamgames.com/doc/sdk/uploading)からSteamCMDを用意する。
|
|
105
|
+
ビルドアカウントには `Edit App Metadata` と `Publish App Changes To Steam` を付与する。
|
|
106
|
+
macOS / Linuxの例(パスとSteamログイン名を置き換える):
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
export STEAMCMD="/absolute/path/to/steamcmd.sh"
|
|
110
|
+
export STEAM_USERNAME="your_build_account"
|
|
111
|
+
"$STEAMCMD" +login "$STEAM_USERNAME" +quit
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
- パスワード・要求されたSteam Guardコードを入力し、**ログイン後の正常終了まで待つ**。手動ログインなら `quit` で終了する。
|
|
115
|
+
- builderは同じSteamCMD・アカウントの保存済み認証を使う。`Cached credentials not found` が出たら上のログインコマンドを再実行する。
|
|
116
|
+
- Windowsは `steamcmd.exe` とPowerShellの `$env:STEAMCMD` / `$env:STEAM_USERNAME` を使用。`STEAMCMD` は実行ファイルのパスのみ、`.sh` は実行権限が必要。
|
|
117
|
+
- CIではSteamCMDの `config/config.vdf` をSecretとして復元し、成果物に含めない。
|
|
118
|
+
|
|
119
|
+
### STEP5:書き出し・成果物を確認する
|
|
120
|
+
|
|
121
|
+
ゲームルートで実行する。追加のアプリビルドやインストーラー作成は不要。
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
npx @next2d/builder --platform steam:windows --env prd
|
|
125
|
+
npx @next2d/builder --platform steam:macos --env prd
|
|
126
|
+
npx @next2d/builder --platform steam:linux --env prd
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- CPU変更は `--arch arm64` 等を追加する。同一OSは最後に成功したCPUの成果物を使う。
|
|
130
|
+
- 出力は `dist/steam/<OS>/build/<env>/`。実行ファイルだけでなく、配下のフォルダ全体を保持する。
|
|
131
|
+
- 別マシン・CIから集める場合も `steam-package.json` と `*-steampipe/` を含む同じ階層を保つ。`tar.gz` で転送し、シンボリックリンク・実行権限を維持する。
|
|
132
|
+
- 設定・バージョン変更後は対象OSを再書き出しする。アップロード対象の全OSを同じバージョン・意図したリビジョンで揃える。
|
|
133
|
+
|
|
134
|
+
macOS配布用は次を実行する(パスは成果物に合わせる):
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
codesign --verify --deep --strict --verbose=2 'dist/steam/macos/build/prd/My Game-darwin-universal/My Game.app'
|
|
138
|
+
echo $?
|
|
139
|
+
xcrun stapler validate 'dist/steam/macos/build/prd/My Game-darwin-universal/My Game.app'
|
|
140
|
+
echo $?
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
| 検証 | 正常時の出力 | 直後の `echo $?` |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| `codesign` | `valid on disk` / `satisfies its Designated Requirement` | `0` |
|
|
146
|
+
| `stapler` | `The validate action worked!` | `0` |
|
|
147
|
+
|
|
148
|
+
`0` 以外ならエラーを解消して再検証する。これらは検証コマンドで、署名・公証自体は実行しない。
|
|
149
|
+
|
|
150
|
+
### STEP6:起動設定・アップロード・動作確認
|
|
151
|
+
|
|
152
|
+
#### 起動ファイルを設定する
|
|
153
|
+
|
|
154
|
+
SteamworksのInstallation > General InstallationでOS別Launch Optionを設定する。
|
|
155
|
+
**同じDepot IDを複数OSで使う場合に、起動パスへOS名が付く。** 例はSTEP3のゲーム名・実行ファイル名に対応する。
|
|
156
|
+
|
|
157
|
+
| Depot構成 | WindowsのExecutable | macOSのExecutable | LinuxのExecutable |
|
|
158
|
+
|---|---|---|---|
|
|
159
|
+
| 単一Depot・単一OS(Windowsの例) | `my-game.exe` | — | — |
|
|
160
|
+
| 単一Depot・全OS共用 | `windows/my-game.exe` | `macos/My Game.app` | `linux/my-game` |
|
|
161
|
+
| 複数Depot・OS別 | `my-game.exe` | `My Game.app` | `my-game` |
|
|
162
|
+
| 複数Depot・Windows/macOSのみ共用 | `windows/my-game.exe` | `macos/My Game.app` | `my-game` |
|
|
163
|
+
|
|
164
|
+
- 単一OSがmacOS / Linuxの場合もOS名を付けず、`My Game.app` / `my-game` を指定する。
|
|
165
|
+
- インストール先からの相対パスを使い、`dist/steam/...` は含めない。実際の値は `*-steampipe/launch.json` またはdry-runで確認する。
|
|
166
|
+
- Arguments / Working Directoryは空欄。OS・CPU条件(x64は64bit)を設定し、公開(Publish)で反映する。Depot構成変更時は起動パスも更新する。
|
|
167
|
+
|
|
168
|
+
#### アップロードする
|
|
169
|
+
|
|
170
|
+
STEP4のログインが正常終了したターミナルで実行する。
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
npx @next2d/builder --steam-upload --env prd --dry-run
|
|
174
|
+
npx @next2d/builder --steam-upload --env prd
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
設定した全OSの成果物を検証し、全Depotを1回でアップロードする。事前の `--steam-manifest` は不要。
|
|
178
|
+
dry-runはローカル検証のみで、Steam側の権限・ブランチ・パスワードは確認しない。
|
|
179
|
+
|
|
180
|
+
| 任意の引数 | 用途 |
|
|
181
|
+
|---|---|
|
|
182
|
+
| `--steam-branch internal` | 反映先を上書き。`default` への切り替えはSteamworksで行う。 |
|
|
183
|
+
| `--steam-comment "操作修正"` | ビルド説明。未指定は `<appName> <version> (<env>, <branch>)`。空白のみ・制御文字・改行・ダブルクォート・バックスラッシュは不可。 |
|
|
184
|
+
| `--steam-root dist/steam` | 成果物の収集先。カスタム出力先では指定必須。 |
|
|
185
|
+
|
|
186
|
+
アップロードには `--platform` / `--arch` / `--build` / `--preview` / `--open` / `--steam-manifest` を併用しない。
|
|
187
|
+
|
|
188
|
+
#### 完了を確認する
|
|
189
|
+
|
|
190
|
+
1. `dist/steam/uploads/<env>/<branch>-<識別子>/upload-result.json` のBuildIDが、Steamworksの対象ブランチに反映されていることを確認する。カスタム出力先では `dist/steam` を読み替える。
|
|
191
|
+
2. Steamクライアントのプロパティ > ゲームバージョンとベータでパスワードを入力し、`internal` を選ぶ。
|
|
192
|
+
3. 各OSでインストール・起動・終了・入力・音声・全画面・オフライン起動・更新後の保存を確認する。macOS UniversalはIntel / Apple Silicon両方で確認する。
|
|
193
|
+
4. 対応を掲げるOverlay・Steam Deck・Linux環境を実機で確認し、ストア記載と一致させる。実績・DRM・Steam Cloudは自動統合されない。
|
|
194
|
+
|
|
195
|
+
エラー時のSteamPipeログは `dist/steam/uploads/<env>/cache/<branch>/` を確認する。
|
|
196
|
+
|
|
197
|
+
## English
|
|
198
|
+
|
|
199
|
+
For local exports, follow STEP1, STEP3 and STEP5. Steam distribution requires all steps.
|
|
200
|
+
|
|
201
|
+
### STEP1: Prepare the environment and icons
|
|
202
|
+
|
|
203
|
+
Run macOS Universal exports, signing and notarization on macOS.
|
|
204
|
+
Replace the template icons in `src/assets/icons/` with Windows ICO, macOS ICNS and Linux PNG files.
|
|
205
|
+
|
|
206
|
+
| OS | Default CPU | Accepted `architectures` / `--arch` values |
|
|
207
|
+
|---|---|---|
|
|
208
|
+
| Windows | `x64` | `x64`, `arm64` |
|
|
209
|
+
| macOS | `universal` | `x64`, `arm64`, `universal` |
|
|
210
|
+
| Linux | `x64` | `x64`, `arm64` |
|
|
211
|
+
|
|
212
|
+
### STEP2: Configure Steamworks
|
|
213
|
+
|
|
214
|
+
1. Find the issued App ID.
|
|
215
|
+
2. Create depots in SteamPipe > Depots and set their OS/language. Save, then apply the changes on the Publish tab.
|
|
216
|
+
3. Include the required depots in the relevant development, testing and retail Packages.
|
|
217
|
+
4. Create an `internal` branch in SteamPipe > Builds and set a password.
|
|
218
|
+
5. Give testers game/depot access and the branch password. Use Release State Override keys or equivalent access for external testing before release.
|
|
219
|
+
|
|
220
|
+
**A branch password does not grant game access.** The builder does not create branches or configure passwords.
|
|
221
|
+
|
|
222
|
+
| Depot layout | Configuration |
|
|
223
|
+
|---|---|
|
|
224
|
+
| Separate per OS (Valve recommendation) | Assign a different issued Depot ID to each OS. |
|
|
225
|
+
| Shared across operating systems | Assign the same ID and set the Steamworks OS selection accordingly, such as All OSes. All included OS files are distributed. |
|
|
226
|
+
|
|
227
|
+
Steam supports multiple depots. The builder accepts one ID per OS, including layouts where only some operating systems share a depot.
|
|
228
|
+
Splitting one OS across multiple depots is not supported. Separate depots per branch are unnecessary.
|
|
229
|
+
|
|
230
|
+
Official: [Depots](https://partner.steamgames.com/doc/store/application/depots) / [Packages](https://partner.steamgames.com/doc/store/application/packages) / [Testing and access](https://partner.steamgames.com/doc/store/testing)
|
|
231
|
+
|
|
232
|
+
### STEP3: Configure electron.config.json
|
|
233
|
+
|
|
234
|
+
Edit the configuration at the game root. The version comes from the root `package.json`.
|
|
235
|
+
|
|
236
|
+
```json
|
|
237
|
+
{
|
|
238
|
+
"appId": "app.example.game",
|
|
239
|
+
"appName": "My Game",
|
|
240
|
+
"executableName": "my-game",
|
|
241
|
+
"companyName": "Example Company",
|
|
242
|
+
"icons": {
|
|
243
|
+
"windows": "src/assets/icons/icon.ico",
|
|
244
|
+
"macos": "src/assets/icons/icon.icns",
|
|
245
|
+
"linux": "src/assets/icons/icon.png"
|
|
246
|
+
},
|
|
247
|
+
"architectures": { "windows": "x64", "macos": "universal", "linux": "x64" },
|
|
248
|
+
"window": { "width": 1280, "height": 720, "fullscreen": false },
|
|
249
|
+
"steam": {
|
|
250
|
+
"appId": null,
|
|
251
|
+
"branch": "internal",
|
|
252
|
+
"depots": { "windows": null, "macos": null, "linux": null }
|
|
253
|
+
},
|
|
254
|
+
"macos": { "sign": false, "notarize": false }
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
| Field | Setup / checks |
|
|
259
|
+
|---|---|
|
|
260
|
+
| `appId` | Bundle ID and save location identifier, separate from the Steam App ID. Replace before distribution. |
|
|
261
|
+
| `appName` / `executableName` | Application display name / executable file name. |
|
|
262
|
+
| `companyName` | Windows company name. Falls back to `author.name` in `package.json`, then the game name. |
|
|
263
|
+
| `description` | Optional. Omitted or `null` uses the description from `package.json`. |
|
|
264
|
+
| `icons` | Paths relative to the game root, or absolute paths. Omitted OS entries use placeholders; missing specified files cause an error. |
|
|
265
|
+
| `architectures` | CPU settings from STEP1. `--arch` takes priority. |
|
|
266
|
+
| `steam.appId` / `steam.depots` | For distribution, replace `null` with actual App/Depot IDs. Do not infer Depot IDs from the App ID. Operating systems without a Depot ID are excluded from uploading. |
|
|
267
|
+
| `steam.branch` | Target branch; defaults to `internal`. |
|
|
268
|
+
| `macos.sign` / `macos.notarize` | Both `false` for local testing; both `true` for distribution. |
|
|
269
|
+
|
|
270
|
+
### STEP4: Prepare credentials
|
|
271
|
+
|
|
272
|
+
#### macOS signing and notarization
|
|
273
|
+
|
|
274
|
+
Install a **Developer ID Application certificate and private key** in the keychain, then find the signing identity:
|
|
275
|
+
|
|
276
|
+
```sh
|
|
277
|
+
security find-identity -v -p codesigning
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Use the complete `Developer ID Application: ...` name shown.
|
|
281
|
+
Use a notarization profile previously registered with `xcrun notarytool store-credentials`.
|
|
282
|
+
Apple ID authentication requires an app-specific password. Do not store credentials in JSON.
|
|
283
|
+
|
|
284
|
+
```sh
|
|
285
|
+
export APPLE_SIGNING_IDENTITY='Developer ID Application: YOUR NAME (TEAMID)'
|
|
286
|
+
export APPLE_NOTARY_PROFILE='your-notary-profile'
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Resolve signing/notarization failures before uploading. `Signature=adhoc` / `TeamIdentifier=not set` means Developer ID signing is incomplete.
|
|
290
|
+
|
|
291
|
+
#### SteamCMD
|
|
292
|
+
|
|
293
|
+
Obtain SteamCMD from the [Steamworks SDK ContentBuilder](https://partner.steamgames.com/doc/sdk/uploading).
|
|
294
|
+
Grant the build account `Edit App Metadata` and `Publish App Changes To Steam` permissions.
|
|
295
|
+
Example for macOS / Linux; replace the path and Steam login name:
|
|
296
|
+
|
|
297
|
+
```sh
|
|
298
|
+
export STEAMCMD="/absolute/path/to/steamcmd.sh"
|
|
299
|
+
export STEAM_USERNAME="your_build_account"
|
|
300
|
+
"$STEAMCMD" +login "$STEAM_USERNAME" +quit
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
- Enter the password and any requested Steam Guard code, then **wait for normal exit after login**. After manual login, enter `quit`.
|
|
304
|
+
- The builder reuses saved credentials for the same SteamCMD/account. If `Cached credentials not found` appears, rerun the login command above.
|
|
305
|
+
- On Windows, use `steamcmd.exe` and PowerShell's `$env:STEAMCMD` / `$env:STEAM_USERNAME`. `STEAMCMD` accepts only an executable path; `.sh` files need executable permission.
|
|
306
|
+
- In CI, restore SteamCMD's `config/config.vdf` from a Secret and exclude it from artifacts.
|
|
307
|
+
|
|
308
|
+
### STEP5: Export and check the packages
|
|
309
|
+
|
|
310
|
+
Run from the game root. No additional application build or installer is needed.
|
|
311
|
+
|
|
312
|
+
```sh
|
|
313
|
+
npx @next2d/builder --platform steam:windows --env prd
|
|
314
|
+
npx @next2d/builder --platform steam:macos --env prd
|
|
315
|
+
npx @next2d/builder --platform steam:linux --env prd
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
- Append `--arch arm64` or another supported value to change the CPU. Each OS uses its last successful architecture export.
|
|
319
|
+
- Output is under `dist/steam/<OS>/build/<env>/`. Keep the entire contents, not just the executable.
|
|
320
|
+
- When collecting packages from other machines or CI, preserve this layout, including `steam-package.json` and `*-steampipe/`. Transfer as `tar.gz` to retain symlinks and executable permissions.
|
|
321
|
+
- Re-export affected operating systems after configuration/version changes. Keep every upload target on the same version and intended revision.
|
|
322
|
+
|
|
323
|
+
For macOS distribution, run these checks with your package path:
|
|
324
|
+
|
|
325
|
+
```sh
|
|
326
|
+
codesign --verify --deep --strict --verbose=2 'dist/steam/macos/build/prd/My Game-darwin-universal/My Game.app'
|
|
327
|
+
echo $?
|
|
328
|
+
xcrun stapler validate 'dist/steam/macos/build/prd/My Game-darwin-universal/My Game.app'
|
|
329
|
+
echo $?
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
| Check | Successful output | Immediately following `echo $?` |
|
|
333
|
+
|---|---|---|
|
|
334
|
+
| `codesign` | `valid on disk` / `satisfies its Designated Requirement` | `0` |
|
|
335
|
+
| `stapler` | `The validate action worked!` | `0` |
|
|
336
|
+
|
|
337
|
+
Resolve nonzero results and verify again. These commands check the package; they do not sign or notarize it.
|
|
338
|
+
|
|
339
|
+
### STEP6: Configure launching, upload and test
|
|
340
|
+
|
|
341
|
+
#### Configure executable paths
|
|
342
|
+
|
|
343
|
+
Set OS-specific Launch Options in Steamworks under Installation > General Installation.
|
|
344
|
+
**An OS prefix is added when multiple operating systems use the same Depot ID.** Examples use STEP3's application/executable names.
|
|
345
|
+
|
|
346
|
+
| Depot layout | Windows Executable | macOS Executable | Linux Executable |
|
|
347
|
+
|---|---|---|---|
|
|
348
|
+
| One depot, one OS (Windows example) | `my-game.exe` | — | — |
|
|
349
|
+
| One depot shared by all operating systems | `windows/my-game.exe` | `macos/My Game.app` | `linux/my-game` |
|
|
350
|
+
| Multiple depots, separate per OS | `my-game.exe` | `My Game.app` | `my-game` |
|
|
351
|
+
| Multiple depots, Windows/macOS sharing only | `windows/my-game.exe` | `macos/My Game.app` | `my-game` |
|
|
352
|
+
|
|
353
|
+
- A macOS-only / Linux-only depot also omits the OS prefix: use `My Game.app` / `my-game`.
|
|
354
|
+
- Paths are relative to the installation directory; omit `dist/steam/...`. Check actual values in `*-steampipe/launch.json` or dry-run output.
|
|
355
|
+
- Leave Arguments / Working Directory empty. Set OS/CPU conditions (64-bit for x64), then Publish. Update launch paths when changing depot layouts.
|
|
356
|
+
|
|
357
|
+
#### Upload
|
|
358
|
+
|
|
359
|
+
Use the terminal where STEP4's login exited successfully.
|
|
360
|
+
|
|
361
|
+
```sh
|
|
362
|
+
npx @next2d/builder --steam-upload --env prd --dry-run
|
|
363
|
+
npx @next2d/builder --steam-upload --env prd
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
The builder validates all configured OS packages and uploads all depots in one operation. No prior `--steam-manifest` is needed.
|
|
367
|
+
Dry-run checks local files only, not Steam permissions, branches or passwords.
|
|
368
|
+
|
|
369
|
+
| Optional argument | Purpose |
|
|
370
|
+
|---|---|
|
|
371
|
+
| `--steam-branch internal` | Overrides the target branch. Switch `default` through Steamworks. |
|
|
372
|
+
| `--steam-comment "Input fix"` | Build description. Defaults to `<appName> <version> (<env>, <branch>)`. Whitespace-only text, control characters, newlines, double quotes and backslashes are not allowed. |
|
|
373
|
+
| `--steam-root dist/steam` | Package collection root. Required for custom output locations. |
|
|
374
|
+
|
|
375
|
+
Do not combine uploads with `--platform` / `--arch` / `--build` / `--preview` / `--open` / `--steam-manifest`.
|
|
376
|
+
|
|
377
|
+
#### Verify completion
|
|
378
|
+
|
|
379
|
+
1. Check that the BuildID in `dist/steam/uploads/<env>/<branch>-<identifier>/upload-result.json` is active on the target Steamworks branch. Substitute your custom output root for `dist/steam` if applicable.
|
|
380
|
+
2. In the Steam client's Properties > Game Versions & Betas, enter the password and select `internal`.
|
|
381
|
+
3. Test installation, launch, exit, input, audio, fullscreen, offline launch and saves after updates on each OS. Test macOS Universal on both Intel and Apple Silicon.
|
|
382
|
+
4. Test advertised Overlay, Steam Deck and Linux support on hardware, matching the store listing. Achievements, DRM and Steam Cloud are not integrated automatically.
|
|
383
|
+
|
|
384
|
+
For failures, inspect SteamPipe logs in `dist/steam/uploads/<env>/cache/<branch>/`.
|
package/docs/xbox.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Xbox(試作・開発段階 / Prototype under development)
|
|
2
|
+
|
|
3
|
+
[日本語](#日本語) | [English](#english)
|
|
4
|
+
|
|
5
|
+
## 日本語
|
|
6
|
+
|
|
7
|
+
Xbox対応はGDK向けネイティブホストの試作・開発段階。Xbox実機での動作確認・配布対応は完了していない。
|
|
8
|
+
以下は開発環境での検証手順。
|
|
9
|
+
|
|
10
|
+
### STEP1:検証範囲に必要な環境を用意する
|
|
11
|
+
|
|
12
|
+
| 検証範囲 | ユーザーが用意するもの |
|
|
13
|
+
|---|---|
|
|
14
|
+
| ホスト生成・アセット準備のみ | macOS / Linuxでも実行できる。 |
|
|
15
|
+
| C++ホストのビルド | Windows、Visual Studio 2022、Microsoft GDK、CMake 3.26以降。現行builderはVisual Studio 2022ジェネレーターを指定する。 |
|
|
16
|
+
| Xbox実機での検証 | コンソール向けGDK開発環境とXbox開発機(devkit)。PC向けのGDK検証環境とは区別して用意する。 |
|
|
17
|
+
|
|
18
|
+
### STEP2:ゲーム設定とV8を用意する
|
|
19
|
+
|
|
20
|
+
ゲームルートの `MicrosoftGame.config` にゲーム固有の値を設定する。
|
|
21
|
+
未配置の場合は初回のホスト生成でテンプレートから作られるため、生成後に内容を確認・変更する。
|
|
22
|
+
|
|
23
|
+
V8はJavaScript実行エンジン。通常はbuilderがビルド済みライブラリを取得し、自前ビルドを使う場合だけパスを指定する。
|
|
24
|
+
描画用のDawn(WebGPU → D3D12)はCMakeのFetchContentが取得するため、初回取得にはネットワーク接続が必要。
|
|
25
|
+
|
|
26
|
+
Windowsでのビルド時は、次の優先順でV8を解決する。
|
|
27
|
+
|
|
28
|
+
1. `--v8-root` で指定したパス
|
|
29
|
+
2. 環境変数 `V8_ROOT`
|
|
30
|
+
3. キャッシュ済みのビルド済みV8
|
|
31
|
+
4. Next2D/builderのGitHub Releasesからダウンロード
|
|
32
|
+
|
|
33
|
+
ビルド済みV8は `build-v8` ワークフローで作成・公開する構成になっている。
|
|
34
|
+
取得対象のバージョンとリビジョンはbuilder側で固定し、取得後はキャッシュを再利用する。
|
|
35
|
+
自前のV8を使用する場合:
|
|
36
|
+
|
|
37
|
+
```bat
|
|
38
|
+
npx @next2d/builder --platform xbox --env prd --v8-root C:\path\to\v8
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
公開しているWindows x64用V8の利用と、Xboxコンソール向けの互換性検証は別の作業。
|
|
42
|
+
コンソール向けにはGDKツールチェーンでの調整・再ビルドを含む検証が残っている。
|
|
43
|
+
|
|
44
|
+
### STEP3:ホストを生成・ビルドする
|
|
45
|
+
|
|
46
|
+
ゲームルートで実行する。
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx @next2d/builder --platform xbox --env prd
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
builder同梱のC++ / CMakeテンプレートから `xbox/` を生成・更新し、`MicrosoftGame.config` を反映する。
|
|
53
|
+
Webビルド結果とホストスクリプトを `assets.pak` / `assets.rc` にまとめ、実行ファイルへの埋め込み用に配置する。
|
|
54
|
+
このホストはV8とDawnを使い、ElectronやWebViewは使用しない。
|
|
55
|
+
|
|
56
|
+
| 実行環境・引数 | コマンドの到達点 |
|
|
57
|
+
|---|---|
|
|
58
|
+
| Windows | V8を解決し、CMakeでGDK向けの構成・ビルドを実行する。対象環境での検証が必要。 |
|
|
59
|
+
| Windows + `--open` / `--preview` | CMakeで構成した後、Visual Studioのソリューションを開く。実行・デバッグはVisual Studio側で行う。 |
|
|
60
|
+
| macOS / Linux | ホスト生成とアセット準備までで終了する。GDK向け実行ファイルは生成しない。 |
|
|
61
|
+
|
|
62
|
+
### STEP4:生成物と対象環境での動作を確認する
|
|
63
|
+
|
|
64
|
+
コマンドの終了だけでXbox向けの配布物が完成したとは判断せず、生成物とログを確認する。
|
|
65
|
+
|
|
66
|
+
`xbox-host-ci` ワークフローには、ラスタライザーとstbの回帰テスト、Windows APIを使う一部機能のテスト、
|
|
67
|
+
V8依存ソースのコンパイル確認、Game Core APIの確認を用意している。
|
|
68
|
+
これらはホスト全体のリンクやXbox実機での動作を保証するものではない。
|
|
69
|
+
Dawn / GDKを含む統合ビルドと、ゲームを使った実機検証が必要。
|
|
70
|
+
|
|
71
|
+
今後の検証・調整対象は、描画、Worker、入力、音声、テキスト、保存処理、性能、配布設定など。
|
|
72
|
+
詳細なホスト構成・自前V8のビルド・機能ごとの実装状況は、
|
|
73
|
+
[ホストテンプレートの開発資料](../templates/xbox/README.md)を参照する。
|
|
74
|
+
同じ資料は生成先の `xbox/README.md` にも配置される。
|
|
75
|
+
|
|
76
|
+
## English
|
|
77
|
+
|
|
78
|
+
Xbox support is a prototype GDK native host under development. Xbox hardware validation and distribution support are not complete.
|
|
79
|
+
The following steps are for development testing.
|
|
80
|
+
|
|
81
|
+
### STEP1: Prepare the environment for your validation scope
|
|
82
|
+
|
|
83
|
+
| Validation scope | What you need to prepare |
|
|
84
|
+
|---|---|
|
|
85
|
+
| Host generation and asset preparation only | Also works on macOS / Linux. |
|
|
86
|
+
| Building the C++ host | Windows, Visual Studio 2022, Microsoft GDK and CMake 3.26 or later. The current builder selects the Visual Studio 2022 generator. |
|
|
87
|
+
| Testing on Xbox hardware | A console GDK development environment and Xbox development hardware (devkit), distinct from a PC GDK testing environment. |
|
|
88
|
+
|
|
89
|
+
### STEP2: Prepare game configuration and V8
|
|
90
|
+
|
|
91
|
+
Set game-specific values in `MicrosoftGame.config` at the game root.
|
|
92
|
+
If absent, it is created from the template during initial host generation; review and edit it afterward.
|
|
93
|
+
|
|
94
|
+
V8 is the JavaScript engine. The builder normally downloads a prebuilt library; specify a path only when using your own build.
|
|
95
|
+
CMake FetchContent acquires Dawn (WebGPU → D3D12) for rendering, so the first download requires network access.
|
|
96
|
+
|
|
97
|
+
For Windows builds, V8 is resolved in this order:
|
|
98
|
+
|
|
99
|
+
1. The path passed with `--v8-root`
|
|
100
|
+
2. The `V8_ROOT` environment variable
|
|
101
|
+
3. A cached prebuilt V8
|
|
102
|
+
4. A download from the Next2D/builder GitHub Releases
|
|
103
|
+
|
|
104
|
+
The `build-v8` workflow is configured to build and publish prebuilt V8 libraries.
|
|
105
|
+
The builder pins the download version and revision and reuses the cache after downloading.
|
|
106
|
+
To use your own V8 build:
|
|
107
|
+
|
|
108
|
+
```bat
|
|
109
|
+
npx @next2d/builder --platform xbox --env prd --v8-root C:\path\to\v8
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Using the published Windows x64 V8 library and validating Xbox console compatibility are separate tasks.
|
|
113
|
+
Console support still needs validation, including adjustments or rebuilds with the GDK toolchain.
|
|
114
|
+
|
|
115
|
+
### STEP3: Generate and build the host
|
|
116
|
+
|
|
117
|
+
Run from the game root:
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
npx @next2d/builder --platform xbox --env prd
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The builder creates or updates `xbox/` from its bundled C++ / CMake templates and applies `MicrosoftGame.config`.
|
|
124
|
+
It packs the web build output and host scripts into `assets.pak` / `assets.rc` for embedding in the executable.
|
|
125
|
+
The host uses V8 and Dawn, without Electron or WebView.
|
|
126
|
+
|
|
127
|
+
| Environment / options | What the command completes |
|
|
128
|
+
|---|---|
|
|
129
|
+
| Windows | Resolves V8, then configures and builds the GDK target with CMake. Target-environment validation is still needed. |
|
|
130
|
+
| Windows + `--open` / `--preview` | Opens the Visual Studio solution after CMake configuration. Run and debug from Visual Studio. |
|
|
131
|
+
| macOS / Linux | Stops after host generation and asset preparation; no GDK executable is built. |
|
|
132
|
+
|
|
133
|
+
### STEP4: Check the output and target-environment behavior
|
|
134
|
+
|
|
135
|
+
Command completion alone does not mean an Xbox distribution package is ready; inspect the output and logs.
|
|
136
|
+
|
|
137
|
+
The `xbox-host-ci` workflow includes rasterizer and stb regression tests, tests for selected Windows API functionality,
|
|
138
|
+
compilation checks for V8-dependent sources and Game Core API checks.
|
|
139
|
+
These checks do not guarantee that the complete host links or runs on Xbox hardware.
|
|
140
|
+
An integrated build with Dawn / GDK and testing with a game on the target hardware are still required.
|
|
141
|
+
|
|
142
|
+
Remaining validation and adjustments cover rendering, Workers, input, audio, text, save handling, performance and distribution settings.
|
|
143
|
+
For the detailed host architecture, instructions for building V8 yourself and implementation status by feature,
|
|
144
|
+
see the [host template development notes](../templates/xbox/README.md).
|
|
145
|
+
The same notes are copied to the generated `xbox/README.md`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
|
-
"templates"
|
|
32
|
+
"templates",
|
|
33
|
+
"docs"
|
|
33
34
|
],
|
|
34
35
|
"repository": {
|
|
35
36
|
"type": "git",
|
|
@@ -38,20 +39,16 @@
|
|
|
38
39
|
"bin": {
|
|
39
40
|
"@next2d/builder": "dist/index.js"
|
|
40
41
|
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@electron-forge/core": "^7.11.2",
|
|
43
|
-
"@types/node": "^26.4.0",
|
|
44
|
-
"picocolors": "^1.1.1",
|
|
45
|
-
"vite": "^8.2.2"
|
|
46
|
-
},
|
|
47
42
|
"devDependencies": {
|
|
48
43
|
"@eslint/eslintrc": "^3.3.7",
|
|
49
44
|
"@eslint/js": "^10.0.1",
|
|
50
|
-
"@
|
|
51
|
-
"@typescript-eslint/
|
|
52
|
-
"eslint": "^
|
|
45
|
+
"@types/node": "^26.6.3",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^8.70.1",
|
|
47
|
+
"@typescript-eslint/parser": "^8.70.1",
|
|
48
|
+
"eslint": "^10.11.0",
|
|
53
49
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
54
50
|
"globals": "^17.12.0",
|
|
55
|
-
"typescript": "^6.0.3"
|
|
51
|
+
"typescript": "^6.0.3",
|
|
52
|
+
"vite": "^8.3.1"
|
|
56
53
|
}
|
|
57
54
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>com.apple.security.cs.allow-jit</key>
|
|
6
|
+
<true/>
|
|
7
|
+
<key>com.apple.security.cs.disable-library-validation</key>
|
|
8
|
+
<true/>
|
|
9
|
+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
|
10
|
+
<true/>
|
|
11
|
+
</dict>
|
|
12
|
+
</plist>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|