From 58b3ba685dbb854d9d855b29976458f3d71a6b41 Mon Sep 17 00:00:00 2001 From: Masquerade <87361986+Masquerade64@users.noreply.github.com> Date: Sat, 4 Jan 2025 17:27:05 +0000 Subject: [PATCH] Add files via upload --- MainForm.cs | 9 +++--- Properties/Resources.Designer.cs | 10 ++++++ Properties/Resources.resx | 3 ++ Resources/French.bin | 13 ++++++-- Resources/Global.bin | 2 +- Resources/rarreg.key | 11 +++++++ SuperSteamPacker.csproj | 1 + depots_merge.py | 53 ++++++++++++++++++++++++++++++++ 8 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 Resources/rarreg.key create mode 100644 depots_merge.py diff --git a/MainForm.cs b/MainForm.cs index 29667b6..d9cbee4 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -17,6 +17,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; using System.Drawing; +using System.Reflection; using static SteamKit2.Internal.CContentBuilder_CommitAppBuild_Request; using static System.Windows.Forms.VisualStyles.VisualStyleElement; using System.Windows.Forms.VisualStyles; @@ -60,6 +61,7 @@ namespace SuperSteamPacker Directory.CreateDirectory("Compressor"); } File.WriteAllBytes("Compressor\\rar.exe", Properties.Resources.rar); + File.WriteAllBytes("Compressor\\rarreg.key", Properties.Resources.rarreg); } ResourceSet resourceSet = Properties.Resources.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true); @@ -1002,7 +1004,7 @@ namespace SuperSteamPacker Directory.Delete("Temp", true); } QueueBox.Items[i] = QueueBox.Items[i].ToString().Replace(languageini.Read("COMPRESSING", "SSP"), languageini.Read("WRITINGINFO", "SSP")); - + Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); using (StreamWriter RINfo = new StreamWriter("Completed\\[CS.RIN.RU Info] " + GameName+".Build."+BuildNo+"."+OS+"."+workarray[2]+".txt")) { GameName = GameName.Replace("_", " "); @@ -1403,9 +1405,6 @@ namespace SuperSteamPacker decryptedBytes[i] = (byte)(xorbytes[i] ^ keybytes[i % keybytes.Length]); } - //return Encoding.UTF8.GetString(decryptedBytes); - //string[] parts = cipherText.Split(':'); - string[] parts = Encoding.UTF8.GetString(decryptedBytes).Split(':'); byte[] iv = Convert.FromBase64String(parts[0]); byte[] cipherBytes = Convert.FromBase64String(parts[1]); @@ -1858,7 +1857,7 @@ namespace SuperSteamPacker continue; } } - Directory.SetCurrentDirectory(".."); + Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); if (!Directory.Exists("Temp")) { Directory.CreateDirectory("Temp"); diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 632c521..6361a76 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -150,6 +150,16 @@ namespace SuperSteamPacker.Properties { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] rarreg { + get { + object obj = ResourceManager.GetObject("rarreg", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Byte[]. /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index f7d36fb..cb6472a 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -142,6 +142,9 @@ ..\Resources\rar.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\rarreg.key;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ..\Resources\Settings.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/Resources/French.bin b/Resources/French.bin index 3626b0a..edb37a3 100644 --- a/Resources/French.bin +++ b/Resources/French.bin @@ -1,7 +1,7 @@ # # Super Steam Packer Language File # French by Titeuf -# V1.2 +# V1.3.2 [SSP] by=par @@ -58,4 +58,13 @@ GameManageGroup=Gestionnaire de jeu BranchManagerGroup=Branch Manager BranchLabel=Branche a telecharger: BranchPassword=Branch password? (Enter below) -UploadCrewMode=Upload Crew Mode \ No newline at end of file +UploadCrewMode=Mode Upload Crew +DarkMode=Mode Nuit +SyncDepots=Sync les noms des depots +unabletoaccessgithub=Impossible d'acceder a Github. +depotsyncsuccess=Les noms des depots ont ete synchronises avec succes. +MODWarning1=L'ID d'App ou l'ID Item Workshop n'est pas valide. +MODManager=Gestionnaire de contenu Workshop +rinruUsername=Entrez votre nom d'utilisateur cs.rin.ru: +filehost=Entrez l'emplacement où vous uploadez les fichiers: +skipcompression=Ignorer la compression diff --git a/Resources/Global.bin b/Resources/Global.bin index 046a660..eaf26d2 100644 --- a/Resources/Global.bin +++ b/Resources/Global.bin @@ -1,6 +1,6 @@ [SSP] Title=Super Steam Packer -Version=v1.3.2 +Version=v1.3.2.1 Author=Masquerade Forum=CS.RIN.RU Github=Masquerade's Github \ No newline at end of file diff --git a/Resources/rarreg.key b/Resources/rarreg.key new file mode 100644 index 0000000..07791ff --- /dev/null +++ b/Resources/rarreg.key @@ -0,0 +1,11 @@ +RAR registration data +Masquerade +Unlimited Company License +UID=c9f00b7f7efd488031e5 +641221225031e5eadc68af4f7149b77b22f426ea6bba524971ff1b +cdb36faee473a0ad14c160573d03836c90f33e476541dcd9316c69 +dc443d85737992e5b229fe21aefb96e7a4c5aa757a5f63c08b0b0e +6f0c3445559164b1800c412e9a4f7e229c60cd9ddcd5062ebd3d46 +4c848f663afd64da47874a0c0a506832e4d3a8dc2996e7a4c5aa75 +7a5f63c0a4360aada93442bfec275e30b0ee99558f8d63c96090f3 +4e512cb46873ef94f8112b5559318750b52cabb7d58f3793698293 diff --git a/SuperSteamPacker.csproj b/SuperSteamPacker.csproj index d30397d..a0b6415 100644 --- a/SuperSteamPacker.csproj +++ b/SuperSteamPacker.csproj @@ -138,6 +138,7 @@ + diff --git a/depots_merge.py b/depots_merge.py new file mode 100644 index 0000000..5fc0c80 --- /dev/null +++ b/depots_merge.py @@ -0,0 +1,53 @@ +import configparser + +def read_ini_without_duplicates(ini_path): + config = configparser.ConfigParser() + with open(ini_path, 'r', encoding='utf-8') as ini_file: + section = None + seen_keys = set() + for line in ini_file: + line = line.strip() + if not line or line.startswith(';') or line.startswith('#'): + continue + if line.startswith('[') and line.endswith(']'): + section = line[1:-1].strip() + seen_keys = set() + config.add_section(section) + else: + try: + key, value = line.split('=', 1) + key = key.strip() + value = value.strip() + if key not in seen_keys: + config.set(section, key, value) + seen_keys.add(key) + except ValueError: + continue + return config + +def merge_ini_files(main_ini_path, new_ini_path, output_ini_path): + main_config = configparser.ConfigParser() + with open(main_ini_path, 'r', encoding='utf-8') as main_file: + main_config.read_file(main_file) + new_config = read_ini_without_duplicates(new_ini_path) + main_items = {} + for section in main_config.sections(): + for key, value in main_config.items(section): + main_items[int(key)] = value + new_items = {} + for section in new_config.sections(): + for key, value in new_config.items(section): + new_items[int(key)] = value + for key, value in new_items.items(): + if key not in main_items and value != "Unknown": + main_items[key] = value + sorted_items = sorted(main_items.items()) + with open(output_ini_path, 'w', encoding='utf-8') as output_ini_file: + for key, value in sorted_items: + output_ini_file.write(f'{key} = {value}\n') + print(f'The merged INI file is saved as {output_ini_path}') + +main_ini = 'depots.ini' +new_ini = 'new.ini' +output_ini = 'depots_new.ini' +merge_ini_files(main_ini, new_ini, output_ini) \ No newline at end of file