Add files via upload

This commit is contained in:
Masquerade
2025-01-04 17:27:05 +00:00
committed by GitHub
parent 416a5c4b9b
commit 58b3ba685d
8 changed files with 94 additions and 8 deletions

View File

@@ -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");

View File

@@ -150,6 +150,16 @@ namespace SuperSteamPacker.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] rarreg {
get {
object obj = ResourceManager.GetObject("rarreg", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>

View File

@@ -142,6 +142,9 @@
<data name="rar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rar.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="rarreg" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rarreg.key;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Settings.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>

View File

@@ -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
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

View File

@@ -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

11
Resources/rarreg.key Normal file
View File

@@ -0,0 +1,11 @@
RAR registration data
Masquerade
Unlimited Company License
UID=c9f00b7f7efd488031e5
641221225031e5eadc68af4f7149b77b22f426ea6bba524971ff1b
cdb36faee473a0ad14c160573d03836c90f33e476541dcd9316c69
dc443d85737992e5b229fe21aefb96e7a4c5aa757a5f63c08b0b0e
6f0c3445559164b1800c412e9a4f7e229c60cd9ddcd5062ebd3d46
4c848f663afd64da47874a0c0a506832e4d3a8dc2996e7a4c5aa75
7a5f63c0a4360aada93442bfec275e30b0ee99558f8d63c96090f3
4e512cb46873ef94f8112b5559318750b52cabb7d58f3793698293

View File

@@ -138,6 +138,7 @@
<None Include="Resources\French.bin" />
<None Include="Resources\German.bin" />
<None Include="Resources\Global.bin" />
<None Include="Resources\rarreg.key" />
<None Include="Resources\Settings.bin" />
<None Include="Resources\Spanish.bin" />
</ItemGroup>

53
depots_merge.py Normal file
View File

@@ -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)