@next2d/builder 0.2.0 → 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 +2 -0
- package/dist/electron-config.d.ts +10 -0
- package/dist/electron-config.js +22 -4
- package/dist/electron-host.d.ts +3 -1
- package/dist/electron-host.js +15 -3
- package/dist/electron-native.d.ts +15 -0
- package/dist/electron-native.js +73 -0
- package/dist/electron.js +5 -4
- package/docs/native-bridge.md +147 -0
- package/docs/steam.md +176 -506
- package/package.json +3 -3
- package/templates/electron/index.js +27 -3
- package/templates/electron/native-bridge.cjs +98 -0
- package/templates/electron/preload.cjs +11 -0
package/docs/steam.md
CHANGED
|
@@ -4,69 +4,44 @@
|
|
|
4
4
|
|
|
5
5
|
## 日本語
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
ローカル書き出しはSTEP1・3・5を実施する。Steam配布時は全STEPが必要。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
OS機能やネイティブSDKを別プロセスで接続する場合は [ネイティブ機能の拡張](native-bridge.md) を参照。EOSはその利用例として紹介しています。
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- Next2D Frameworkのテンプレートの `src/assets/icons/` にWindows用ICO、macOS用ICNS、Linux用PNGを用意する。
|
|
13
|
-
テンプレートの仮アイコンは配布前に差し替える。設定の省略時の扱いはSTEP3の表を参照。
|
|
11
|
+
### STEP1:環境・アイコンを用意する
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
macOSのUniversal書き出し・署名・公証はmacOSで実行する。
|
|
14
|
+
テンプレートの `src/assets/icons/` の仮アイコンを、Windows用ICO・macOS用ICNS・Linux用PNGに差し替える。
|
|
16
15
|
|
|
17
|
-
| OS |
|
|
16
|
+
| OS | 既定CPU | `architectures` / `--arch` の対応値 |
|
|
18
17
|
|---|---|---|
|
|
19
18
|
| Windows | `x64` | `x64`, `arm64` |
|
|
20
19
|
| macOS | `universal` | `x64`, `arm64`, `universal` |
|
|
21
20
|
| Linux | `x64` | `x64`, `arm64` |
|
|
22
21
|
|
|
23
|
-
### STEP2:Steamworks
|
|
22
|
+
### STEP2:Steamworksを設定する
|
|
24
23
|
|
|
25
|
-
1.
|
|
26
|
-
2. SteamPipe > DepotsでDepotを作成し、対象OS
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
名前だけでは非公開にならず、builderはブランチ作成・パスワード設定や確認を行わない。
|
|
31
|
-
4. テスターにゲームと対象Depotの利用権を用意する。未発売ゲームの外部テスターには
|
|
32
|
-
Release State Override(beta)キー等を使う。ブランチのパスワードだけでは利用権は付与されない。
|
|
33
|
-
パスワードを第三者に共有しないよう運用し、JSONやリポジトリにも保存しない。
|
|
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キー等を使う。
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
**パスワードだけではゲームの利用権は付与されない。** builderはブランチ作成やパスワード設定を行わない。
|
|
36
31
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|
|
41
|
-
| Windows / macOS / Linuxを別Depotにする | 対応。各Depotの対象OSを指定する。 | 対応。`steam.depots` の各OSに異なる発行済みIDを設定する。 |
|
|
42
|
-
| 複数OSを1つのDepotにまとめる | 対応。対象OSをAll OSesなど構成に合わせる。 | 対応。対象OSに同じIDを設定する。各OSのファイルをサブディレクトリに分ける。全対象OSのファイルを配布するため容量が増える。 |
|
|
43
|
-
| 一部OSだけ同じDepotにする | 対応。 | 対応。共有するOSだけ同じIDにする。 |
|
|
44
|
-
| 同じOS向けに本体・共通アセット・言語などを複数Depotに分ける | 対応。複数Depotの内容をインストール時に組み合わせる。 | 未対応。各OSの値は単一のDepot IDで、配列や追加アセット用キーには対応しない。 |
|
|
45
|
-
|
|
46
|
-
builderの設定可能数は各OSに1 ID、全体で最大3つの異なるID。この上限はbuilderの設定形式によるもので、Steamの上限ではない。
|
|
47
|
-
OSごとの成果物を揃える手順と起動パスはSTEP5、複数Depotを1回でアップロードする手順はSTEP6を参照する。
|
|
48
|
-
|
|
49
|
-
Steam側のダウンロード対象はPackageの利用権とDepotのOS・言語などの条件で決まる。
|
|
50
|
-
同時にインストールするDepotで同じパスが重なると、Depot一覧の後にあるものが優先されるため、ファイルの配置を確認する。
|
|
51
|
-
これらの選択条件はSteamworks側で設定し、builderのJSONからは反映しない。
|
|
32
|
+
| Depot構成 | 設定 |
|
|
33
|
+
|---|---|
|
|
34
|
+
| OS別(Valve推奨) | OSごとに異なる発行済みDepot IDを指定する。 |
|
|
35
|
+
| 複数OSで共用 | 同じIDを指定し、Steamworksの対象OSをAll OSesなどに合わせる。全対象OSのファイルを配布する。 |
|
|
52
36
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Steamworksの「Add Shared Depot」は別AppのDepotを参照する機能であり、builderの同一ID指定とは別の操作。
|
|
37
|
+
Steamは複数Depotに対応。builderは各OSに1 IDまでで、一部OSだけの共用も可能。
|
|
38
|
+
同一OSを複数Depotへ分割する構成は未対応。ブランチごとにDepotを作る必要はない。
|
|
56
39
|
|
|
57
|
-
[Depot
|
|
58
|
-
[Packageと利用権](https://partner.steamgames.com/doc/store/application/packages) /
|
|
59
|
-
[複数Depotのアップロード](https://partner.steamgames.com/doc/sdk/uploading) /
|
|
60
|
-
[betaブランチ](https://partner.steamgames.com/doc/store/application/branches) /
|
|
61
|
-
[Steamでのテスト](https://partner.steamgames.com/doc/store/testing) /
|
|
62
|
-
[Release State Overrideキー](https://partner.steamgames.com/doc/features/keys)
|
|
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)
|
|
63
41
|
|
|
64
42
|
### STEP3:electron.config.jsonを設定する
|
|
65
43
|
|
|
66
|
-
|
|
67
|
-
JavaScript / TypeScriptの両テンプレートに含まれるので、初期値を自分のゲームの値に変更する。
|
|
68
|
-
`appId` は macOS bundle ID・保存先識別子、`steam.appId` は Valve の数値 App ID。
|
|
69
|
-
これらは別のID。バージョンはゲームルートの `package.json` を使う。
|
|
44
|
+
ゲームルートの設定を変更する。バージョンはルートの `package.json` を使う。
|
|
70
45
|
|
|
71
46
|
```json
|
|
72
47
|
{
|
|
@@ -90,62 +65,45 @@ JavaScript / TypeScriptの両テンプレートに含まれるので、初期値
|
|
|
90
65
|
}
|
|
91
66
|
```
|
|
92
67
|
|
|
93
|
-
| 項目 |
|
|
94
|
-
|
|
95
|
-
| `
|
|
96
|
-
| `appName` / `executableName` |
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `steam.
|
|
102
|
-
| `steam.
|
|
103
|
-
| `macos
|
|
104
|
-
|
|
105
|
-
|
|
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:認証を用意する
|
|
106
82
|
|
|
107
83
|
#### macOSの署名・公証
|
|
108
84
|
|
|
109
|
-
|
|
110
|
-
`xcrun notarytool store-credentials` で公証用プロファイルを保存する。認証情報はJSONへ書かない。
|
|
111
|
-
|
|
112
|
-
`APPLE_SIGNING_IDENTITY` に指定する署名IDは、次のコマンドで確認できる。
|
|
85
|
+
キーチェーンに **Developer ID Application証明書と秘密鍵** を登録し、署名IDを確認する。
|
|
113
86
|
|
|
114
87
|
```sh
|
|
115
88
|
security find-identity -v -p codesigning
|
|
116
89
|
```
|
|
117
90
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
91
|
+
表示された `Developer ID Application: ...` の名前全体を指定する。
|
|
92
|
+
公証プロファイルは `xcrun notarytool store-credentials` で事前登録した名前を使う。
|
|
93
|
+
Apple ID認証ではアプリ用パスワードが必要。認証情報はJSONへ保存しない。
|
|
121
94
|
|
|
122
95
|
```sh
|
|
123
96
|
export APPLE_SIGNING_IDENTITY='Developer ID Application: YOUR NAME (TEAMID)'
|
|
124
97
|
export APPLE_NOTARY_PROFILE='your-notary-profile'
|
|
125
98
|
```
|
|
126
99
|
|
|
127
|
-
|
|
128
|
-
またはSTEP5のmacOSコマンドに `NEXT2D_STEAM_RELEASE=1` を付けると、JSONのfalse指定に関わらず両方を必須にできる。
|
|
129
|
-
認証情報不足・署名失敗・公証失敗はビルド失敗となる。
|
|
130
|
-
署名エラーは公証へ進まずに停止する。`Signature=adhoc` / `TeamIdentifier=not set` が出る場合は、
|
|
131
|
-
Developer ID署名が付いていないため、先に表示された署名エラーとキーチェーンの証明書・秘密鍵を確認する。
|
|
132
|
-
|
|
133
|
-
Steam用のターゲットは `darwin`。Valveは新規macOSアプリに64bitとAppleの公証を要求する。
|
|
134
|
-
テンプレートのentitlementsはJITとSteam Overlay用のlibrary validation / DYLD設定を含み、
|
|
135
|
-
`com.apple.security.app-sandbox` は付けない(Chromiumのrenderer sandboxとは別)。
|
|
136
|
-
[Valveのプラットフォーム要件](https://partner.steamgames.com/doc/store/application/platforms) /
|
|
137
|
-
[Electron Packagerの署名・公証設定](https://electron.github.io/packager/main/interfaces/Options.html)
|
|
138
|
-
|
|
139
|
-
#### SteamCMDとビルドアカウント
|
|
100
|
+
署名・公証が失敗したらアップロードへ進まない。`Signature=adhoc` / `TeamIdentifier=not set` はDeveloper ID署名未完了。
|
|
140
101
|
|
|
141
|
-
|
|
142
|
-
Windowsは `steamcmd.exe`、macOS / Linuxは `steamcmd.sh` を使用できる。
|
|
143
|
-
PATH上の `steamcmd`(Windowsは `steamcmd.exe`)を使うか、環境変数 `STEAMCMD` に実行ファイルのパスを指定する。
|
|
144
|
-
引数やシェルコマンドを含めず、パスだけを指定する。`.sh` は実行権限が必要。
|
|
145
|
-
SteamCMD自体の実行に必要なOSライブラリはSteamCMDの手順に従って用意する。
|
|
102
|
+
#### SteamCMD
|
|
146
103
|
|
|
147
|
-
|
|
148
|
-
|
|
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ログイン名を置き換える):
|
|
149
107
|
|
|
150
108
|
```sh
|
|
151
109
|
export STEAMCMD="/absolute/path/to/steamcmd.sh"
|
|
@@ -153,21 +111,14 @@ export STEAM_USERNAME="your_build_account"
|
|
|
153
111
|
"$STEAMCMD" +login "$STEAM_USERNAME" +quit
|
|
154
112
|
```
|
|
155
113
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
`
|
|
159
|
-
|
|
160
|
-
Steamアプリへのログインだけでは、このSteamCMDの認証準備を完了したことにはならない。
|
|
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として復元し、成果物に含めない。
|
|
161
118
|
|
|
162
|
-
|
|
163
|
-
認証が失効した場合は、上の `"$STEAMCMD" +login "$STEAM_USERNAME" +quit` を再実行し、正常終了後にアップロードを再実行する。
|
|
164
|
-
builderからの実行は対話入力を待たず失敗させるため、builderの再実行だけではログイン情報を登録できない。
|
|
165
|
-
CIではSteamCMDの `config/config.vdf` をSecretとして復元・管理し、ビルド成果物に含めない。
|
|
166
|
-
Windows PowerShellでは `$env:STEAMCMD` と `$env:STEAM_USERNAME` を設定する。
|
|
119
|
+
### STEP5:書き出し・成果物を確認する
|
|
167
120
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
ゲームルートで必要なOSのコマンドを実行する。書き出しはアップロード・公開を行わない。
|
|
121
|
+
ゲームルートで実行する。追加のアプリビルドやインストーラー作成は不要。
|
|
171
122
|
|
|
172
123
|
```sh
|
|
173
124
|
npx @next2d/builder --platform steam:windows --env prd
|
|
@@ -175,31 +126,12 @@ npx @next2d/builder --platform steam:macos --env prd
|
|
|
175
126
|
npx @next2d/builder --platform steam:linux --env prd
|
|
176
127
|
```
|
|
177
128
|
|
|
178
|
-
CPU
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
既定の出力先は `dist/steam/<OS>/build/<env>/`。
|
|
183
|
-
|
|
184
|
-
| OS | 配布するフォルダ全体 | OS別DepotのExecutable | 共有DepotのExecutable |
|
|
185
|
-
|---|---|---|---|
|
|
186
|
-
| Windows | `My Game-win32-x64/` | `my-game.exe` | `windows/my-game.exe` |
|
|
187
|
-
| macOS | `My Game-darwin-universal/` | `My Game.app` | `macos/My Game.app` |
|
|
188
|
-
| Linux | `My Game-linux-x64/` | `my-game` | `linux/my-game` |
|
|
189
|
-
|
|
190
|
-
実際の起動パス・CPU・ContentRootは `*-steampipe/launch.json` を参照する。
|
|
191
|
-
実行ファイルだけでなく、Electronのライブラリ・locales・ライセンス・resourcesを含むフォルダ全体が配布対象。
|
|
192
|
-
Steam用のDMG/DEB/MSIは不要で、書き出し後に追加のアプリビルドは行わない。
|
|
129
|
+
- CPU変更は `--arch arm64` 等を追加する。同一OSは最後に成功したCPUの成果物を使う。
|
|
130
|
+
- 出力は `dist/steam/<OS>/build/<env>/`。実行ファイルだけでなく、配下のフォルダ全体を保持する。
|
|
131
|
+
- 別マシン・CIから集める場合も `steam-package.json` と `*-steampipe/` を含む同じ階層を保つ。`tar.gz` で転送し、シンボリックリンク・実行権限を維持する。
|
|
132
|
+
- 設定・バージョン変更後は対象OSを再書き出しする。アップロード対象の全OSを同じバージョン・意図したリビジョンで揃える。
|
|
193
133
|
|
|
194
|
-
|
|
195
|
-
同じ `dist/steam/<OS>/build/<env>/` 構成に集める。macOSのシンボリックリンクとLinuxの実行権限を保つため、
|
|
196
|
-
CI artifactは `tar.gz` にして転送する。カスタム出力先はSTEP6の `--steam-root` で指定する。
|
|
197
|
-
|
|
198
|
-
設定・バージョンを変えたら対象OSを再書き出しする。同じバージョン番号でも全OSを意図したリビジョンで揃える。
|
|
199
|
-
同じOSのx64とarm64を順に書き出すと、最後に成功したCPUの成果物を使う。
|
|
200
|
-
同じOSの複数CPUを1つの共有Depotへ同時に統合する処理は行わない。
|
|
201
|
-
|
|
202
|
-
配布用macOSアプリは署名・公証・staple完了を確認する(パスは成果物に合わせる):
|
|
134
|
+
macOS配布用は次を実行する(パスは成果物に合わせる):
|
|
203
135
|
|
|
204
136
|
```sh
|
|
205
137
|
codesign --verify --deep --strict --verbose=2 'dist/steam/macos/build/prd/My Game-darwin-universal/My Game.app'
|
|
@@ -209,219 +141,97 @@ echo $?
|
|
|
209
141
|
```
|
|
210
142
|
|
|
211
143
|
| 検証 | 正常時の出力 | 直後の `echo $?` |
|
|
212
|
-
|
|
213
|
-
| `codesign
|
|
214
|
-
| `
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| `codesign` | `valid on disk` / `satisfies its Designated Requirement` | `0` |
|
|
146
|
+
| `stapler` | `The validate action worked!` | `0` |
|
|
215
147
|
|
|
216
|
-
`
|
|
217
|
-
`echo $?` は確認したいコマンドの直後に実行する。`0` 以外なら検証失敗なので、出力されたエラーを解消して再確認する。
|
|
218
|
-
これらは署名と添付済み公証チケットを検証するコマンドであり、署名・公証を実施する操作ではない。
|
|
219
|
-
両方が成功した後も、STEP6でSteamからのインストール・起動を確認する。
|
|
148
|
+
`0` 以外ならエラーを解消して再検証する。これらは検証コマンドで、署名・公証自体は実行しない。
|
|
220
149
|
|
|
221
|
-
|
|
150
|
+
### STEP6:起動設定・アップロード・動作確認
|
|
222
151
|
|
|
223
|
-
|
|
152
|
+
#### 起動ファイルを設定する
|
|
224
153
|
|
|
225
|
-
SteamworksのInstallation > General Installation
|
|
226
|
-
|
|
227
|
-
x64版は64bit条件を指定する。対応OS・最低OS要件は同梱Electronと実機検証に合わせ、Steamworksで変更をPublishする。
|
|
154
|
+
SteamworksのInstallation > General InstallationでOS別Launch Optionを設定する。
|
|
155
|
+
**同じDepot IDを複数OSで使う場合に、起動パスへOS名が付く。** 例はSTEP3のゲーム名・実行ファイル名に対応する。
|
|
228
156
|
|
|
229
|
-
|
|
230
|
-
|
|
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` |
|
|
231
163
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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構成変更時は起動パスも更新する。
|
|
235
167
|
|
|
236
|
-
|
|
237
|
-
npx @next2d/builder --steam-upload --env prd
|
|
238
|
-
```
|
|
168
|
+
#### アップロードする
|
|
239
169
|
|
|
240
|
-
|
|
241
|
-
Steamworksの「あなたのビルド」の説明(SteamPipeの `Desc`)に反映される。
|
|
170
|
+
STEP4のログインが正常終了したターミナルで実行する。
|
|
242
171
|
|
|
243
172
|
```sh
|
|
244
|
-
npx @next2d/builder --steam-upload --env prd --
|
|
173
|
+
npx @next2d/builder --steam-upload --env prd --dry-run
|
|
174
|
+
npx @next2d/builder --steam-upload --env prd
|
|
245
175
|
```
|
|
246
176
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
| `--steam-branch internal` | `steam.branch` の反映先を上書き。`SetLive` で反映を要求する。`default` は指定不可で、一般公開用ビルドの切り替えはSteamworksで行う。 |
|
|
250
|
-
| `--steam-comment "コメント"` | アップロードコメントを指定する。未指定時は従来どおり `<appName> <version> (<env>, <branch>)`。空白のみ・改行・制御文字・ダブルクォート・バックスラッシュは使用不可。`--dry-run` の出力と `upload-plan.json` でも確認できる。 |
|
|
251
|
-
| `--steam-root dist/steam` | 成果物の収集先。既定は `dist/steam`。ゲームルートからの相対パスまたは絶対パス。アップロード時はVite設定を読まないため、カスタム出力先では明示する。 |
|
|
252
|
-
| `--dry-run` | パッケージと設定の整合性を検証する。Steam側の権限・ブランチ・パスワードの確認は行わない。 |
|
|
253
|
-
| 併用しない引数 | `--build` / `--preview` / `--open` / `--steam-manifest` / `--arch`。`--platform` も不要。 |
|
|
254
|
-
|
|
255
|
-
対応するテンプレートのnpmスクリプトは `upload:steam:check` / `upload:steam`。
|
|
256
|
-
|
|
257
|
-
builderは `steam.depots` に設定された全OSの `steam-package.json` と実行ファイルを検証し、
|
|
258
|
-
App ID・Depot ID・バージョン・ゲーム名・CPUに不足や不整合があればSteamCMD起動前に停止する。
|
|
259
|
-
VDFは検証結果から再生成する。通常の書き出し用VDFは変更しない。
|
|
260
|
-
|
|
261
|
-
| 保存先(`--steam-root` 配下) | 内容 |
|
|
262
|
-
|---|---|
|
|
263
|
-
| `uploads/<env>/<branch>-<識別子>/` | VDF、`upload-plan.json`。dry-runは `Preview=1`、`SetLive`なし。アップロード成功時はBuildIDを `upload-result.json` に記録。 |
|
|
264
|
-
| `uploads/<env>/cache/<branch>/` | SteamPipeのログ・差分キャッシュ。 |
|
|
265
|
-
|
|
266
|
-
SteamworksのBuilds画面で、記録されたBuildIDが対象ブランチの現在のビルドになっていることを確認する。
|
|
267
|
-
アカウントやアプリの状態によってSteam側の追加確認が必要になる場合がある。
|
|
268
|
-
テスターはSteamクライアントのプロパティ > ゲームバージョンとベータでパスワードを入力し、`internal` を選ぶ。
|
|
269
|
-
各OSでインストール・起動を確認し、macOS UniversalはIntel / Apple Siliconの両方でテストする。
|
|
270
|
-
|
|
271
|
-
### 参照:VDFの生成と手動アップロード
|
|
272
|
-
|
|
273
|
-
builderのSTEP6を使う場合、この節の操作は不要。SteamCMDを直接操作する場合に使う。
|
|
177
|
+
設定した全OSの成果物を検証し、全Depotを1回でアップロードする。事前の `--steam-manifest` は不要。
|
|
178
|
+
dry-runはローカル検証のみで、Steam側の権限・ブランチ・パスワードは確認しない。
|
|
274
179
|
|
|
275
|
-
|
|
|
180
|
+
| 任意の引数 | 用途 |
|
|
276
181
|
|---|---|
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
280
|
-
一部OSだけDepot IDを共有する構成にも対応する。`FileMapping` でOS別サブディレクトリへ配置し、アセットは再コピーしない。
|
|
281
|
-
別マシンの成果物を集めた後に共有DepotのVDFだけを再生成する場合:
|
|
282
|
-
|
|
283
|
-
```sh
|
|
284
|
-
npx @next2d/builder --platform steam:macos --env prd --steam-manifest
|
|
285
|
-
```
|
|
182
|
+
| `--steam-branch internal` | 反映先を上書き。`default` への切り替えはSteamworksで行う。 |
|
|
183
|
+
| `--steam-comment "操作修正"` | ビルド説明。未指定は `<appName> <version> (<env>, <branch>)`。空白のみ・制御文字・改行・ダブルクォート・バックスラッシュは不可。 |
|
|
184
|
+
| `--steam-root dist/steam` | 成果物の収集先。カスタム出力先では指定必須。 |
|
|
286
185
|
|
|
287
|
-
|
|
288
|
-
`--platform` はVite設定を読むための指定で、設定内のすべての共有Depotを統合する。
|
|
289
|
-
`build.outDir` と `--env` から最新の成功した書き出しを選び、App ID・Depot ID・ゲーム名・実行ファイル名・バージョンを検証する。
|
|
290
|
-
不足パッケージは終了コード1となり、古い統合VDFは再生成時に無効化する。
|
|
291
|
-
`--arch` / `--preview` / `--build` / `--open` とは併用できない。
|
|
186
|
+
アップロードには `--platform` / `--arch` / `--build` / `--preview` / `--open` / `--steam-manifest` を併用しない。
|
|
292
187
|
|
|
293
|
-
|
|
294
|
-
`depot_build.vdf` はフォルダ内容の再帰マッピング用。`steam_appid.txt` は配布対象から除外する。
|
|
295
|
-
ContentRootはVDFからの相対パスなので、単独Depotはアプリと `*-steampipe/` をセットで、共有Depotは `dist/steam/` 全体の構成を保って移動する。
|
|
188
|
+
#### 完了を確認する
|
|
296
189
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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は自動統合されない。
|
|
301
194
|
|
|
302
|
-
|
|
303
|
-
OS別VDFは1つのDepotを更新するので、最終BuildのDepot manifestが全OSで意図した版になっているか確認する。
|
|
304
|
-
[SteamPipe公式手順・VDF仕様](https://partner.steamgames.com/doc/sdk/uploading)
|
|
305
|
-
|
|
306
|
-
### 参照:テンプレート・ホスト・移行
|
|
307
|
-
|
|
308
|
-
`create-next2d-app` はプロジェクト名から `appId`、`appName`、`executableName`、
|
|
309
|
-
`companyName` を設定する。例えば `my-game` なら `appId` は `app.example.my-game`、
|
|
310
|
-
他の3項目は `my-game` になる。配布前にbundle IDと会社名を自分の値へ変更する。
|
|
311
|
-
CPU設定が省略されている場合はOSごとの既定値を補い、テンプレートに指定済みの値は保持する。
|
|
312
|
-
アイコンパスやSteam IDなどの設定も保持する。
|
|
313
|
-
|
|
314
|
-
Electron用コードはbuilderが管理する。OSの一時ディレクトリにホスト・runtime設定・Web資産を配置し、失敗時を含め書き出し後に削除する。
|
|
315
|
-
ゲーム側へ `electron/`、Electron用 `node_modules` / lockfileは作らない。
|
|
316
|
-
Electronは `templates/electron/package.json`、Packagerは `src/tool-packages.ts` の固定バージョンを取得・キャッシュする。
|
|
317
|
-
PackagerはElectron書き出し時のみ取得し、OS別パッケージ・アイコン・署名・公証を処理する。
|
|
318
|
-
ホストにはnpm依存やネイティブアドオンがないため、ABIに合わせた再ビルドは不要。
|
|
319
|
-
プレビューは実行ホストのOS/CPUで書き出した `dist/<platform>/build/<env>/` のアプリを起動する。
|
|
320
|
-
|
|
321
|
-
旧 `electron/` のホストコード・`config.forge`・独自npm依存は参照しない。
|
|
322
|
-
移行時はアイコンを共通アセットへ移し、JSONのパスを更新してから旧ディレクトリを削除する。
|
|
323
|
-
独自main/preloadやネイティブアドオンがある場合は、先にbuilder側への対応が必要。
|
|
324
|
-
|
|
325
|
-
テンプレートのホストは絶対パスと固定origin `next2d://game` で資産を読む。
|
|
326
|
-
起動時の作業ディレクトリに依存せず、ローカルfetch・Worker・localStorageが使える。
|
|
327
|
-
F11/Alt+Enterで全画面、Escapeで解除。閉じるとmacOSでもプロセスを終了する。
|
|
328
|
-
Node integration無効・context isolation/sandbox有効、外部ページ遷移と新規ウィンドウは禁止。
|
|
329
|
-
Next2D用CSPを付与する。外部APIを使うゲームでは接続先を明示的に追加すること。
|
|
330
|
-
[Electron security](https://www.electronjs.org/docs/latest/tutorial/security) /
|
|
331
|
-
[protocol](https://www.electronjs.org/docs/latest/api/protocol)
|
|
332
|
-
|
|
333
|
-
保存先はElectronのappData配下の `appId` ディレクトリ。
|
|
334
|
-
表示名を変えても保存先は変わらない。旧file-originの開発版セーブは自動移行しない。
|
|
335
|
-
Steam Cloudは未統合。Chromiumプロファイル全体をCloud対象にせず、導入時は
|
|
336
|
-
ゲーム用のセーブファイルとアカウント単位の保存方式を別途設計する。
|
|
337
|
-
[Steam Cloud](https://partner.steamgames.com/doc/features/cloud)
|
|
338
|
-
|
|
339
|
-
### リリース前の確認範囲
|
|
340
|
-
|
|
341
|
-
STEP6のインストール・起動確認に加えて、以下を検証する。
|
|
342
|
-
|
|
343
|
-
- 終了動作、オフライン起動、更新後の保存データ。
|
|
344
|
-
- マウス/キーボード/コントローラ、解像度・全画面切替、音声、スリープ復帰。
|
|
345
|
-
- Shift+Tab Overlay。Electronは複数プロセスなので、OS/GPUごとに実動作を確認する。
|
|
346
|
-
この書き出しはSteamworks SDK・実績・DRM・Overlay APIを統合しない。
|
|
347
|
-
SDK統合はSteam配布の必須条件ではない。
|
|
348
|
-
- LinuxはSteam Linux Runtime環境で依存ライブラリとsandboxを確認する。
|
|
349
|
-
`--no-sandbox` を配布用の回避策にしない。
|
|
350
|
-
- Steam DeckのVerified判定は別審査。Linux版が生成できたことだけでは対応完了にならない。
|
|
351
|
-
コントローラだけで操作できること、文字の可読性、画面表示等を実機で確認する。
|
|
352
|
-
- Steamのビルド審査前に、ストアで宣言したOS・機能と動作が一致することを確認する。
|
|
353
|
-
|
|
354
|
-
[Steamworks API](https://partner.steamgames.com/doc/sdk/api) /
|
|
355
|
-
[Overlay](https://partner.steamgames.com/doc/features/overlay) /
|
|
356
|
-
[Linux開発](https://partner.steamgames.com/doc/store/application/platforms/linux) /
|
|
357
|
-
[Steam Deck互換性](https://partner.steamgames.com/doc/steamhardware/compat) /
|
|
358
|
-
[ビルド審査](https://partner.steamgames.com/doc/store/review_process)
|
|
195
|
+
エラー時のSteamPipeログは `dist/steam/uploads/<env>/cache/<branch>/` を確認する。
|
|
359
196
|
|
|
360
197
|
## English
|
|
361
198
|
|
|
362
|
-
|
|
199
|
+
For local exports, follow STEP1, STEP3 and STEP5. Steam distribution requires all steps.
|
|
363
200
|
|
|
364
|
-
### STEP1: Prepare
|
|
201
|
+
### STEP1: Prepare the environment and icons
|
|
365
202
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
Replace template placeholders before distribution. STEP3 documents omitted icon settings.
|
|
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.
|
|
369
205
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
| OS | Default | Accepted `architectures` / `--arch` values |
|
|
206
|
+
| OS | Default CPU | Accepted `architectures` / `--arch` values |
|
|
373
207
|
|---|---|---|
|
|
374
208
|
| Windows | `x64` | `x64`, `arm64` |
|
|
375
209
|
| macOS | `universal` | `x64`, `arm64`, `universal` |
|
|
376
210
|
| Linux | `x64` | `x64`, `arm64` |
|
|
377
211
|
|
|
378
|
-
### STEP2:
|
|
379
|
-
|
|
380
|
-
1. Find the issued App ID in the app's Steamworks administration page.
|
|
381
|
-
2. Create depots in SteamPipe > Depots and select their operating systems. Use All languages for shared language content,
|
|
382
|
-
save with Save Changes, then apply the changes on the Publish tab.
|
|
383
|
-
Include the required depots in development, testing and retail Packages. **Use actual Depot IDs; do not infer them from the App ID.**
|
|
384
|
-
3. Create an `internal` branch in SteamPipe > Builds and **set a password shared only with the intended testers.**
|
|
385
|
-
The name alone does not make it private. The builder does not create branches, configure passwords or verify protection.
|
|
386
|
-
4. Give testers access to the game and its depots. For external testers of an unreleased game, use Release State Override
|
|
387
|
-
(beta) keys or another appropriate method. A branch password alone does not grant game access.
|
|
388
|
-
Keep the password out of JSON and the repository, and ask testers not to share it with others.
|
|
212
|
+
### STEP2: Configure Steamworks
|
|
389
213
|
|
|
390
|
-
|
|
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.
|
|
391
219
|
|
|
392
|
-
**
|
|
220
|
+
**A branch password does not grant game access.** The builder does not create branches or configure passwords.
|
|
393
221
|
|
|
394
|
-
|
|
|
395
|
-
|
|
396
|
-
| Separate
|
|
397
|
-
|
|
|
398
|
-
| Only some operating systems share a depot | Supported. | Supported. Assign the same ID only to those operating systems. |
|
|
399
|
-
| Multiple depots for one OS, such as the application, common assets and languages | Supported. Their contents are combined during installation. | Not supported. Each OS accepts a single Depot ID; arrays and extra asset keys are not supported. |
|
|
400
|
-
|
|
401
|
-
The builder accepts one ID per OS, for a maximum of three distinct IDs overall. This is a limit of the builder's configuration format, not a Steam limit.
|
|
402
|
-
See STEP5 for collecting OS packages and launch paths, and STEP6 for uploading multiple depots in one operation.
|
|
403
|
-
|
|
404
|
-
Steam selects downloads based on Package ownership and depot conditions such as OS and language.
|
|
405
|
-
If simultaneously installed depots contain the same path, the depot later in the list takes priority, so check file placement.
|
|
406
|
-
Configure these selection conditions in Steamworks; the builder's JSON does not apply them.
|
|
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. |
|
|
407
226
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
Steamworks' "Add Shared Depot" references a depot from another app; it is a separate operation from assigning the same ID in the builder.
|
|
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.
|
|
411
229
|
|
|
412
|
-
[
|
|
413
|
-
[Packages and access](https://partner.steamgames.com/doc/store/application/packages) /
|
|
414
|
-
[Uploading multiple depots](https://partner.steamgames.com/doc/sdk/uploading) /
|
|
415
|
-
[Beta branches](https://partner.steamgames.com/doc/store/application/branches) /
|
|
416
|
-
[Testing on Steam](https://partner.steamgames.com/doc/store/testing) /
|
|
417
|
-
[Release State Override keys](https://partner.steamgames.com/doc/features/keys)
|
|
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)
|
|
418
231
|
|
|
419
232
|
### STEP3: Configure electron.config.json
|
|
420
233
|
|
|
421
|
-
|
|
422
|
-
Both JavaScript and TypeScript templates include it; replace the defaults with your game's values.
|
|
423
|
-
`appId` is the macOS bundle ID and the identifier used for the save location; `steam.appId` is Valve's numeric App ID.
|
|
424
|
-
These are separate identifiers. The game version comes from the root `package.json`.
|
|
234
|
+
Edit the configuration at the game root. The version comes from the root `package.json`.
|
|
425
235
|
|
|
426
236
|
```json
|
|
427
237
|
{
|
|
@@ -445,62 +255,44 @@ These are separate identifiers. The game version comes from the root `package.js
|
|
|
445
255
|
}
|
|
446
256
|
```
|
|
447
257
|
|
|
448
|
-
| Field |
|
|
449
|
-
|
|
450
|
-
| `
|
|
451
|
-
| `appName` / `executableName` |
|
|
452
|
-
| `
|
|
453
|
-
| `
|
|
454
|
-
| `
|
|
455
|
-
| `
|
|
456
|
-
| `steam.
|
|
457
|
-
| `steam.
|
|
458
|
-
| `macos`
|
|
459
|
-
|
|
460
|
-
### STEP4: Prepare
|
|
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
|
|
461
271
|
|
|
462
272
|
#### macOS signing and notarization
|
|
463
273
|
|
|
464
|
-
Install a Developer ID Application certificate and
|
|
465
|
-
`xcrun notarytool store-credentials`. Do not put credentials in JSON.
|
|
466
|
-
|
|
467
|
-
Use the following command to find the signing identity to set as `APPLE_SIGNING_IDENTITY`:
|
|
274
|
+
Install a **Developer ID Application certificate and private key** in the keychain, then find the signing identity:
|
|
468
275
|
|
|
469
276
|
```sh
|
|
470
277
|
security find-identity -v -p codesigning
|
|
471
278
|
```
|
|
472
279
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
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.
|
|
476
283
|
|
|
477
284
|
```sh
|
|
478
285
|
export APPLE_SIGNING_IDENTITY='Developer ID Application: YOUR NAME (TEAMID)'
|
|
479
286
|
export APPLE_NOTARY_PROFILE='your-notary-profile'
|
|
480
287
|
```
|
|
481
288
|
|
|
482
|
-
|
|
483
|
-
Alternatively, prefix the STEP5 macOS command with `NEXT2D_STEAM_RELEASE=1` to require both even when JSON specifies false.
|
|
484
|
-
Missing credentials, signing failures or notarization failures fail the build.
|
|
485
|
-
Signing failures stop before notarization. If the output shows `Signature=adhoc` / `TeamIdentifier=not set`,
|
|
486
|
-
the app lacks a Developer ID signature; check the preceding signing error and the certificate/private key in the keychain.
|
|
487
|
-
|
|
488
|
-
Steam uses the `darwin` target. Valve requires 64-bit support and Apple notarization for new macOS applications.
|
|
489
|
-
The template entitlements include library validation / DYLD settings for JIT and Steam Overlay,
|
|
490
|
-
without `com.apple.security.app-sandbox` (which is separate from Chromium's renderer sandbox).
|
|
491
|
-
[Valve platform requirements](https://partner.steamgames.com/doc/store/application/platforms) /
|
|
492
|
-
[Electron Packager signing and notarization options](https://electron.github.io/packager/main/interfaces/Options.html)
|
|
289
|
+
Resolve signing/notarization failures before uploading. `Signature=adhoc` / `TeamIdentifier=not set` means Developer ID signing is incomplete.
|
|
493
290
|
|
|
494
|
-
#### SteamCMD
|
|
291
|
+
#### SteamCMD
|
|
495
292
|
|
|
496
|
-
Obtain SteamCMD
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
Specify only the path, without arguments or a shell command. A `.sh` file needs executable permission.
|
|
500
|
-
Install any OS libraries required by SteamCMD according to its setup instructions.
|
|
501
|
-
|
|
502
|
-
Grant the upload account `Edit App Metadata` and `Publish App Changes To Steam` permissions for the target app.
|
|
503
|
-
Example for macOS / Linux; replace the path and account name:
|
|
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:
|
|
504
296
|
|
|
505
297
|
```sh
|
|
506
298
|
export STEAMCMD="/absolute/path/to/steamcmd.sh"
|
|
@@ -508,21 +300,14 @@ export STEAM_USERNAME="your_build_account"
|
|
|
508
300
|
"$STEAMCMD" +login "$STEAM_USERNAME" +quit
|
|
509
301
|
```
|
|
510
302
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
Logging into the Steam desktop app alone does not confirm that this SteamCMD authentication setup is complete.
|
|
516
|
-
|
|
517
|
-
If uploading reports `Cached credentials not found` / `No cached credentials and @NoPromptForPassword is set`, or authentication expires,
|
|
518
|
-
rerun `"$STEAMCMD" +login "$STEAM_USERNAME" +quit` above, wait for it to exit normally, then retry the upload.
|
|
519
|
-
Builder uploads fail instead of waiting for interactive input, so retrying the builder alone cannot register login credentials.
|
|
520
|
-
In CI, restore and manage SteamCMD's `config/config.vdf` as a Secret and exclude it from build artifacts.
|
|
521
|
-
In Windows PowerShell, set `$env:STEAMCMD` and `$env:STEAM_USERNAME`.
|
|
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.
|
|
522
307
|
|
|
523
|
-
### STEP5: Export
|
|
308
|
+
### STEP5: Export and check the packages
|
|
524
309
|
|
|
525
|
-
Run
|
|
310
|
+
Run from the game root. No additional application build or installer is needed.
|
|
526
311
|
|
|
527
312
|
```sh
|
|
528
313
|
npx @next2d/builder --platform steam:windows --env prd
|
|
@@ -530,31 +315,12 @@ npx @next2d/builder --platform steam:macos --env prd
|
|
|
530
315
|
npx @next2d/builder --platform steam:linux --env prd
|
|
531
316
|
```
|
|
532
317
|
|
|
533
|
-
Append
|
|
534
|
-
|
|
535
|
-
|
|
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.
|
|
536
322
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
| OS | Entire folder to distribute | Separate depot Executable | Shared depot Executable |
|
|
540
|
-
|---|---|---|---|
|
|
541
|
-
| Windows | `My Game-win32-x64/` | `my-game.exe` | `windows/my-game.exe` |
|
|
542
|
-
| macOS | `My Game-darwin-universal/` | `My Game.app` | `macos/My Game.app` |
|
|
543
|
-
| Linux | `My Game-linux-x64/` | `my-game` | `linux/my-game` |
|
|
544
|
-
|
|
545
|
-
Read the actual launch path, architecture and ContentRoot from `*-steampipe/launch.json`.
|
|
546
|
-
Distribute the entire folder, including Electron libraries, locales, licenses and resources.
|
|
547
|
-
Steam needs no DMG/DEB/MSI installer, and no additional application build is required after export.
|
|
548
|
-
|
|
549
|
-
For separate machines or CI, collect each OS's `build/<env>/`, including `steam-package.json` and `*-steampipe/`,
|
|
550
|
-
under the same `dist/steam/<OS>/build/<env>/` layout. Transfer CI artifacts as `tar.gz` to preserve macOS symlinks
|
|
551
|
-
and Linux executable permissions. Use STEP6's `--steam-root` for a custom output location.
|
|
552
|
-
|
|
553
|
-
Re-export affected operating systems after changing configuration or version. Even with an unchanged version number,
|
|
554
|
-
keep all OS packages on the intended revision. When exporting x64 and arm64 successively for one OS, the last successful
|
|
555
|
-
architecture is used. Combining multiple architectures of one OS into a shared depot is not supported.
|
|
556
|
-
|
|
557
|
-
Verify signing, notarization and stapling for macOS distribution packages (adjust the paths):
|
|
323
|
+
For macOS distribution, run these checks with your package path:
|
|
558
324
|
|
|
559
325
|
```sh
|
|
560
326
|
codesign --verify --deep --strict --verbose=2 'dist/steam/macos/build/prd/My Game-darwin-universal/My Game.app'
|
|
@@ -564,151 +330,55 @@ echo $?
|
|
|
564
330
|
```
|
|
565
331
|
|
|
566
332
|
| Check | Successful output | Immediately following `echo $?` |
|
|
567
|
-
|
|
568
|
-
| `codesign
|
|
569
|
-
| `
|
|
570
|
-
|
|
571
|
-
Without `--verbose=2`, `codesign` normally prints nothing on success. An exit code of `0` indicates that verification passed.
|
|
572
|
-
Run `echo $?` immediately after each command you want to check. A nonzero exit code means verification failed; resolve the reported error and check again.
|
|
573
|
-
These commands verify the signature and the attached notarization ticket; they do not sign or notarize the app.
|
|
574
|
-
After both checks pass, still verify installation and launching through Steam in STEP6.
|
|
333
|
+
|---|---|---|
|
|
334
|
+
| `codesign` | `valid on disk` / `satisfies its Designated Requirement` | `0` |
|
|
335
|
+
| `stapler` | `The validate action worked!` | `0` |
|
|
575
336
|
|
|
576
|
-
|
|
337
|
+
Resolve nonzero results and verify again. These commands check the package; they do not sign or notarize it.
|
|
577
338
|
|
|
578
339
|
### STEP6: Configure launching, upload and test
|
|
579
340
|
|
|
580
|
-
|
|
581
|
-
Use the Executable from STEP5's `launch.json`, leaving Arguments/Working Directory empty.
|
|
582
|
-
Set the 64-bit condition for x64. Match supported OS versions and minimum requirements to the bundled Electron and hardware testing,
|
|
583
|
-
then Publish the Steamworks changes.
|
|
341
|
+
#### Configure executable paths
|
|
584
342
|
|
|
585
|
-
|
|
586
|
-
|
|
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.
|
|
587
345
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
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` |
|
|
591
352
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
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.
|
|
595
356
|
|
|
596
|
-
|
|
597
|
-
|
|
357
|
+
#### Upload
|
|
358
|
+
|
|
359
|
+
Use the terminal where STEP4's login exited successfully.
|
|
598
360
|
|
|
599
361
|
```sh
|
|
600
|
-
npx @next2d/builder --steam-upload --env prd --
|
|
362
|
+
npx @next2d/builder --steam-upload --env prd --dry-run
|
|
363
|
+
npx @next2d/builder --steam-upload --env prd
|
|
601
364
|
```
|
|
602
365
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
| `--steam-branch internal` | Overrides `steam.branch`; requests activation through `SetLive`. `default` is not allowed. Switch public release builds through Steamworks. |
|
|
606
|
-
| `--steam-comment "Comment"` | Sets the upload comment. If omitted, keeps the existing `<appName> <version> (<env>, <branch>)` format. Whitespace-only text, newlines, control characters, double quotes and backslashes are not allowed. Also shown in `--dry-run` output and `upload-plan.json`. |
|
|
607
|
-
| `--steam-root dist/steam` | Collected package location; defaults to `dist/steam`. Accepts an absolute path or a path relative to the game root. Specify custom output locations because uploading does not read the Vite configuration. |
|
|
608
|
-
| `--dry-run` | Validates packages against configuration. Does not check Steam permissions, branches or passwords. |
|
|
609
|
-
| Incompatible options | `--build` / `--preview` / `--open` / `--steam-manifest` / `--arch`. `--platform` is also unnecessary. |
|
|
610
|
-
|
|
611
|
-
The corresponding template npm scripts are `upload:steam:check` / `upload:steam`.
|
|
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.
|
|
612
368
|
|
|
613
|
-
|
|
614
|
-
Missing or inconsistent App IDs, Depot IDs, versions, game names or architectures stop the operation before SteamCMD starts.
|
|
615
|
-
VDFs are regenerated from validated packages; ordinary export VDFs remain unchanged.
|
|
616
|
-
|
|
617
|
-
| Location (under `--steam-root`) | Contents |
|
|
369
|
+
| Optional argument | Purpose |
|
|
618
370
|
|---|---|
|
|
619
|
-
|
|
|
620
|
-
| `
|
|
621
|
-
|
|
622
|
-
On the Steamworks Builds page, verify that the recorded BuildID is the target branch's current build.
|
|
623
|
-
Steam may request additional confirmation depending on the account or app state.
|
|
624
|
-
Testers enter the password and select `internal` in the Steam client's Properties > Game Versions & Betas.
|
|
625
|
-
Verify installation and launch on each OS, including both Intel and Apple Silicon for macOS Universal.
|
|
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. |
|
|
626
374
|
|
|
627
|
-
|
|
375
|
+
Do not combine uploads with `--platform` / `--arch` / `--build` / `--preview` / `--open` / `--steam-manifest`.
|
|
628
376
|
|
|
629
|
-
|
|
377
|
+
#### Verify completion
|
|
630
378
|
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
Some operating systems may share a Depot ID while others use separate depots. `FileMapping` assigns OS subdirectories without copying assets again.
|
|
637
|
-
To regenerate only shared depot VDFs after collecting packages from separate machines:
|
|
638
|
-
|
|
639
|
-
```sh
|
|
640
|
-
npx @next2d/builder --platform steam:macos --env prd --steam-manifest
|
|
641
|
-
```
|
|
642
|
-
|
|
643
|
-
The npm alias is `build:steam:manifest` (append `-- --env dev` for another environment). This command runs on any OS.
|
|
644
|
-
`--platform` selects the Vite configuration; all configured shared depots are combined.
|
|
645
|
-
It selects the last successful exports using `build.outDir` and `--env`, validating the App ID, Depot IDs, game name, executable name and version.
|
|
646
|
-
Missing packages cause exit code 1. Old combined VDFs are invalidated during regeneration.
|
|
647
|
-
Do not combine this command with `--arch` / `--preview` / `--build` / `--open`.
|
|
648
|
-
|
|
649
|
-
`app_preview.vdf` validates file mappings, `app_build.vdf` uploads, and `depot_build.vdf` recursively maps folder contents.
|
|
650
|
-
`steam_appid.txt` is excluded from distribution. ContentRoot is relative to the VDF, so move a standalone depot's application
|
|
651
|
-
and `*-steampipe/` together; preserve the whole `dist/steam/` layout for shared depots.
|
|
652
|
-
|
|
653
|
-
```text
|
|
654
|
-
steamcmd +login BUILD_ACCOUNT +run_app_build "/absolute/path/to/app_preview.vdf" +quit
|
|
655
|
-
steamcmd +login BUILD_ACCOUNT +run_app_build "/absolute/path/to/app_build.vdf" +quit
|
|
656
|
-
```
|
|
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.
|
|
657
383
|
|
|
658
|
-
|
|
659
|
-
Each per-OS VDF updates one depot, so verify the final Build references the intended manifest version for every OS.
|
|
660
|
-
[Official SteamPipe workflow and VDF specification](https://partner.steamgames.com/doc/sdk/uploading)
|
|
661
|
-
|
|
662
|
-
### Reference: Templates, host and migration
|
|
663
|
-
|
|
664
|
-
`create-next2d-app` initializes `appId`, `appName`, `executableName` and `companyName` from the project name.
|
|
665
|
-
For example, `my-game` produces `app.example.my-game` for `appId` and `my-game` for the other three fields.
|
|
666
|
-
Replace the bundle ID and company name with your own values before distribution.
|
|
667
|
-
Missing CPU settings receive the defaults for each OS; values already provided by the template are preserved.
|
|
668
|
-
Other settings, such as icon paths and Steam IDs, are also preserved.
|
|
669
|
-
|
|
670
|
-
The builder manages Electron host code. It stages the host, runtime configuration and web assets in an OS temporary directory,
|
|
671
|
-
then removes it after export, including failures. No `electron/`, Electron-specific `node_modules` or lockfile is created in the game.
|
|
672
|
-
Electron is pinned in `templates/electron/package.json`; Packager is pinned in `src/tool-packages.ts`. Both are downloaded and cached.
|
|
673
|
-
Packager is acquired only for Electron exports and handles OS packages, icons, signing and notarization.
|
|
674
|
-
The host has no npm dependencies or native addons, so ABI-specific rebuilding is unnecessary.
|
|
675
|
-
Preview exports for the host OS/CPU and launches the application under `dist/<platform>/build/<env>/`.
|
|
676
|
-
|
|
677
|
-
Legacy `electron/` host code, `config.forge` and custom npm dependencies are not used.
|
|
678
|
-
For migration, move icons into shared assets and update their JSON paths before deleting the old directory.
|
|
679
|
-
Custom main/preload code or native addons require builder support before migration.
|
|
680
|
-
|
|
681
|
-
The template host loads assets using absolute paths and the fixed origin `next2d://game`.
|
|
682
|
-
Local fetch, Workers and localStorage work independently of the startup working directory.
|
|
683
|
-
F11/Alt+Enter enters fullscreen; Escape exits it. Closing the window also terminates the process on macOS.
|
|
684
|
-
Node integration is disabled, context isolation and sandboxing are enabled, and external navigation and new windows are blocked.
|
|
685
|
-
A Next2D CSP is applied. Games using external APIs must explicitly add their destinations.
|
|
686
|
-
[Electron security](https://www.electronjs.org/docs/latest/tutorial/security) /
|
|
687
|
-
[protocol](https://www.electronjs.org/docs/latest/api/protocol)
|
|
688
|
-
|
|
689
|
-
Save data is stored in the `appId` directory under Electron's appData location.
|
|
690
|
-
Changing the display name does not change that location. Saves from older file-origin development builds are not migrated automatically.
|
|
691
|
-
Steam Cloud is not integrated. When adding it, design game-specific save files and per-account storage separately,
|
|
692
|
-
rather than syncing the entire Chromium profile.
|
|
693
|
-
[Steam Cloud](https://partner.steamgames.com/doc/features/cloud)
|
|
694
|
-
|
|
695
|
-
### Pre-release validation
|
|
696
|
-
|
|
697
|
-
In addition to STEP6's installation and launch checks, verify:
|
|
698
|
-
|
|
699
|
-
- Exit behavior, offline launch and saved data after updates.
|
|
700
|
-
- Mouse/keyboard/controller input, resolution and fullscreen switching, audio and sleep/resume.
|
|
701
|
-
- Shift+Tab Overlay. Electron uses multiple processes, so verify actual behavior on each OS/GPU.
|
|
702
|
-
This export does not integrate the Steamworks SDK, achievements, DRM or Overlay APIs.
|
|
703
|
-
SDK integration is not required for Steam distribution.
|
|
704
|
-
- On Linux, check dependent libraries and sandboxing in the Steam Linux Runtime environment.
|
|
705
|
-
Do not use `--no-sandbox` as a distribution workaround.
|
|
706
|
-
- Steam Deck Verified requires a separate review. Producing a Linux package alone does not establish compatibility.
|
|
707
|
-
Test controller-only operation, text readability and display behavior on hardware.
|
|
708
|
-
- Before Steam's build review, verify that the supported operating systems and features advertised on the store match the application.
|
|
709
|
-
|
|
710
|
-
[Steamworks API](https://partner.steamgames.com/doc/sdk/api) /
|
|
711
|
-
[Overlay](https://partner.steamgames.com/doc/features/overlay) /
|
|
712
|
-
[Linux development](https://partner.steamgames.com/doc/store/application/platforms/linux) /
|
|
713
|
-
[Steam Deck compatibility](https://partner.steamgames.com/doc/steamhardware/compat) /
|
|
714
|
-
[Build review](https://partner.steamgames.com/doc/store/review_process)
|
|
384
|
+
For failures, inspect SteamPipe logs in `dist/steam/uploads/<env>/cache/<branch>/`.
|