Skip to content

Commit 8499f51

Browse files
committed
fix(engine): Exit(1) when compiler fails to alert dev
1 parent cf6f526 commit 8499f51

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

README.md

+21-18
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,17 @@ It won't ever profit off your trademarks. Without this project, this version of
1717

1818
*To players*: So happy to have you interested! RuneScape 2 launched on March 29, 2004. We have no copies of that revision, but we do have some client caches from May 2004. This project emulates *May 18, 2004*, which was live until June 1 of that year. It has Treasure Trails and Big Chompy Bird Hunting. The next revision after this added Elemental Workshop I.
1919

20-
## Environment Dependencies
21-
22-
- [NodeJS 20+](https://nodejs.org/) (current LTS) or [18](https://nodejs.org/download/release/v18.18.2/) (last LTS)
23-
- [Java 17+](https://adoptium.net/)
24-
- If you're using VS Code (recommended), [we have an extension to install here.](https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage)
25-
26-
Java is required for RuneScriptCompiler.jar, our content language compiler.
27-
28-
You can download RuneScriptCompiler from the [#dev-resources](https://discord.com/channels/953326730632904844/1125601647574396978) Discord channel. Place the jar file in the root directory of the project.
29-
30-
RuneScriptCompiler is not yet open-source, sorry for any inconvenience.
31-
3220
## Getting Started
3321

34-
1. Clone the repo
35-
2. Install [environment dependencies](#environment-dependencies)
36-
3. Run `npm ci` to install code dependencies
37-
4. Copy the file `.env.example` to `.env`
38-
5. Run `npm run build` to create the client and server cache. This may take a few minutes the first time
39-
6. Run `npm start` to start the server
22+
1. Download this repo to your computer
23+
2. Install our list of [dependencies](#environment-dependencies)
24+
3. Create a `.env` file by copying the file `.env.example` to be called `.env`
25+
4. Open the folder you downloaded in a command prompt
26+
5. Run `npm ci`, this installs necessary packages
27+
6. Run `npm run build`, this creates the client and server cache the first time
28+
7. Run `npm start`
29+
30+
Now open [http://localhost](http://localhost) in your browser and play!
4031

4132
### Using the setup script
4233

@@ -62,6 +53,18 @@ Once the container starts, it automatically starts running `setup.sh`. You can c
6253

6354
Another option for building your Dev Container is to instead clone your repository onto your local machine first and then run `Dev Containers: Open Folder in Container` and work that way by mounting the local files into your container. This way, you can have RuneScriptCompiler.jar in your workspace from the get-go. **Note: The npm scripts are much slower when the container is running this way.**
6455

56+
## Environment Dependencies
57+
58+
- [NodeJS 20+](https://nodejs.org/) (current LTS) or [18](https://nodejs.org/download/release/v18.18.2/) (last LTS)
59+
- [Java 17+](https://adoptium.net/)
60+
- If you're using VS Code (recommended), [we have an extension to install here.](https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage)
61+
62+
Java is required for RuneScriptCompiler.jar, our content language compiler.
63+
64+
You can download RuneScriptCompiler from the [#dev-resources](https://discord.com/channels/953326730632904844/1125601647574396978) Discord channel. Place the jar file in the root directory of the project.
65+
66+
RuneScriptCompiler is not yet open-source, sorry for any inconvenience.
67+
6568
## Development Workflow
6669

6770
Content developers (likely you!) can run `npm start` to start the server. This will watch for changes to the config and script files as well as automatically rebuild them.

src/lostcity/tools/pack/server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function packServer() {
2525
try {
2626
child_process.execSync(`"${Environment.JAVA_PATH}" -jar RuneScriptCompiler.jar`, { stdio: 'inherit' });
2727
} catch (err) {
28-
// ignore
28+
process.exit(1);
2929
}
3030
console.timeEnd('packing server...');
3131
}

0 commit comments

Comments
 (0)