Skip to content

How to use the Sector File Compiler (seeing your changes in EuroScope)

Thomas Mills edited this page Jan 7, 2022 · 5 revisions

So you've made some changes in the repository, but now you want to know how they look on EuroScope.

If you're making quick changes, then one option is to just edit your own .sct/.ese. However, with larger changes, it can be very easy to forget what has been changed just in your local files, and what you've changed in the repo. For most issues, therefore, the best way to use the Compiler.

The Sector File Compiler is courtesy of the excellent @AndyTWF (Andy Ford), and replaced an older PHP generator. It both compiles the repo into .sct, .ese, and .rwy files, and is capable of running validation checks which catch errors early.

This page should help you download the compiler, show you the basics of using it in order to produce a compiled set of files, and then load them in EuroScope to check your changes.

If you are an existing contributor and have already pushed the changes to a PR, click here.

Downloading the compiler

The Compiler repo can be found at https://github.com/VATSIM-UK/sector-file-compiler. The README contains plenty of useful information on advanced configuration, etc., but that's outside the scope of this how-to. We want to download the latest version of the Compiler. Go to https://github.com/VATSIM-UK/sector-file-compiler/releases. The top one is the latest, and each release has a set of 'Assets' attached: image

You will need to download the one relevant for your operating system (for most users, this will be the Windows one - cli-windows-x64). Just click it to download.

The following instructions will be mostly Windows-specific - if you are a Linux or a Mac user, and you are unsure of how to proceed, just put a message in the #sector_file_development channel on the VATSIM UK Discord and we'd be happy to help.

Preparing the compiler

The Compiler will have saved into your Downloads folder. We need to move it into the root of the folder containing your repo. It will then look something like this: image

To run it on Windows, we need to add .exe to the end of the filename to be able to run it. E.g. cli-windows-x64 becomes cli-windows-x64.exe

Git is configured so that it should ignore the new .exe, and so shouldn't ask you if you want to commit the file.

We also need to create a new folder - call this .bin.

Your repo folder should now look like this:

image

Running the compiler

We can now run the compiler. In the top bar, where the filepath is, replace this with powershell and click enter: image

This will open a Powershell window. This is where we will run the command for the compiler.

For the purposes of this how-to, the command you want to run is: ./cli-windows-x64.exe --config-file compiler.config.json --no-wait

What do this mean?
./ allows us to run the command
cli-windows-x64.exe is the name of the file
--config-file sets the config file we want to use - that's the one included with the repo, compiler.config.json
--no-wait means that the compiler doesn't require a keypress to exit

The compiler will then run, if everything is setup correctly, and the output should look like this (if your changes pass the validation): image

If your changes did not pass the validation, the compiler will output a list of errors, which must be fixed in order to compile. These are usually fairly self-explanatory (check formatting, etc.), but if you run into trouble #sector_file_development on the VATSIM UK Discord is your friend.

Inside the .bin folder we made earlier, the compiled files can be found:

image

Checking them in EuroScope

These can then be loaded in EuroScope under Open SCT -> Load Sector File. You will then need to reload the ASR you wish to check.

If you are an existing contributor and have already pushed the changes to a PR

If the changes are already published to a PR, then on the PR page, click the 'Checks' tab. image

If there is a green tick, this means that the changes have validated correctly and the files have been compiled. image

Click on 'Compile and Validate'. image

At the bottom of that page is an 'Artifacts' section - click on 'UK Sector File', which will download a .zip file. image

This can be unzipped and loaded into EuroScope.

Clone this wiki locally