aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/depotdownloader-json/0001-emit-json-in-.DepotDownload.patch
diff options
context:
space:
mode:
authoryuuko <yuuko@partyvan.io>2024-11-24 00:49:25 -0800
committeryuuko <yuuko@partyvan.io>2024-11-24 00:49:25 -0800
commite4c37c5d5dc734fb94149af4a6273f35f818bdca (patch)
tree46912968714a140234aea6b23b930f229ad733de /srcds-pkgs/depotdownloader-json/0001-emit-json-in-.DepotDownload.patch
parent402758f0494c2e4826605b36a93bbbe703db9cbd (diff)
chore: rework depotdownloader patches for 2.7
Diffstat (limited to 'srcds-pkgs/depotdownloader-json/0001-emit-json-in-.DepotDownload.patch')
-rw-r--r--srcds-pkgs/depotdownloader-json/0001-emit-json-in-.DepotDownload.patch51
1 files changed, 0 insertions, 51 deletions
diff --git a/srcds-pkgs/depotdownloader-json/0001-emit-json-in-.DepotDownload.patch b/srcds-pkgs/depotdownloader-json/0001-emit-json-in-.DepotDownload.patch
deleted file mode 100644
index 6a58ac6..0000000
--- a/srcds-pkgs/depotdownloader-json/0001-emit-json-in-.DepotDownload.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 5ca2011ef9c6463c6e5953101792b663b6546373 Mon Sep 17 00:00:00 2001
-From: yuuko <yuuko@kurofuku.me>
-Date: Fri, 31 Mar 2023 16:03:32 -0700
-Subject: [PATCH] emit json in .DepotDownload
-
----
- DepotDownloader/ContentDownloader.cs | 1 +
- DepotDownloader/ProtoManifest.cs | 8 ++++++++
- 2 files changed, 9 insertions(+)
-
-diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs
-index 7cee83f7..3bf79aa5 100644
---- a/DepotDownloader/ContentDownloader.cs
-+++ b/DepotDownloader/ContentDownloader.cs
-@@ -929,6 +929,7 @@ namespace DepotDownloader
-
- newProtoManifest = new ProtoManifest(depotManifest, depot.manifestId);
- newProtoManifest.SaveToFile(newManifestFileName, out checksum);
-+ newProtoManifest.SaveToJSON(newManifestFileName.Replace(".bin", ".json"));
- File.WriteAllBytes(newManifestFileName + ".sha", checksum);
-
- Console.WriteLine(" Done!");
-diff --git a/DepotDownloader/ProtoManifest.cs b/DepotDownloader/ProtoManifest.cs
-index 70389a05..c5e12cfc 100644
---- a/DepotDownloader/ProtoManifest.cs
-+++ b/DepotDownloader/ProtoManifest.cs
-@@ -2,6 +2,8 @@
- using System.Collections.Generic;
- using System.IO;
- using System.IO.Compression;
-+using System.Text;
-+using System.Text.Json;
- using ProtoBuf;
- using SteamKit2;
-
-@@ -142,6 +144,12 @@ namespace DepotDownloader
- }
- }
-
-+ public void SaveToJSON(string filename)
-+ {
-+ var jsonBytes = new UTF8Encoding(true).GetBytes(JsonSerializer.Serialize(this));
-+ File.Open(filename, FileMode.Create).Write(jsonBytes, 0, jsonBytes.Length);
-+ }
-+
- public void SaveToFile(string filename, out byte[] checksum)
- {
- using (var ms = new MemoryStream())
---
-2.38.4
-