@@ -175,16 +175,13 @@ docker compose run --rm -w /scalachess --entrypoint="sbt package" lila
175
175
176
176
` ` ` bash
177
177
# # run formatter
178
- docker run --rm -v $( pwd) /repos/dartchess:/mnt --workdir /mnt dart:3.1.5-sdk \
179
- dart format .
178
+ docker compose run --rm -w /dartchess mobile dart format .
180
179
181
180
# # analyze
182
- docker run --rm -v $( pwd) /repos/dartchess:/mnt --workdir /mnt dart:3.1.5-sdk \
183
- bash -c " dart pub get && dart analyze"
181
+ docker compose run --rm -w /dartchess mobile bash -c " dart pub get && dart analyze"
184
182
185
183
# # run tests
186
- docker run --rm -v $( pwd) /repos/dartchess:/mnt --workdir /mnt dart:3.1.5-sdk \
187
- bash -c " dart pub get && dart test -x full_perft"
184
+ docker compose run --rm -w /dartchess mobile bash -c " dart pub get && dart test -x full_perft"
188
185
` ` `
189
186
190
187
# ## bbpPairings:
@@ -233,3 +230,62 @@ docker compose run --rm ui bash -c "cd /pgn-viewer && pnpm run sass-dev && pnpm
233
230
` ` `
234
231
235
232
See the changes on the PGN Viewer demo page: http://localhost:8091/
233
+
234
+ # ## Mobile
235
+
236
+ # ### On your Android phone:
237
+
238
+ 1. Connect your phone on the same wifi network as your host machine
239
+ 2. Make sure your phone is in developer mode
240
+ 3. Enable wireless debugging
241
+ 4.
242
+
243
+ # ### On your host machine:
244
+
245
+ 1. Configure lila to run with your host' s IP address or hostname instead of localhost
246
+ ```bash
247
+ ./lila-docker hostname
248
+ ```
249
+ 2. Ensure phone and can access lila using that host
250
+ ```
251
+ http://[your private IP]:8080 # instead of http://localhost:8080
252
+ ```
253
+ 3. Run:
254
+ ```bash
255
+ adb kill-server
256
+ adb tcpip 5555
257
+ ```
258
+ 4. You should see the phone in the devices list:
259
+ ```bash
260
+ adb devices
261
+ ```
262
+
263
+ #### On the container:
264
+
265
+ 1. Get a shell on the container:
266
+
267
+ ```bash
268
+ docker compose exec -it mobile bash
269
+ ```
270
+
271
+ 2. Connect to your phone:
272
+
273
+ ```bash
274
+ # get the ip address from your phone' s wifi settings
275
+ adb connect 192.168.1.xxx
276
+ # you should see the phone in the devices list
277
+ adb devices
278
+ ` ` `
279
+
280
+ 3. Install the app dependencies:
281
+
282
+ ` ` ` bash
283
+ flutter pub get
284
+ dart run build_runner build
285
+ ` ` `
286
+
287
+ 4. Run the app:
288
+ ` ` ` bash
289
+ flutter run --dart-define=LICHESS_HOST=$LICHESS_URL --dart-define=LICHESS_WS_HOST=$LICHESS_URL
290
+ ` ` `
291
+ - The ` $LICHESS_URL ` environment variable will already be set on the container.
0 commit comments