You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, install <ahref="https://chocolatey.org/install">Chocolatey</a> if you haven't already. If <code>choco help</code> shows a help menu for using Chocolatey, then you've set it up correctly.
250
250
251
-
Then, install Dart 2.13:
251
+
Then, install Dart 2.13.4:
252
252
253
253
<pre>
254
-
choco install dart-sdk --version 2.13
254
+
choco install dart-sdk --version 2.13.4
255
255
</pre>
256
256
257
257
To stop Chocolatey from automatically updating Dart to the latest version, pin it:
First, install <ahref="https://brew.sh/">Homebrew</a> if you haven't already. If <code>brew -v</code> shows some version numbers, then you've set it up correctly.
267
267
268
-
Then, install Dart 2.13:
268
+
It may help to run `brew tap dart-lang/dart` first.
269
+
270
+
Then, install Dart 2.13.4:
269
271
270
272
<pre>
271
-
brew install dart@2.13
273
+
brew install dart@2.13.4
272
274
</pre>
273
275
274
276
To stop Homebrew from automatically updating Dart to the latest version, pin it:
275
277
276
278
<pre>
277
-
brew pin dart@2.13
279
+
brew pin dart@2.13.4
278
280
</pre>
279
281
280
282
If running `dart` in a terminal now does not work, you may need to follow <ahref="https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities">these instructions</a>.
To stop apt from automatically updating Dart to the latest version, hold it:
301
303
302
304
<pre>
303
-
sudo apt-mark hold dart=2.13
305
+
sudo apt-mark hold dart=2.13.4
304
306
</pre>
305
307
306
308
</details>
@@ -312,35 +314,44 @@ After installing the Dart SDK, you should see a help menu when you run `dart`.
312
314
Once you have installed Dart, install all the Dart dependencies (from the same directory `scadnano` into which the project was cloned by git):
313
315
314
316
```
315
-
316
317
pub get
317
-
318
318
```
319
319
320
320
### Installing `webdev`
321
321
322
322
This project uses an older version of the `webdev` tool, not the latest version, to build and serve the web app. Install it with:
323
323
324
324
```
325
-
326
325
pub global activate webdev 2.5.9
326
+
```
327
+
328
+
Note that often a message like this appears:
327
329
328
330
```
331
+
Warning: Pub installs executables into C:\Users\pexat\AppData\Local\Pub\Cache\bin, which is not on your path.
332
+
You can fix that by adding that directory to your system's "Path" environment variable.
333
+
A web search for "configure windows path" will show you how.
334
+
```
335
+
So you may need to add the installation location of `webdev` to your PATH environment variable.
336
+
329
337
330
338
### Running a Local Server
331
339
332
340
Run
333
341
334
342
```
335
-
336
343
webdev serve
337
-
338
344
```
339
345
340
346
in the `scadnano` directory to compile your code
341
347
with the [Dart dev compiler](https://dart.dev/tools/dartdevc)
342
348
(dartdevc) and start up a [local
343
349
server](https://dart.dev/tools/webdev#serve).
350
+
351
+
Sometimes it may be necessary to clean out the generated files and cache if this has an error. See the file `clean.sh`, which has this line: `dart run build_runner clean`. Also see `remove_g.sh`, which removes all `.g.dart` files from the project, which can also help to fix compilation errors.
352
+
353
+
If that does not work, try `dart run build_runner clean --delete-conflicting-outputs`.
354
+
344
355
Running `webdev serve --release` will compile the project in production mode (instead of development mode), which is claimed to be faster in principle if you are not doing development and just want to run scadnano offline.
345
356
However, in scadnano, it doesn't appear to make a big difference whether development or production mode is used.
346
357
The webdev program will tell you which URL to enter in your browser; it will be something like
0 commit comments