Skip to content

Commit

Permalink
update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Frotty committed Nov 16, 2023
1 parent e3c526c commit 6500409
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 51 deletions.
2 changes: 1 addition & 1 deletion _doc/start.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Installation
excerpt: Install WurstScript and setup your first project.
date: 2021-10-11
date: 2023-11-16
icon:
type: fa
name: fa-paper-plane
Expand Down
13 changes: 7 additions & 6 deletions _doc/start/install_java.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ sections:
- Verify / Update Java Intallation
---

WurstScript and its related tools require Java to run. Please install or verify your installation.
WurstScript and its related tools require Java 11+ to run. Please install or verify your installation.

### Download JRE

[* *{: .fa .fa-download} Download Java from Adoptium](https://adoptium.net/?variant=openjdk11){: .btn .btn-orange}
[_ _{: .fa .fa-download} Download Java from Adoptium](https://adoptium.net/?variant=openjdk11){: .btn .btn-orange}

Download the Java Runtime appropriate for your system and follow the installation procedure.

Expand All @@ -24,14 +24,15 @@ A valid installation will return something like this:

```powershell
> java -version
java version "1.8.0_131"
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment Temurin-11.0.17+8 (build 11.0.17+8)
OpenJDK 64-Bit Server VM Temurin-11.0.17+8 (build 11.0.17+8, mixed mode)
```

Make sure your minor version `1.8.0_xxx` (xxx) is higher than **101** to avoid any certificate issues.
If it is lower, make sure to update your Java installation, otherwise your connection will be insecure.
The major version should be `11` or higher. If it is lower, you must update your Java installation.

If you get an error or get a lower versions displayed, even though you installed a newer one, your **JAVA_HOME** is either missing or configured wrong.

Refer to this [* *{: .fa .fa-external-link-square} Windows tutorial](https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html) in order to setup your **JAVA_HOME** correctly.
Refer to this [_ _{: .fa .fa-external-link-square} Windows tutorial](https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html) in order to setup your **JAVA_HOME** correctly.

Once you have setup Java correctly, continue by installing VSCode.
68 changes: 24 additions & 44 deletions _doc/start/install_wurst.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ sections:
- Update and import Projects
---

Now we will setup a Wurst compiler environment and create a project using the the Wurst Setup.
Now we will setup a Wurst compiler environment and create a project using the the WurstSetup, also known as `grill`.

[* *{: .fa .fa-download} Download WurstSetup](https://grill.wurstlang.org/hudson/job/WurstSetup/lastSuccessfulBuild/artifact/downloads/WurstSetup.jar){: .btn .btn-green}
[_ _{: .fa .fa-download} Download WurstSetup](https://grill.wurstlang.org/hudson/job/WurstSetup/lastSuccessfulBuild/artifact/downloads/WurstSetup.jar){: .btn .btn-green}

The Wurstsetup can be used from either the commandline or a graphical application.
The Wurstsetup can be used either from the commandline or as a graphical application.

## Commandline

To use the setup from the commandline you need to complete the initial installation once.
After that you can make use of the setup via the `grill` executable.
Usage by invoking `grill` via the commandline is recommended and provides a similar user experience to tools such as `npm`, `maven`. etc. To use the setup from the commandline you need to complete the initial installation once.
After that you can invoke `grill` from your commandline.

### Initial installation

Expand All @@ -34,66 +34,46 @@ The `grill` command should now be recognized by your terminal of choice.

If not, a restart might be required.

## Graphical UI

If you prefer not using the commandline, simply running the setup without any arguments will open the graphical user interface (double-click).

![](/assets/images/setup/WurstSetup.png){: .img-responsive}

### Install & Update Compiler

#### Grill
### Updating the Compiler

Use the special `wurstscript` keyword to install or update wurst on your system for the current user.

`grill install wurstscript`

#### UI

To install or update the compiler simply click the **Install Wurst** button.
When everything is done, the setup should tell you that your installation is up to date and the **Create Project** button is now enabled:

![](/assets/images/setup/WurstInstallDone.png){: .img-responsive}

### Create Project

#### Grill
### Create a Wurst Project

Use `generate` to create new projects. The project will be generated in a folder inside your current location with the name provided.

`grill generate myProjectName`

#### UI

Now that the compiler is installed you can go ahead and create your Wurst project.
Select your desired project folder and name and start the process by clicking the **Create Project** button.
The setup will now create a wurst project structure and download the necessary dependencies.
If everything setup correctly, you should see the following message:

![](/assets/images/setup/ProjectSetupDone.png){: .img-responsive}
`grill generate my-wurst-project`

### Open in VSCode

After you finished installation and project setup, you can open the project's root folder in VSCode.

{: .answer}
### * *{: .fa .fa-exclamation-circle} Make sure you are opening the project's root folder (contains wurst.build file) using `File -> Open Folder`
`code my-wurst-project`

Once the project is opened, you can click the Hello.wurst file on the left to activate the Wurst plugin. The code should compile and the setup should be done. Using VSCode's command console (`F1`) you can execute wurst commands such as running or building your map.
{: .answer}

If you are new to WurstScript but not new to programming, you probably want to continue with the [* *{: .fa .fa-external-link-square} Beginner's Guide](tutorials/wurstbeginner.html)
### _ _{: .fa .fa-exclamation-circle} Make sure you are opening the project's root folder (contains wurst.build file) using `File -> Open Folder`

### Updating existing projects
Once the project is opened, you can click the `Hello.wurst` file on the left to activate the Wurst plugin. The code should compile and the setup should be done. Using VSCode's command console (`F1`) you can execute wurst commands such as running or building your map.

If you want to import someone else's project or work on a different machine, you need to setup the project with local configuration and pull dependencies first.
If you are new to WurstScript but not new to programming, you probably want to continue with the [_ _{: .fa .fa-external-link-square} Beginner's Guide](tutorials/wurstbeginner.html)

#### Grill
### Installing and Updating a project

Navigate to the project's root and run `install` to update dependencies and configuration of the wurst project.
Run the `install` command to update your project's dependencies, or to initially setup a fresly cloned project to work on your machine.

`grill install`

#### UI
### Adding dependencies

By clicking the import button you can load an existing wurst.build file. After a successful load clicking the `Update Project` button will update your dependencies and generate local files as necessary.
To add a new dependency, run the `install` command with a second parameter that points to a git repo.

`grill install https://github.com/Frotty/wurst-astar-jps`

## Graphical User Interface

By running the `WurstSetup.jar` without any arguments or simply by double-clicking, you can alternatively use the deprecated, graphical user interface.

![](/assets/images/setup/WurstSetup.png){: .img-responsive}

0 comments on commit 6500409

Please sign in to comment.