Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions SOURCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Manifest sources as JSON

Extra manifest sources can be declared in `.json` files under
`%AppData%\LuaToolsGui\sources\`. A source declared this way appears as a row on the **Add** page and
installs through the same pipeline as any other.

Settings → *Manifest sources* lists the files found, what each contributed, and why anything was
refused. Files are re-read whenever that page is opened, so there is nothing to restart.

## Why

The sources the app can fetch from are otherwise fixed at build time. Following a repo that moved, or
adding a community one, means cutting a release. This makes it a line of JSON.

## Data only

A file can say **where** manifests are fetched from. It cannot supply code, a binary, or a fetch routine
of its own: it names one of the shapes the app already knows how to consume, and the app does the
fetching. Installing one of these files cannot execute anything.

## Format

`%AppData%\LuaToolsGui\sources\example.json`:

```json
{
"schema": 1,
"name": "Example sources",
"author": "you",
"sources": [
{
"name": "example-zip",
"displayName": "Example",
"kind": "manifestZip",
"url": "https://raw.githubusercontent.com/someone/some-repo/main/{appid}.zip",
"mirrors": ["https://cdn.jsdelivr.net/gh/someone/some-repo@main/{appid}.zip"],
"badge": "Free"
}
]
}
```

| Field | |
|---|---|
| `kind` | `manifestZip` — one `<appid>.zip` holding the lua and its `.manifest` files.<br>`luaFile` — one `<appid>.lua`, entitlements and depot keys only. |
| `url` | Must be `https` and contain `{appid}`. |
| `mirrors` | Tried in order when the primary is unreachable. Optional. |
| `displayName` | Row label. Defaults to `name`. |
| `badge` | Short label on the row. Cosmetic. Optional. |

A source is refused, with the reason shown in Settings, if it uses a name the app already uses, is not
`https`, has no `{appid}`, or names a `kind` that does not exist. One bad entry never takes the file's
good ones down with it.

GitHub urls go through the app's existing mirror fallback, the availability check included. A host that
refuses `HEAD` is probed with a one-byte ranged `GET` instead.
2 changes: 2 additions & 0 deletions src/LuaToolsGui/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public App()
services.AddSingleton<CoverCache>();
services.AddSingleton<ToastService>();
services.AddSingleton<SteamDepotInfo>();
services.AddSingleton<Services.Sources.SourcePackRegistry>();
services.AddSingleton<Services.Sources.PackSourceService>();
services.AddSingleton<LuaVault>();
services.AddSingleton<Services.AppInfo.LaunchModStore>();
services.AddSingleton<Services.AppInfo.LaunchOptionsService>();
Expand Down
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.ar.resx
Original file line number Diff line number Diff line change
Expand Up @@ -629,4 +629,10 @@
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>لا يوجد مفتاح فك تشفير في ملف Lua للـ depot ‏{0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>بيئة تشغيل مشتركة — مثبّتة غالبًا بالفعل. حدّدها للتنزيل على أي حال.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>هل تريد إزالة كل الإدخالات ({0}) من سجل التنزيلات؟ لن تتأثر الملفات التي تم تنزيلها.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>هذا المصدر لا يحتوي على هذه اللعبة، أو تعذّر الوصول إليه.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>مصادر المانيفست</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>مصادر إضافية معرَّفة في ملفات ‎.json. بيانات فقط: الملف يحدّد من أين تُجلب المانيفستات، ولا يُنفَّذ منه أي شيء.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>فتح المجلد</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>لا توجد ملفات مصادر بعد.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>المصادر: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.bg.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>В Lua няма ключ за дешифриране за depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Споделена среда за изпълнение — обикновено вече е инсталирана. Отметнете, за да я изтеглите.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Да се премахнат ли всички {0} записа от историята на изтеглянията? Изтеглените файлове не се засягат.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Този източник няма тази игра или е недостъпен.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Източници на манифести</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Допълнителни източници, описани във файлове .json. Само данни: файлът казва откъде да се вземат манифести и нищо в него не се изпълнява.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Отваряне на папката</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Все още няма файлове с източници.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>източници: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.cs.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Zrušit - pokračovat ve stahování</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>V Lua není dešifrovací klíč pro depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Sdílený runtime — obvykle již nainstalován. Zaškrtnutím jej přesto stáhnete.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Odstranit všech {0} záznamů z historie stahování? Stažené soubory zůstanou zachovány.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Tento zdroj tuto hru nemá, nebo je nedostupný.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Zdroje manifestů</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Další zdroje deklarované v souborech .json. Pouze data: soubor říká, odkud manifesty stáhnout, a nic z něj se nespouští.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Otevřít složku</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Zatím žádné soubory zdrojů.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>zdroje: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.da.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Annuller - fortsæt download</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>Ingen dekrypteringsnøgle i Lua til depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Delt runtime — normalt allerede installeret. Sæt flueben for at hente alligevel.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Fjern alle {0} poster fra downloadhistorikken? Hentede filer påvirkes ikke.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Denne kilde har ikke dette spil, eller kunne ikke nås.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Manifestkilder</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Ekstra kilder angivet i .json-filer. Kun data: en fil siger, hvor manifester hentes fra, og intet i den køres.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Åbn mappen</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Ingen kildefiler endnu.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>kilder: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Abbrechen - weiter herunterladen</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>Kein Entschlüsselungsschlüssel im Lua für Depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Gemeinsame Laufzeit — meist bereits installiert. Zum Herunterladen trotzdem ankreuzen.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Alle {0} Einträge aus dem Download-Verlauf entfernen? Heruntergeladene Dateien bleiben erhalten.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Diese Quelle hat dieses Spiel nicht oder war nicht erreichbar.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Manifest-Quellen</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Zusätzliche Quellen, in .json-Dateien deklariert. Nur Daten: eine Datei sagt, woher Manifeste geholt werden, ausgeführt wird daraus nie etwas.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Ordner öffnen</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Noch keine Quellendateien.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>Quellen: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.el.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>Δεν υπάρχει κλειδί αποκρυπτογράφησης στο Lua για το depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Κοινόχρηστο runtime — συνήθως ήδη εγκατεστημένο. Επιλέξτε για λήψη ούτως ή άλλως.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Να αφαιρεθούν και οι {0} καταχωρίσεις από το ιστορικό λήψεων; Τα ληφθέντα αρχεία δεν επηρεάζονται.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Αυτή η πηγή δεν έχει αυτό το παιχνίδι, ή δεν ήταν προσβάσιμη.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Πηγές manifest</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Επιπλέον πηγές δηλωμένες σε αρχεία .json. Μόνο δεδομένα: το αρχείο λέει από πού λαμβάνονται τα manifest, και τίποτα μέσα του δεν εκτελείται.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Άνοιγμα φακέλου</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Δεν υπάρχουν ακόμη αρχεία πηγών.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>πηγές: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.es-419.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Cancelar: seguir descargando</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>No hay clave de descifrado en el Lua para el depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Runtime compartido: normalmente ya está instalado. Marca para descargarlo igualmente.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>¿Quitar las {0} entradas del historial de descargas? Los archivos descargados no se ven afectados.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Esta fuente no tiene este juego, o no se pudo contactar.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Fuentes de manifiestos</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Fuentes adicionales declaradas en archivos .json. Solo datos: un archivo indica de dónde obtener manifiestos, y nada en él se ejecuta.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Abrir la carpeta</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Aún no hay archivos de fuentes.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>fuentes: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Cancelar: seguir descargando</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>No hay clave de descifrado en el Lua para el depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Runtime compartido: normalmente ya está instalado. Marca para descargarlo igualmente.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>¿Quitar las {0} entradas del historial de descargas? Los archivos descargados no se ven afectados.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Esta fuente no tiene este juego, o no se pudo contactar.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Fuentes de manifiestos</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Fuentes adicionales declaradas en archivos .json. Solo datos: un archivo indica de dónde obtener manifiestos, y nada en él se ejecuta.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Abrir la carpeta</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Aún no hay archivos de fuentes.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>fuentes: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.fi.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Peruuta - jatka lataamista</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>Lua-tiedostossa ei ole salauksenpurkuavainta depotille {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Jaettu suoritusympäristö — yleensä jo asennettu. Valitse ladataksesi silti.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Poistetaanko kaikki {0} merkintää lataushistoriasta? Ladattuihin tiedostoihin tämä ei vaikuta.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Tässä lähteessä ei ole tätä peliä, tai siihen ei saatu yhteyttä.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Manifestilähteet</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Lisälähteitä .json-tiedostoissa. Pelkkää dataa: tiedosto kertoo mistä manifestit haetaan, eikä siitä suoriteta mitään.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Avaa kansio</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Ei vielä lähdetiedostoja.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>lähteet: {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Annuler - continuer le téléchargement</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>Aucune clé de déchiffrement dans le Lua pour le depot {0}.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Runtime partagé — généralement déjà installé. Cochez pour le télécharger quand même.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Supprimer les {0} entrées de l'historique des téléchargements ? Les fichiers téléchargés ne sont pas affectés.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Cette source n'a pas ce jeu, ou n'a pas pu être jointe.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Sources de manifests</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>Sources supplémentaires déclarées dans des fichiers .json. Uniquement des données : un fichier indique où récupérer des manifests, rien n'y est jamais exécuté.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Ouvrir le dossier</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Aucun fichier de source pour l'instant.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>sources : {0}</value></data>
</root>
6 changes: 6 additions & 0 deletions src/LuaToolsGui/Resources/Strings.hu.resx
Original file line number Diff line number Diff line change
Expand Up @@ -603,4 +603,10 @@ Mégse - letöltés folytatása</value></data>
<data name="Depot_Err_NoKeyFor" xml:space="preserve"><value>A Lua nem tartalmaz visszafejtő kulcsot a(z) {0} depot-hoz.</value></data>
<data name="Builds_Select_SharedHint" xml:space="preserve"><value>Megosztott futtatókörnyezet — általában már telepítve van. Jelölje be, ha mégis letöltené.</value></data>
<data name="Downloads_ClearHistory_Confirm" xml:space="preserve"><value>Eltávolítja mind a(z) {0} bejegyzést a letöltési előzményekből? A letöltött fájlokat ez nem érinti.</value></data>
<data name="Sources_Err_Fetch" xml:space="preserve"><value>Ez a forrás nem tartalmazza ezt a játékot, vagy nem érhető el.</value></data>
<data name="Settings_Section_Sources" xml:space="preserve"><value>Manifest-források</value></data>
<data name="Settings_SourcePacks_Hint" xml:space="preserve"><value>További források .json fájlokban megadva. Csak adat: a fájl megmondja, honnan töltsük le a manifesteket, és semmi nem fut le belőle.</value></data>
<data name="Settings_SourcePacks_Open" xml:space="preserve"><value>Mappa megnyitása</value></data>
<data name="Settings_SourcePacks_None" xml:space="preserve"><value>Még nincs forrásfájl.</value></data>
<data name="Settings_SourcePacks_Count" xml:space="preserve"><value>források: {0}</value></data>
</root>
Loading