|
1 | 1 | --- |
2 | 2 | title: Installation |
3 | 3 | excerpt: Install WurstScript and set up your first project. |
4 | | -date: 2025-12-08 |
| 4 | +date: 2026-03-02 |
5 | 5 | icon: |
6 | | - type: fa |
7 | | - name: fa-paper-plane |
| 6 | + type: fa |
| 7 | + name: fa-paper-plane |
8 | 8 | color: green |
9 | 9 | --- |
10 | 10 |
|
11 | | -WurstScript is a programming language and modding toolkit working in unison to create Warcraft 3 maps. |
12 | | -This guide explains the streamlined setup using the updated VSCode extension, which now manages compiler updates and the CLI automatically. |
| 11 | +WurstScript is a programming language and modding toolkit for Warcraft 3 maps. |
| 12 | +This guide covers the current streamlined setup with VS Code. |
13 | 13 |
|
14 | 14 | ## Prerequisites |
15 | 15 |
|
16 | | -WurstScript editor support is provided via the VSCode extension. |
17 | | -The extension now **downloads, installs, and updates both the compiler and the CLI (`grill`) automatically**, requiring no manual setup for most users. |
| 16 | +### VS Code |
18 | 17 |
|
19 | | -### VSCode |
20 | | - |
21 | | -[* *{: .fa .fa-download} Download VSCode](https://code.visualstudio.com/){: .btn .btn-primary} |
| 18 | +[* *{: .fa .fa-download} Download VS Code](https://code.visualstudio.com/){: .btn .btn-primary} |
22 | 19 |
|
23 | 20 | ### Wurst Extension |
24 | 21 |
|
25 | | -Install the VSCode [Wurst language support extension](https://marketplace.visualstudio.com/items?itemName=peterzeller.wurst). |
26 | | - |
27 | | -## Activate the Extension |
28 | | - |
29 | | -After installation, open a Wurst project or any `.wurst` file. |
30 | | -The extension initializes itself and installs all required components. |
31 | | -You can also trigger setup manually via the command palette (F1): |
| 22 | +Install the VS Code [Wurst language support extension](https://marketplace.visualstudio.com/items?itemName=peterzeller.wurst). |
32 | 23 |
|
33 | | -* `>wurst: Install` |
34 | | -* `>wurst: New Wurst Project` |
| 24 | +The extension now installs and updates the compiler and CLI for you. |
| 25 | +`grill` is added to PATH automatically by the extension setup. |
35 | 26 |
|
36 | | -Once activated, the extension will keep your compiler up-to-date in the background. |
| 27 | +## Quick Start |
37 | 28 |
|
38 | | -## Creating and Working With Projects |
| 29 | +After installing the extension, use one of these paths: |
39 | 30 |
|
40 | | -The extension ships with `grill`, which it installs for you. |
41 | | -Add the `~/.wurst` folder to your PATH so the `grill` command is available everywhere. |
42 | | -See this guide: [https://www.java.com/en/download/help/path.xml](https://www.java.com/en/download/help/path.xml) |
| 31 | +### A) Open an existing project |
43 | 32 |
|
44 | | -For regular users, the only grill command you normally need is: |
| 33 | +1. Clone/open the project folder from version control. |
| 34 | +2. If the project has dependencies, run: |
45 | 35 |
|
46 | | -### Install project dependencies |
47 | | - |
48 | | -Run inside your project root: |
49 | | - |
50 | | -``` |
| 36 | +```bash |
51 | 37 | grill install |
52 | 38 | ``` |
53 | 39 |
|
54 | | -This sets up dependencies for a new project or updates an existing one. |
| 40 | +3. If language features do not initialize immediately, run `F1` -> `Developer: Reload Window`. |
55 | 41 |
|
56 | | -### Add a new dependency |
| 42 | +### B) Create a new project |
57 | 43 |
|
58 | | -``` |
59 | | -grill install https://github.com/Frotty/wurst-astar-jps |
60 | | -``` |
| 44 | +1. In VS Code, press `F1`. |
| 45 | +2. Run `Wurst: New Wurst Project`. |
| 46 | +3. Follow the prompts. |
61 | 47 |
|
62 | | -This adds the dependency to your project and updates it. |
| 48 | +For this flow, you usually do not need to run `grill install` manually right away. |
63 | 49 |
|
64 | | -### Opening a project |
| 50 | +## Running Your Map |
65 | 51 |
|
66 | | -Open the project’s root folder in VSCode: |
| 52 | +Use the play button in VS Code to run your project quickly. |
67 | 53 |
|
68 | | -``` |
69 | | -code my-wurst-project |
70 | | -``` |
| 54 | +- Open any `.wurst` file and click the play button. |
| 55 | +- You can also open a `.w3x` or `.w3m` map and use the same run action. |
71 | 56 |
|
72 | | -{: .answer} |
73 | | -* *{: .fa .fa-exclamation-circle} Open the folder containing your `wurst.build` file. |
| 57 | +## Useful Commands |
74 | 58 |
|
75 | | -After opening the project, selecting a `.wurst` file will activate the language server. |
76 | | -Compilation, map building, and other workflows are available directly through VSCode commands (`F1` → search for “wurst”). |
| 59 | +- `>wurst: Install` |
| 60 | +- `>wurst: New Wurst Project` |
77 | 61 |
|
78 | | ---- |
| 62 | +Open the command palette with `F1` and search for `wurst`. |
79 | 63 |
|
80 | | -## Optional: CLI Usage for Non-VSCode Users |
| 64 | +## Optional: CLI-Only Usage |
81 | 65 |
|
82 | | -If you prefer using WurstScript without VSCode, or you want full manual control, you can enable standalone CLI usage. |
| 66 | +If you are not using VS Code, you can still use `grill` directly. |
83 | 67 |
|
84 | | -### Create a new project (CLI-only) |
| 68 | +Create a new project: |
85 | 69 |
|
86 | | -``` |
| 70 | +```bash |
87 | 71 | grill generate my-wurst-project |
88 | 72 | ``` |
89 | 73 |
|
90 | | -### Update the compiler manually |
| 74 | +Add a dependency: |
91 | 75 |
|
| 76 | +```bash |
| 77 | +grill install https://github.com/Frotty/wurst-astar-jps |
92 | 78 | ``` |
93 | | -grill install wurstscript |
94 | | -``` |
95 | | - |
96 | | -This is no longer required when using VSCode, as the extension manages compiler updates automatically. |
97 | | - |
98 | | ---- |
99 | | - |
100 | | -## Graphical User Interface |
101 | | - |
102 | | -> Deprecated |
103 | | -
|
104 | | -Running `WurstSetup.jar` without arguments opens the legacy GUI installer. |
105 | | -This workflow is no longer recommended. |
106 | 79 |
|
107 | 80 | --- |
108 | 81 |
|
109 | | -If you are new to WurstScript but not new to programming, continue with the |
110 | | -[* *{: .fa .fa-external-link-square} Beginner's Guide](tutorials/wurstbeginner.html). |
| 82 | +If you are new to WurstScript, continue with the |
| 83 | +[* *{: .fa .fa-external-link-square} Beginner's Guide](tutorials/wurstbeginner.html). |
0 commit comments