From 2743ccb6e1a152a4bc3da48fe183e236d2550014 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Wed, 4 Jul 2018 16:29:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=93=20Update=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 53 +++++++++++++++++++++++++++-- src/interfaces/ISettings.ts | 2 +- src/ssn/verify/verifyProductName.ts | 2 +- 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7bed9fe..b465acb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,55 @@ -This tool is used for fetching releases from SWTOR's patch server CDN and installing them. +This tool is used for fetching releases from SWTOR’s patch server CDN and installing them. # Dependencies -For this tool to work, ```tsc``` must be globally available, e.g. by running: +For this tool to work, ```tsc``` and ```tslint``` must be globally available, e.g. by running: ```bash -npm install -g typescript +npm install -g typescript tslint ``` + +# Overview +SWTOR’s patcher is licensed from Solid State Networks, so it is mostly using code from SSN. However, SWTOR does not use the original software by SSN; instead they wrote their own patch deploy pipeline which interfaces with the SSN command line tools. + +Also, SWTOR does not use all features offered by SSN. Notably, for public-facing products they do not use the peer-to-peer download of patches; instead all patches are downloaded from a CDN. In addition, they do not use the ```upcoming``` feature where you can preload an upcoming patch before it is released. + +## Terminology +SSN uses the following terms; make sure you are familiar with them since we use them as well in documentation and in code. + +- __```product```__: SWTOR is split into multiple products. That way, you can choose to only install part of SWTOR. For example, if you install the products ```assets_swtor_main``` and ```assets_swtor_en_us```, you only have the English-language live client files and no other languages and no PTS. +- __```release```__: Colloquially, this is known as a “patch” (or Game Update). For example, release ```264``` in product ```assets_swtor_main``` refers to Game Update 5.2.0. However, not every release can be mapped to a “patch” (or Game Update); sometimes there are multiple releases between two actual “patches”, e.g. because of built errors or because they need to add another hotfix before releasing the “patch”. A release is always an integer starting at ```0```. +- __```patch```__: In a SSN sense, a patch refers to the difference between two releases. For example, ```263to264``` is a patch that can be used to update a product from release ```263``` to release ```264```. The first number is called ```from``` while the second number is ```to```. If the ```from``` number is ```-1```, e.g. in patch ```-1to0```, the patch does not store the differences but the full file contents to allow a fresh install. Otherwise, you must already have the ```from``` release installed in order to apply the patch. +- __```environment```__: An environment consists of multiple products. For example, the ```live``` environment has products like ```assets_swtor_main``` while the ```pts``` environment has ```assets_swtor_test_main```. + +## SWTOR conventions + +SWTOR uses the following products: + +- __```assets_swtor_de_de```__: German language files for the live environment. +- __```assets_swtor_fr_fr```__: English language files for the live environment. +- __```assets_swtor_en_us```__: French language files for the live environment. +- __```assets_swtor_main```__: Main game data for the live environment. +- __```assets_swtor_test_de_de```__: German language files for the PTS environment. +- __```assets_swtor_test_en_us```__: English language files for the PTS environment. +- __```assets_swtor_test_fr_fr```__: French language files for the PTS environment. +- __```assets_swtor_test_main```__: Main game data for the PTS environment. +- __```eualas```__: End user access and license agreement, and other legal documents you need to accept in the launcher before you can play the game. +- __```movies_de_de```__: Intro movies by Blur in German language. +- __```movies_en_us```__: Intro movies by Blur in English language. +- __```movies_fr_fr```__: Intro movies by Blur in French language. +- __```patcher2014```__: The old launcher, now replaced by ```patcher2017```. +- __```patcher2017```__: Current version of the launcher, used to download and install patches. +- __```retailclient_betatest```__: The client used during the closed beta (2011 and earlier) to play the game. +- __```retailclient_cstraining```__: No longer used. +- __```retailclient_liveeptest```__: No longer used. +- __```retailclient_liveqatest```__: The current client used by QA the day before a maintenance to log into a private server and check that the upcoming patch is correct. +- __```retailclient_publictest```__: The current client used to play the game on the PTS. +- __```retailclient_squadron157```__: The client used during the closed beta by the Squadron157 testing group to play the game. +- __```retailclient_swtor```__: The current client used to play the game in the live environment. + +In addition, there are a few private products which are only reachable through BioWare’s VPN and are not publicly accessible: + +.... + +## CDN + +Manifests are hosted on manifest.swtor.com, while patches are hosted on cdn-patch.swtor.com. They can only be downloaded via HTTP (port 80) but the files are integrity-checked via their included signatures. diff --git a/src/interfaces/ISettings.ts b/src/interfaces/ISettings.ts index b77750b..da052ca 100644 --- a/src/interfaces/ISettings.ts +++ b/src/interfaces/ISettings.ts @@ -1,4 +1,4 @@ -type Product = 'assets_swtor_de_de' | 'assets_swtor_en_us' | 'assets_swtor_fr_fr' | 'assets_swtor_main' | 'assets_swtor_test_de_de' | 'assets_swtor_test_en_us' | 'assets_swtor_test_fr_fr' | 'assets_swtor_test_main' | 'eualas' | 'movies_de_de' | 'movies_en_us' | 'movies_fr_fr' | 'patcher2014' | 'patcher2017' | 'retailclient_betatest' | 'retailclient_cstraining' | 'retailclient_liveeptest' | 'retailclient_publictest' | 'retailclient_squadron157' | 'retailclient_swtor'; +type Product = 'assets_swtor_de_de' | 'assets_swtor_en_us' | 'assets_swtor_fr_fr' | 'assets_swtor_main' | 'assets_swtor_test_de_de' | 'assets_swtor_test_en_us' | 'assets_swtor_test_fr_fr' | 'assets_swtor_test_main' | 'eualas' | 'movies_de_de' | 'movies_en_us' | 'movies_fr_fr' | 'patcher2014' | 'patcher2017' | 'retailclient_betatest' | 'retailclient_cstraining' | 'retailclient_liveeptest' | 'retailclient_liveqatest' | 'retailclient_publictest' | 'retailclient_squadron157' | 'retailclient_swtor'; interface ISettings { [key: string]: any; diff --git a/src/ssn/verify/verifyProductName.ts b/src/ssn/verify/verifyProductName.ts index c305620..4737a39 100644 --- a/src/ssn/verify/verifyProductName.ts +++ b/src/ssn/verify/verifyProductName.ts @@ -1,6 +1,6 @@ import { Product } from '../../interfaces/ISettings'; -const allowedProducts: Product[] = ['assets_swtor_de_de', 'assets_swtor_en_us', 'assets_swtor_fr_fr', 'assets_swtor_main', 'assets_swtor_test_de_de', 'assets_swtor_test_en_us', 'assets_swtor_test_fr_fr', 'assets_swtor_test_main', 'eualas', 'movies_de_de', 'movies_en_us', 'movies_fr_fr', 'patcher2014', 'patcher2017', 'retailclient_betatest', 'retailclient_cstraining', 'retailclient_liveeptest', 'retailclient_publictest', 'retailclient_squadron157', 'retailclient_swtor']; +const allowedProducts: Product[] = ['assets_swtor_de_de', 'assets_swtor_en_us', 'assets_swtor_fr_fr', 'assets_swtor_main', 'assets_swtor_test_de_de', 'assets_swtor_test_en_us', 'assets_swtor_test_fr_fr', 'assets_swtor_test_main', 'eualas', 'movies_de_de', 'movies_en_us', 'movies_fr_fr', 'patcher2014', 'patcher2017', 'retailclient_betatest', 'retailclient_cstraining', 'retailclient_liveeptest', 'retailclient_liveqatest', 'retailclient_publictest', 'retailclient_squadron157', 'retailclient_swtor']; export default function verifyProductName(name: string) { return allowedProducts.includes(name as Product);