diff --git a/App.config b/App.config new file mode 100644 index 0000000..3916e0e --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/IniFile.cs b/IniFile.cs new file mode 100644 index 0000000..1555745 --- /dev/null +++ b/IniFile.cs @@ -0,0 +1,51 @@ +using System.Text; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; + +namespace SuperSteamPacker +{ + internal class Ini + { + string Path; + string EXE = Assembly.GetExecutingAssembly().GetName().Name; + + [DllImport("kernel32", CharSet = CharSet.Unicode)] + static extern long WritePrivateProfileString(string Section, string Key, string Value, string FilePath); + + [DllImport("kernel32", CharSet = CharSet.Unicode)] + static extern int GetPrivateProfileString(string Section, string Key, string Default, StringBuilder RetVal, int Size, string FilePath); + + public Ini(string IniPath = null) + { + Path = new FileInfo(IniPath ?? EXE + ".ini").FullName; + } + + public string Read(string Key, string Section = null) + { + var RetVal = new StringBuilder(255); + GetPrivateProfileString(Section ?? EXE, Key, "", RetVal, 255, Path); + return RetVal.ToString(); + } + + public void Write(string Key, string Value, string Section = null) + { + WritePrivateProfileString(Section ?? EXE, Key, Value, Path); + } + + public void DeleteKey(string Key, string Section = null) + { + Write(Key, null, Section ?? EXE); + } + + public void DeleteSection(string Section = null) + { + Write(null, null, Section ?? EXE); + } + + public bool KeyExists(string Key, string Section = null) + { + return Read(Key, Section).Length > 0; + } + } +} diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs new file mode 100644 index 0000000..e067f0c --- /dev/null +++ b/MainForm.Designer.cs @@ -0,0 +1,393 @@ +namespace SuperSteamPacker +{ + partial class MainWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); + this.OSBox = new System.Windows.Forms.ComboBox(); + this.QueueBox = new System.Windows.Forms.ListBox(); + this.QueueLabel = new System.Windows.Forms.Label(); + this.AppIDTxtBox = new System.Windows.Forms.TextBox(); + this.AddBtn = new System.Windows.Forms.Button(); + this.AppIDLabel = new System.Windows.Forms.Label(); + this.AppIDExplain = new System.Windows.Forms.Button(); + this.OSLabel = new System.Windows.Forms.Label(); + this.OSExplain = new System.Windows.Forms.Button(); + this.DelBtn = new System.Windows.Forms.Button(); + this.StartBtn = new System.Windows.Forms.Button(); + this.TmpLstBx = new System.Windows.Forms.ListBox(); + this.UsernameTextBox = new System.Windows.Forms.TextBox(); + this.MoreSettingsBtn = new System.Windows.Forms.Button(); + this.PasswordTextBox = new System.Windows.Forms.TextBox(); + this.PasswordLabel = new System.Windows.Forms.Label(); + this.UsernameLabel = new System.Windows.Forms.Label(); + this.SaveLoginBtn = new System.Windows.Forms.Button(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.ClearQueueBtn = new System.Windows.Forms.Button(); + this.MoveUpBtn = new System.Windows.Forms.Button(); + this.MoveDownBtn = new System.Windows.Forms.Button(); + this.csrinbtn = new System.Windows.Forms.Button(); + this.ExportQueueButton = new System.Windows.Forms.Button(); + this.ImportQueueButton = new System.Windows.Forms.Button(); + this.GithubBtn = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // OSBox + // + this.OSBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.OSBox.FormattingEnabled = true; + this.OSBox.Items.AddRange(new object[] { + "Linux", + "Mac", + "Windows x86", + "Windows x64"}); + this.OSBox.Location = new System.Drawing.Point(148, 274); + this.OSBox.Name = "OSBox"; + this.OSBox.Size = new System.Drawing.Size(120, 21); + this.OSBox.TabIndex = 0; + // + // QueueBox + // + this.QueueBox.FormattingEnabled = true; + this.QueueBox.Location = new System.Drawing.Point(12, 30); + this.QueueBox.Name = "QueueBox"; + this.QueueBox.Size = new System.Drawing.Size(431, 212); + this.QueueBox.TabIndex = 1; + this.QueueBox.SelectedIndexChanged += new System.EventHandler(this.QueueBox_SelectedIndexChanged); + // + // QueueLabel + // + this.QueueLabel.AutoSize = true; + this.QueueLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.QueueLabel.Location = new System.Drawing.Point(9, 7); + this.QueueLabel.Name = "QueueLabel"; + this.QueueLabel.Size = new System.Drawing.Size(87, 18); + this.QueueLabel.TabIndex = 2; + this.QueueLabel.Text = "QueueLabel"; + // + // AppIDTxtBox + // + this.AppIDTxtBox.Location = new System.Drawing.Point(12, 274); + this.AppIDTxtBox.Name = "AppIDTxtBox"; + this.AppIDTxtBox.Size = new System.Drawing.Size(130, 20); + this.AppIDTxtBox.TabIndex = 3; + this.AppIDTxtBox.WordWrap = false; + this.AppIDTxtBox.TextChanged += new System.EventHandler(this.AppIDTxtBox_TextChanged); + // + // AddBtn + // + this.AddBtn.Location = new System.Drawing.Point(274, 245); + this.AddBtn.Name = "AddBtn"; + this.AddBtn.Size = new System.Drawing.Size(84, 51); + this.AddBtn.TabIndex = 4; + this.AddBtn.Text = "AddBtn"; + this.AddBtn.UseVisualStyleBackColor = true; + this.AddBtn.Click += new System.EventHandler(this.AddBtn_Click); + // + // AppIDLabel + // + this.AppIDLabel.AutoSize = true; + this.AppIDLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.AppIDLabel.Location = new System.Drawing.Point(12, 250); + this.AppIDLabel.Name = "AppIDLabel"; + this.AppIDLabel.Size = new System.Drawing.Size(51, 18); + this.AppIDLabel.TabIndex = 5; + this.AppIDLabel.Text = "AppID:"; + // + // AppIDExplain + // + this.AppIDExplain.Location = new System.Drawing.Point(119, 245); + this.AppIDExplain.Name = "AppIDExplain"; + this.AppIDExplain.Size = new System.Drawing.Size(23, 23); + this.AppIDExplain.TabIndex = 6; + this.AppIDExplain.Text = "?"; + this.AppIDExplain.UseVisualStyleBackColor = true; + this.AppIDExplain.Click += new System.EventHandler(this.AppIDExplain_Click); + // + // OSLabel + // + this.OSLabel.AutoSize = true; + this.OSLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.OSLabel.Location = new System.Drawing.Point(148, 249); + this.OSLabel.Name = "OSLabel"; + this.OSLabel.Size = new System.Drawing.Size(34, 18); + this.OSLabel.TabIndex = 7; + this.OSLabel.Text = "OS:"; + // + // OSExplain + // + this.OSExplain.Location = new System.Drawing.Point(246, 245); + this.OSExplain.Name = "OSExplain"; + this.OSExplain.Size = new System.Drawing.Size(23, 23); + this.OSExplain.TabIndex = 8; + this.OSExplain.Text = "?"; + this.OSExplain.UseVisualStyleBackColor = true; + this.OSExplain.Click += new System.EventHandler(this.OSExplain_Click); + // + // DelBtn + // + this.DelBtn.Location = new System.Drawing.Point(359, 245); + this.DelBtn.Name = "DelBtn"; + this.DelBtn.Size = new System.Drawing.Size(84, 51); + this.DelBtn.TabIndex = 9; + this.DelBtn.Text = "DelBtn"; + this.DelBtn.UseVisualStyleBackColor = true; + this.DelBtn.Click += new System.EventHandler(this.DelBtn_Click); + // + // StartBtn + // + this.StartBtn.Location = new System.Drawing.Point(534, 245); + this.StartBtn.Name = "StartBtn"; + this.StartBtn.Size = new System.Drawing.Size(118, 51); + this.StartBtn.TabIndex = 10; + this.StartBtn.Text = "StartBtn"; + this.StartBtn.UseVisualStyleBackColor = true; + this.StartBtn.Click += new System.EventHandler(this.StartBtn_Click); + // + // TmpLstBx + // + this.TmpLstBx.FormattingEnabled = true; + this.TmpLstBx.Location = new System.Drawing.Point(366, 30); + this.TmpLstBx.Name = "TmpLstBx"; + this.TmpLstBx.Size = new System.Drawing.Size(77, 69); + this.TmpLstBx.TabIndex = 11; + this.TmpLstBx.Visible = false; + // + // UsernameTextBox + // + this.UsernameTextBox.Location = new System.Drawing.Point(450, 114); + this.UsernameTextBox.Name = "UsernameTextBox"; + this.UsernameTextBox.Size = new System.Drawing.Size(202, 20); + this.UsernameTextBox.TabIndex = 12; + this.UsernameTextBox.WordWrap = false; + this.UsernameTextBox.TextChanged += new System.EventHandler(this.UsernameTextBox_TextChanged); + // + // MoreSettingsBtn + // + this.MoreSettingsBtn.Location = new System.Drawing.Point(450, 214); + this.MoreSettingsBtn.Name = "MoreSettingsBtn"; + this.MoreSettingsBtn.Size = new System.Drawing.Size(202, 23); + this.MoreSettingsBtn.TabIndex = 13; + this.MoreSettingsBtn.Text = "MoreSettingsBtn"; + this.MoreSettingsBtn.UseVisualStyleBackColor = true; + this.MoreSettingsBtn.Click += new System.EventHandler(this.MoreSettingsBtn_Click); + // + // PasswordTextBox + // + this.PasswordTextBox.Location = new System.Drawing.Point(450, 159); + this.PasswordTextBox.Name = "PasswordTextBox"; + this.PasswordTextBox.PasswordChar = '*'; + this.PasswordTextBox.Size = new System.Drawing.Size(202, 20); + this.PasswordTextBox.TabIndex = 14; + this.PasswordTextBox.UseSystemPasswordChar = true; + this.PasswordTextBox.WordWrap = false; + // + // PasswordLabel + // + this.PasswordLabel.AutoSize = true; + this.PasswordLabel.Location = new System.Drawing.Point(449, 141); + this.PasswordLabel.Name = "PasswordLabel"; + this.PasswordLabel.Size = new System.Drawing.Size(79, 13); + this.PasswordLabel.TabIndex = 15; + this.PasswordLabel.Text = "PasswordLabel"; + // + // UsernameLabel + // + this.UsernameLabel.AutoSize = true; + this.UsernameLabel.Location = new System.Drawing.Point(449, 97); + this.UsernameLabel.Name = "UsernameLabel"; + this.UsernameLabel.Size = new System.Drawing.Size(81, 13); + this.UsernameLabel.TabIndex = 16; + this.UsernameLabel.Text = "UsernameLabel"; + // + // SaveLoginBtn + // + this.SaveLoginBtn.Location = new System.Drawing.Point(449, 185); + this.SaveLoginBtn.Name = "SaveLoginBtn"; + this.SaveLoginBtn.Size = new System.Drawing.Size(203, 23); + this.SaveLoginBtn.TabIndex = 17; + this.SaveLoginBtn.Text = "SaveLoginBtn"; + this.SaveLoginBtn.UseVisualStyleBackColor = true; + this.SaveLoginBtn.Click += new System.EventHandler(this.SaveLoginBtn_Click); + // + // pictureBox1 + // + this.pictureBox1.Image = global::SuperSteamPacker.Properties.Resources.logo; + this.pictureBox1.Location = new System.Drawing.Point(452, 7); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(193, 78); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 18; + this.pictureBox1.TabStop = false; + // + // ClearQueueBtn + // + this.ClearQueueBtn.Location = new System.Drawing.Point(444, 245); + this.ClearQueueBtn.Name = "ClearQueueBtn"; + this.ClearQueueBtn.Size = new System.Drawing.Size(84, 51); + this.ClearQueueBtn.TabIndex = 19; + this.ClearQueueBtn.Text = "ClearQueueBtn"; + this.ClearQueueBtn.UseVisualStyleBackColor = true; + this.ClearQueueBtn.Click += new System.EventHandler(this.ClearQueueBtn_Click); + // + // MoveUpBtn + // + this.MoveUpBtn.Location = new System.Drawing.Point(12, 300); + this.MoveUpBtn.Name = "MoveUpBtn"; + this.MoveUpBtn.Size = new System.Drawing.Size(215, 25); + this.MoveUpBtn.TabIndex = 20; + this.MoveUpBtn.Text = "MoveUpBtn"; + this.MoveUpBtn.UseVisualStyleBackColor = true; + this.MoveUpBtn.Click += new System.EventHandler(this.MoveUpBtn_Click); + // + // MoveDownBtn + // + this.MoveDownBtn.Location = new System.Drawing.Point(228, 300); + this.MoveDownBtn.Name = "MoveDownBtn"; + this.MoveDownBtn.Size = new System.Drawing.Size(215, 25); + this.MoveDownBtn.TabIndex = 21; + this.MoveDownBtn.Text = "MoveDownBtn"; + this.MoveDownBtn.UseVisualStyleBackColor = true; + this.MoveDownBtn.Click += new System.EventHandler(this.MoveDownBtn_Click); + // + // csrinbtn + // + this.csrinbtn.Location = new System.Drawing.Point(444, 300); + this.csrinbtn.Name = "csrinbtn"; + this.csrinbtn.Size = new System.Drawing.Size(208, 25); + this.csrinbtn.TabIndex = 22; + this.csrinbtn.Text = "CS.RIN.RU"; + this.csrinbtn.UseVisualStyleBackColor = true; + this.csrinbtn.Click += new System.EventHandler(this.csrinbtn_Click); + // + // ExportQueueButton + // + this.ExportQueueButton.Location = new System.Drawing.Point(12, 328); + this.ExportQueueButton.Name = "ExportQueueButton"; + this.ExportQueueButton.Size = new System.Drawing.Size(215, 25); + this.ExportQueueButton.TabIndex = 23; + this.ExportQueueButton.Text = "ExportQueueButton"; + this.ExportQueueButton.UseVisualStyleBackColor = true; + this.ExportQueueButton.Click += new System.EventHandler(this.ExportQueueButton_Click); + // + // ImportQueueButton + // + this.ImportQueueButton.Location = new System.Drawing.Point(228, 328); + this.ImportQueueButton.Name = "ImportQueueButton"; + this.ImportQueueButton.Size = new System.Drawing.Size(215, 25); + this.ImportQueueButton.TabIndex = 24; + this.ImportQueueButton.Text = "ImportQueueButton"; + this.ImportQueueButton.UseVisualStyleBackColor = true; + this.ImportQueueButton.Click += new System.EventHandler(this.ImportQueueButton_Click); + // + // GithubBtn + // + this.GithubBtn.Location = new System.Drawing.Point(444, 328); + this.GithubBtn.Name = "GithubBtn"; + this.GithubBtn.Size = new System.Drawing.Size(208, 25); + this.GithubBtn.TabIndex = 25; + this.GithubBtn.Text = "Masquerade\'s Github"; + this.GithubBtn.UseVisualStyleBackColor = true; + this.GithubBtn.Click += new System.EventHandler(this.GithubBtn_Click); + // + // MainWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Window; + this.ClientSize = new System.Drawing.Size(657, 361); + this.Controls.Add(this.GithubBtn); + this.Controls.Add(this.ImportQueueButton); + this.Controls.Add(this.ExportQueueButton); + this.Controls.Add(this.csrinbtn); + this.Controls.Add(this.MoveDownBtn); + this.Controls.Add(this.MoveUpBtn); + this.Controls.Add(this.ClearQueueBtn); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.SaveLoginBtn); + this.Controls.Add(this.UsernameLabel); + this.Controls.Add(this.PasswordLabel); + this.Controls.Add(this.PasswordTextBox); + this.Controls.Add(this.MoreSettingsBtn); + this.Controls.Add(this.UsernameTextBox); + this.Controls.Add(this.TmpLstBx); + this.Controls.Add(this.StartBtn); + this.Controls.Add(this.DelBtn); + this.Controls.Add(this.OSExplain); + this.Controls.Add(this.OSLabel); + this.Controls.Add(this.AppIDExplain); + this.Controls.Add(this.AppIDLabel); + this.Controls.Add(this.AddBtn); + this.Controls.Add(this.AppIDTxtBox); + this.Controls.Add(this.QueueLabel); + this.Controls.Add(this.QueueBox); + this.Controls.Add(this.OSBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "MainWindow"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Super Steam Packer"; + this.Load += new System.EventHandler(this.MainWindow_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ComboBox OSBox; + private System.Windows.Forms.ListBox QueueBox; + private System.Windows.Forms.Label QueueLabel; + private System.Windows.Forms.TextBox AppIDTxtBox; + private System.Windows.Forms.Button AddBtn; + private System.Windows.Forms.Label AppIDLabel; + private System.Windows.Forms.Button AppIDExplain; + private System.Windows.Forms.Label OSLabel; + private System.Windows.Forms.Button OSExplain; + private System.Windows.Forms.Button DelBtn; + private System.Windows.Forms.Button StartBtn; + private System.Windows.Forms.ListBox TmpLstBx; + private System.Windows.Forms.TextBox UsernameTextBox; + private System.Windows.Forms.Button MoreSettingsBtn; + private System.Windows.Forms.TextBox PasswordTextBox; + private System.Windows.Forms.Label PasswordLabel; + private System.Windows.Forms.Label UsernameLabel; + private System.Windows.Forms.Button SaveLoginBtn; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Button ClearQueueBtn; + private System.Windows.Forms.Button MoveUpBtn; + private System.Windows.Forms.Button MoveDownBtn; + private System.Windows.Forms.Button csrinbtn; + private System.Windows.Forms.Button ExportQueueButton; + private System.Windows.Forms.Button ImportQueueButton; + private System.Windows.Forms.Button GithubBtn; + } +} + diff --git a/MainForm.cs b/MainForm.cs new file mode 100644 index 0000000..24cb78e --- /dev/null +++ b/MainForm.cs @@ -0,0 +1,990 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using SteamKit2; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Resources; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SuperSteamPacker +{ + public partial class MainWindow : Form + { + public MainWindow() + { + InitializeComponent(); + + if (Directory.Exists("Jobs")) + { + Directory.Delete("Jobs", true); + } + if (Directory.Exists("Temp")) + { + Directory.Delete("Temp", true); + } + if (!File.Exists("settings.ini")) + { + File.WriteAllBytes("settings.ini", Properties.Resources.Settings); + } + if (!File.Exists("settings.ini")) + { + File.WriteAllBytes("settings.ini", Properties.Resources.Settings); + } + if (!Directory.Exists("Language")) + { + Directory.CreateDirectory("Language"); + } + if (!File.Exists("Compressor\\7z.exe")) + { + if (!Directory.Exists("Compressor")) + { + Directory.CreateDirectory("Compressor"); + } + File.WriteAllBytes("Compressor\\7z.exe", Properties.Resources._7z); + } + if (!File.Exists("Compressor\\rar.exe")) + { + if (!Directory.Exists("Compressor")) + { + Directory.CreateDirectory("Compressor"); + } + File.WriteAllBytes("Compressor\\rar.exe", Properties.Resources.rar); + } + + ResourceSet resourceSet = Properties.Resources.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true); + + foreach (DictionaryEntry resource in resourceSet) + { + string resourcename = resource.Key.ToString(); + if (resourcename.StartsWith("LANGDATA_")) + { + byte[] resourceBytes = (byte[])resource.Value; + File.WriteAllBytes("Language\\" + resourcename.Substring(9) + ".ini", resourceBytes); + } + } + + + var settingsini = new Ini("Settings.ini"); + + string compressorcheck = settingsini.Read("compressor", "SSP"); + + if (compressorcheck != "7z" && compressorcheck != "RAR") + { + settingsini.Write("compressor", "7z", "SSP"); + } + + var globalini = new Ini("Language\\Global.ini"); + + string readlanguage = settingsini.Read("language", "SSP"); + + if (String.IsNullOrEmpty(readlanguage) || !File.Exists("Language\\" + readlanguage + ".ini")) + { + readlanguage = "English"; + settingsini.Write("language", readlanguage, "SSP"); + } + + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + Text = globalini.Read("Title", "SSP") + " " + globalini.Read("Version", "SSP") + " " + languageini.Read("by", "SSP") + " " + globalini.Read("Author", "SSP"); + + QueueLabel.Text = languageini.Read("queue", "SSP") + ":"; + AddBtn.Text = languageini.Read("add", "SSP"); + DelBtn.Text = languageini.Read("del", "SSP"); + SaveLoginBtn.Text = languageini.Read("SaveLogin", "SSP"); + StartBtn.Text = languageini.Read("Start", "SSP"); + UsernameLabel.Text = languageini.Read("Username", "SSP"); + PasswordLabel.Text = languageini.Read("Password", "SSP"); + MoreSettingsBtn.Text = languageini.Read("MoreSettings", "SSP"); + ClearQueueBtn.Text = languageini.Read("ClearQueue", "SSP"); + csrinbtn.Text = globalini.Read("Forum", "SSP") + " " + languageini.Read("Forum", "SSP"); + GithubBtn.Text = globalini.Read("Github", "SSP"); + MoveUpBtn.Text = languageini.Read("MoveUp", "SSP"); + MoveDownBtn.Text = languageini.Read("MoveDown", "SSP"); + DelBtn.Enabled = false; + StartBtn.Enabled = false; + ClearQueueBtn.Enabled = false; + MoveUpBtn.Enabled = false; + MoveDownBtn.Enabled = false; + AddBtn.Enabled = false; + OSBox.Enabled = false; + ExportQueueButton.Enabled = false; + ExportQueueButton.Text = languageini.Read("Export", "SSP"); + ImportQueueButton.Text = languageini.Read("Import", "SSP"); + OSBox.SelectedIndex = 3; + + if (File.Exists("userdata.ini")) + { + var userdata = new Ini("userdata.ini"); + UsernameTextBox.Text = userdata.Read("username", "userdata"); + PasswordTextBox.Text = userdata.Read("password", "userdata"); + UsernameTextBox.Enabled = false; + PasswordTextBox.Enabled = false; + } + } + + public static void EditVDF(string filePath, string keyToModify, string newValue) + { + string fileContents = File.ReadAllText(filePath); + Regex regex = new Regex("\"" + keyToModify + "\"\\s+\"([^\"]*)\""); + Match match = regex.Match(fileContents); + + if (match.Success) + { + string oldValue = match.Groups[1].Value; + fileContents = fileContents.Replace("\"" + oldValue + "\"", "\"" + newValue + "\""); + File.WriteAllText(filePath, fileContents); + } + } + + public static string ReadVDF(string filePath, string keyToRead) + { + string fileContents = File.ReadAllText(filePath); + Regex regex = new Regex("\"" + keyToRead + "\"\\s+\"([^\"]*)\""); + Match match = regex.Match(fileContents); + + if (match.Success) + { + return match.Groups[1].Value; + } + else + { + return "0"; + } + } + + + private void MainWindow_Load(object sender, EventArgs e) + { + if (!File.Exists("settings.ini") || !Directory.Exists("Language")) + { + MessageBox.Show("Important Data is missing! Please redownload this program.", "Super Steam Packer", MessageBoxButtons.OK, MessageBoxIcon.Stop); + Application.Exit(); + } + + if (File.Exists("userdata.ini")) + { + var userdataini = new Ini("userdata.ini"); + UsernameTextBox.Text=userdataini.Read("username", "userdata"); + PasswordTextBox.Text=userdataini.Read("password", "userdata"); + SaveLoginBtn.Enabled = false; + } + } + + private void AppIDExplain_Click(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + MessageBox.Show(languageini.Read("AppIDInfoMsg1", "SSP") + "\n" + "\n" + languageini.Read("AppIDInfoMsg2", "SSP") + "\n" + "\n" + "https://store.steampowered.com/app//", "AppID", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void OSExplain_Click(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + MessageBox.Show(languageini.Read("OSMsg1", "SSP") + "\n \n" + languageini.Read("OSMsg2", "SSP"), "OS", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void AddBtn_Click(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + string appcheck = ""; + + switch (OSBox.SelectedItem.ToString()) + { + case ("Windows x64"): + appcheck = "win64" + AppIDTxtBox.Text; + break; + case ("Windows x86"): + appcheck = "win32" + AppIDTxtBox.Text; + break; + case ("Linux"): + appcheck = "linux" + AppIDTxtBox.Text; + break; + case ("Mac"): + ; + appcheck = "macos" + AppIDTxtBox.Text; + break; + } + if (!TmpLstBx.Items.Contains(appcheck)) + { + ClearQueueBtn.Enabled = true; + ExportQueueButton.Enabled = true; + + int parsedValue; + bool validappidcheck = int.TryParse(AppIDTxtBox.Text, out parsedValue); + + if (!String.IsNullOrEmpty(AppIDTxtBox.Text) && validappidcheck == true) + { + if (OSBox.SelectedItem.ToString() == "Mac" || OSBox.SelectedItem.ToString() == "Linux") + { + QueueBox.Items.Add("AppID: " + AppIDTxtBox.Text + "\t\t" + "OS: " + OSBox.SelectedItem.ToString() + "\t\t\t" + languageini.Read("Status", "SSP") + ":" + " " + languageini.Read("READY", "SSP")); + } + else + { + QueueBox.Items.Add("AppID: " + AppIDTxtBox.Text + "\t\t" + "OS: " + OSBox.SelectedItem.ToString() + "\t\t" + languageini.Read("Status", "SSP") + ":" + " " + languageini.Read("READY", "SSP")); + } + switch (OSBox.SelectedItem.ToString()) + { + case ("Windows x64"): + TmpLstBx.Items.Add("win64" + AppIDTxtBox.Text); + break; + case ("Windows x86"): + TmpLstBx.Items.Add("win32" + AppIDTxtBox.Text); + break; + case ("Linux"): + TmpLstBx.Items.Add("linux" + AppIDTxtBox.Text); + break; + case ("Mac"): + ; + TmpLstBx.Items.Add("macos" + AppIDTxtBox.Text); + break; + } + AppIDTxtBox.Text=""; + StartBtn.Enabled = true; + } + else + { + MessageBox.Show(languageini.Read("AppIDWarning", "SSP"), languageini.Read("Warning", "SSP"), MessageBoxButtons.OK, MessageBoxIcon.Warning); + AppIDTxtBox.Clear(); + } + } + else + { + MessageBox.Show(languageini.Read("AlreadyAdded", "SSP"), languageini.Read("Warning", "SSP"), MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + private void DelBtn_Click(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + if (QueueBox.SelectedItem != null) + { + int selectedindex = QueueBox.SelectedIndex; + TmpLstBx.SelectedIndex = QueueBox.SelectedIndex; + QueueBox.Items.Remove(QueueBox.SelectedItem); + TmpLstBx.Items.Remove(TmpLstBx.SelectedItem); + + if (QueueBox.Items.Count == 0) + { + MoveUpBtn.Enabled = false; + MoveDownBtn.Enabled = false; + DelBtn.Enabled = false; + StartBtn.Enabled = false; + ClearQueueBtn.Enabled = false; + ExportQueueButton.Enabled = false; + } + else + { + try + { + QueueBox.SelectedIndex = selectedindex; + } + catch + { + QueueBox.SelectedIndex = selectedindex-1; + } + } + } + else + { + MessageBox.Show(languageini.Read("pleaseselectwarning", "SSP"), languageini.Read("information", "SSP"), MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void SaveLoginBtn_Click(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + if (!String.IsNullOrEmpty(UsernameTextBox.Text)) + { + if (settingsini.Read("loginwarningaccepted", "SSP") == "true") + { + File.WriteAllText("userdata.ini", "[userdata]\nusername=\npassword="); + var userini = new Ini("userdata.ini"); + userini.Write("username", UsernameTextBox.Text, "userdata"); + userini.Write("password", PasswordTextBox.Text, "userdata"); + SaveLoginBtn.Enabled = false; + UsernameTextBox.Enabled = false; + PasswordTextBox.Enabled = false; + settingsini.Write("loginwarningaccepted", "true", "SSP"); + } + else + { + DialogResult result = MessageBox.Show(languageini.Read("LoginSaveWarning1", "SSP") + "\n\n" + languageini.Read("LoginSaveWarning2", "SSP"), languageini.Read("Warning", "SSP"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + if (result == DialogResult.OK) + { + File.WriteAllText("userdata.ini", "[userdata]\nusername=\npassword="); + var userini = new Ini("userdata.ini"); + userini.Write("username", UsernameTextBox.Text, "userdata"); + userini.Write("password", PasswordTextBox.Text, "userdata"); + SaveLoginBtn.Enabled = false; + UsernameTextBox.Enabled = false; + PasswordTextBox.Enabled = false; + settingsini.Write("loginwarningaccepted", "true", "SSP"); + settingsini.Write("userdatasaved", "true", "SSP"); + } + } + } + else + { + MessageBox.Show(languageini.Read("loginwarning", "SSP"), languageini.Read("Warning", "SSP"), MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + + } + + private async void StartBtn_Click(object sender, EventArgs e) + { + AppIDTxtBox.Enabled = false; + OSBox.Enabled = false; + if (Directory.Exists("Jobs")) + { + Directory.Delete("Jobs", true); + } + if (Directory.Exists("Temp")) + { + Directory.Delete("Temp", true); + } + if (Directory.Exists("SteamCMD\\steamapps")) + { + Directory.Delete("SteamCMD\\steamapps", true); + } + if (Directory.Exists("SteamCMD\\depotcache")) + { + Directory.Delete("SteamCMD\\depotcache", true); + } + + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + bool anonymousloginconfirmation = false; + + if (String.IsNullOrEmpty(UsernameTextBox.Text)) + { + UsernameTextBox.Text = "anonymous"; + } + if (UsernameTextBox.Text == "anonymous") + { + DialogResult result = MessageBox.Show(languageini.Read("anonymousconfirmation", "SSP"), languageini.Read("Warning", "SSP"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + if (result == DialogResult.OK) + { + anonymousloginconfirmation = true; + } + } + + if ((!String.IsNullOrEmpty(UsernameTextBox.Text) && !String.IsNullOrEmpty(PasswordTextBox.Text)) || anonymousloginconfirmation == true) + { + if (!File.Exists("SteamCMD\\steamcmd.exe")) + { + var client = new WebClient(); + client.DownloadFile("https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip", "download.tmp"); + ZipFile.ExtractToDirectory("download.tmp", "SteamCMD"); + File.Delete("download.tmp"); + + Process loadsteam1 = new Process(); + loadsteam1.StartInfo.FileName = "SteamCMD\\steamcmd.exe"; + loadsteam1.StartInfo.Arguments = "+quit"; + loadsteam1.Start(); + loadsteam1.WaitForExit(); + } + Directory.CreateDirectory("Jobs"); + for (int i = 0; i < TmpLstBx.Items.Count; i++) + { + TmpLstBx.SelectedIndex = i; + string workinput = TmpLstBx.SelectedItem.ToString(); + string appid = workinput.Substring(5); + string os = ""; + switch (workinput.Substring(0, 5)) + { + case "win64": + os = "\n@sSteamCmdForcePlatformType windows\n@sSteamCmdForcePlatformBitness 64"; + break; + case "win32": + os = "\n@sSteamCmdForcePlatformType windows\n@sSteamCmdForcePlatformBitness 32"; + break; + case "macos": + case "linux": + os = "\n@sSteamCmdForcePlatformType " + workinput.Substring(0, 5); + break; + } + if (i == 0) + { + File.WriteAllText("Jobs\\" + i + "_" + appid + "_" + workinput.Substring(0, 5) + ".JOB", "login " + UsernameTextBox.Text + " " + PasswordTextBox.Text + os + "\napp_update " + appid +" validate\nquit"); + } + else + { + File.WriteAllText("Jobs\\" + i + "_" + appid + "_" + workinput.Substring(0, 5) + ".JOB", "login " + UsernameTextBox.Text + os + "\napp_update " + appid +" validate\nquit"); + } + + } + string[] files = Directory.GetFiles("Jobs", "*.JOB"); + + foreach (string file in files) + { + TmpLstBx.SelectedIndex = int.Parse(file.Substring(5, 1)); + string AppID = TmpLstBx.SelectedItem.ToString().Substring(5); + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("READY", "SSP"), languageini.Read("GETINFO", "SSP")); + var steamGameData = await GetSteamGameDataAsync(AppID); + string GameNameEarly = ""; + string OS = ""; + string BuildNoEarly = ""; + string BuildTime = ""; + string[] parts = file.Split('_'); + if (parts.Length > 2) + { + string outputString = parts[2].Substring(0, Math.Min(5, parts[2].Length)); + switch (outputString) + { + case "win64": + OS = "Win64"; + break; + case "win32": + OS = "Win32"; + break; + case "macos": + OS = "Mac"; + break; + case "linux": + OS = "Linux"; + break; + } + } + if (steamGameData != null) + { + JToken buildid = steamGameData["data"][AppID]["depots"]["branches"]["public"]["buildid"]; + JToken buildtime = steamGameData["data"][AppID]["depots"]["branches"]["public"]["timeupdated"]; + JToken gamename = steamGameData["data"][AppID]["common"]["name"]; + + DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(buildtime.Value()); + BuildTime = dateTime.ToString("MMMM d, yyyy - HH:mm:ss UTC"); + + GameNameEarly = steamGameData["data"][AppID]["common"]["name"].Value(); + GameNameEarly = GameNameEarly.Replace(" ", "_"); + BuildNoEarly = buildid.Value(); + } + else + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("GETINFO", "SSP"), languageini.Read("UNABLETOREACH", "SSP")); + continue; + } + try + { + string[] filesearly = Directory.GetFiles("Completed\\", GameNameEarly+".Build."+BuildNoEarly+"."+OS + ".*"); + + if (filesearly.Length != 0) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("GETINFO", "SSP"), languageini.Read("SKIPPED", "SSP")); + continue; + } + } + catch + { + } + + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("GETINFO", "SSP"), languageini.Read("DOWNLOADING", "SSP")); + Directory.SetCurrentDirectory("SteamCMD"); + if (Directory.Exists("Logs")) + { + Directory.Delete("Logs", true); + } + Process SteamCMD = new Process(); + SteamCMD.StartInfo.FileName = "steamcmd.exe"; + SteamCMD.StartInfo.Arguments = "+runscript" + " ..\\" + file; + SteamCMD.Start(); + SteamCMD.WaitForExit(); + + bool failedsubscription = false; + bool ratelimited = false; + bool invalidpassword = false; + bool hascode = false; + + + if (File.Exists("Logs\\content_log.txt")) + { + failedsubscription = File.ReadAllText("Logs\\content_log.txt").Contains("No subscription") ? true : false; + hascode = File.ReadAllText("Logs\\content_log.txt").Contains("apps from install folder") ? true : false; + } + if (File.Exists("Logs\\connection_log.txt")) + { + ratelimited = File.ReadAllText("Logs\\connection_log.txt").Contains("Rate Limit Exceeded") ? true : false; + invalidpassword = File.ReadAllText("Logs\\connection_log.txt").Contains("Invalid Password") ? true : false; + } + + if (SteamCMD.ExitCode != 0 || ratelimited || failedsubscription || !hascode || invalidpassword) + { + if (Directory.Exists("steamapps")) + { + Directory.Delete("steamapps", true); + } + if (Directory.Exists("depotcache")) + { + Directory.Delete("depotcache", true); + } + + if (ratelimited && !failedsubscription) + { + DialogResult ratelimitask = MessageBox.Show(languageini.Read("RateLimitWarn", "SSP"), languageini.Read("WARNING", "SSP"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + if (ratelimitask == DialogResult.OK) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("DOWNLOADING", "SSP"), languageini.Read("RATELIMITED", "SSP")); + Directory.SetCurrentDirectory(".."); + continue; + } + else + { + for (int ratelimititems = int.Parse(file.Substring(5, 1)); ratelimititems < QueueBox.Items.Count; ratelimititems++) + { + QueueBox.Items[ratelimititems] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("DOWNLOADING", "SSP"), languageini.Read("RATELIMITED", "SSP")); + QueueBox.Items[ratelimititems] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("READY", "SSP"), languageini.Read("RATELIMITED", "SSP")); + } + if (Directory.Exists("steamapps")) + { + Directory.Delete("steamapps", true); + } + if (Directory.Exists("depotcache")) + { + Directory.Delete("depotcache", true); + } + if (Directory.Exists("logs")) + { + Directory.Delete("logs", true); + } + Directory.SetCurrentDirectory(".."); + if (Directory.Exists("Temp")) + { + Directory.Delete("Temp", true); + } + if (Directory.Exists("Jobs")) + { + Directory.Delete("Jobs", true); + } + break; + } + } + else + { + if (!hascode || invalidpassword) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("DOWNLOADING", "SSP"), languageini.Read("BADLOGIN", "SSP")); + } + else + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("DOWNLOADING", "SSP"), languageini.Read("FAIL", "SSP")); + } + Directory.SetCurrentDirectory(".."); + continue; + } + } + + Directory.SetCurrentDirectory(".."); + if (!Directory.Exists("Temp")) + { + Directory.CreateDirectory("Temp"); + } + DirectoryInfo depotcachedir = new DirectoryInfo("SteamCMD\\depotcache"); + depotcachedir.MoveTo("Temp\\depotcache"); + DirectoryInfo steamappsdir = new DirectoryInfo("SteamCMD\\steamapps"); + steamappsdir.MoveTo("Temp\\steamapps"); + if (File.Exists("Temp\\steamapps\\libraryfolders.vdf")) + { + File.Delete("Temp\\steamapps\\libraryfolders.vdf"); + } + if (Directory.Exists("Temp\\steamapps\\downloading")) + { + Directory.Delete("Temp\\steamapps\\downloading", true); + } + if (Directory.Exists("Temp\\steamapps\\temp")) + { + Directory.Delete("Temp\\steamapps\\temp", true); + } + string[] acffiles = Directory.GetFiles("Temp\\steamapps", "*.acf"); + foreach (string acffile in acffiles) + { + EditVDF(acffile, "LastOwner", "0"); + EditVDF(acffile, "LauncherPath", "0"); + } + + + string GameName = ReadVDF("Temp\\steamapps\\appmanifest_" + AppID + ".acf", "name"); + GameName = GameName.Replace(" ", "_"); + string BuildNo = ReadVDF("Temp\\steamapps\\appmanifest_" + AppID + ".acf", "buildid"); + Directory.CreateDirectory("Completed"); + Directory.SetCurrentDirectory("Temp"); + if (Directory.Exists("steamapps\\workshop")) + { + Directory.Delete("steamapps\\workshop"); + } + + List DepotManifestList = new List(); + + foreach (string ACFPath in Directory.GetFiles("steamapps", "*.acf")) + { + JObject json = JObject.Parse(JsonConvert.SerializeObject(KeyValue.LoadFromString(Regex.Replace(File.ReadAllText(ACFPath), "//.*\n", "\n")))); + JObject installedDepots = (JObject)json["Children"].FirstOrDefault(c => c["Name"].Value() == "InstalledDepots"); + + if (installedDepots != null) + { + JArray depots = (JArray)installedDepots["Children"]; + foreach (JObject depot in depots) + { + string depotid = depot["Name"].Value(); + string manifest = depot["Children"].FirstOrDefault(c => c["Name"].Value() == "manifest")?["Value"].Value(); + + DepotManifestList.Add(depotid + " - DepotName [Manifest " + manifest + "]"); + } + } + } + + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("DOWNLOADING", "SSP"), languageini.Read("COMPRESSING", "SSP")); + + Process Compress = new Process(); + if (settingsini.Read("compressor", "SSP") == "7z") + { + Compress.StartInfo.FileName = "..\\Compressor\\7z.exe"; + if (String.IsNullOrEmpty(settingsini.Read("customcompressoption", "SSP"))) + { + if (File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".7z") || File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".7z.001")) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("COMPRESSING", "SSP"), languageini.Read("SKIPPED", "SSP")); + Directory.SetCurrentDirectory(".."); + Directory.Delete("Temp", true); + continue; + } + else + { + Compress.StartInfo.Arguments = "a -mx9 -sdel -pcs.rin.ru -v5g ..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".7z *"; + } + + } + else + { + if (File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".7z") || File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".7z.001")) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("COMPRESSING", "SSP"), languageini.Read("SKIPPED", "SSP")); + Directory.SetCurrentDirectory(".."); + Directory.Delete("Temp", true); + continue; + } + else + { + Compress.StartInfo.Arguments = "a " + settingsini.Read("customcompressoption", "SSP") + " ..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".7z *"; + } + } + } + else + { + Compress.StartInfo.FileName = "..\\Compressor\\rar.exe"; + if (String.IsNullOrEmpty(settingsini.Read("customcompressoption", "SSP"))) + { + if (File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".rar") || File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".part1.rar")) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("COMPRESSING", "SSP"), languageini.Read("SKIPPED", "SSP")); + Directory.SetCurrentDirectory(".."); + Directory.Delete("Temp", true); + continue; + } + else + { + Compress.StartInfo.Arguments = "a -df -hpcs.rin.ru -htc -v5000000k -r ..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".rar *"; + } + } + else + { + if (File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".rar") || File.Exists("..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".part1.rar")) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("COMPRESSING", "SSP"), languageini.Read("SKIPPED", "SSP")); + Directory.SetCurrentDirectory(".."); + Directory.Delete("Temp", true); + continue; + } + else + { + Compress.StartInfo.Arguments = "a " + settingsini.Read("customcompressoption", "SSP") + " ..\\Completed\\" + GameName+".Build."+BuildNo+"."+OS + ".rar *"; + } + } + } + Compress.Start(); + Compress.WaitForExit(); + + if (Compress.ExitCode!=0) + { + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("COMPRESSING", "SSP"), languageini.Read("FAIL", "SSP")); + Directory.SetCurrentDirectory(".."); + DirectoryInfo directoryInfo = new DirectoryInfo("Completed"); + foreach (FileInfo fileToDelete in directoryInfo.GetFiles(GameName+".Build."+BuildNo+"."+OS+".*")) + { + fileToDelete.Delete(); + } + continue; + } + + if (!File.Exists("..\\Completed\\"+ GameName+".Build."+BuildNo+"."+OS + ".7z.002") && settingsini.Read("compressor", "SSP") == "7z") + { + if (File.Exists("..\\Completed\\"+ GameName+".Build."+BuildNo+"."+OS + ".7z.001")) + { + File.Move("..\\Completed\\"+ GameName+".Build."+BuildNo+"."+OS + ".7z.001", "..\\Completed\\"+ GameName+".Build."+BuildNo+"."+OS + ".7z"); + } + + } + Directory.SetCurrentDirectory(".."); + Directory.Delete("Temp", true); + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("COMPRESSING", "SSP"), languageini.Read("WRITINGINFO", "SSP")); + + /// info writer /// + using (StreamWriter RINfo = new StreamWriter("Completed\\[CS.RIN.RU Info] " + GameName+".Build."+BuildNo+"."+OS+".txt")) + { + GameName.Replace("_", " "); + RINfo.WriteLine("[url=][color=white][b]" + GameName + " (Clean Steam Files)[/b][/color][/url]"); + RINfo.WriteLine("[size=85][color=white][b]Version:[/b] [i]" + BuildTime + " [Build " + BuildNo + "][/i][/color][/size]"); + RINfo.WriteLine(); + RINfo.WriteLine("[spoiler=\"[color=white]Depots & Manifests[/color]\"][code=text]"); + foreach (string item in DepotManifestList) + { + RINfo.WriteLine(item); + } + RINfo.WriteLine("[/code][/spoiler][color=white][b]Uploaded version:[/b] [i]" + BuildTime + " [Build " + BuildNo + "][/i][/color]"); + } + + QueueBox.Items[int.Parse(file.Substring(5, 1))] = QueueBox.Items[int.Parse(file.Substring(5, 1))].ToString().Replace(languageini.Read("WRITINGINFO", "SSP"), languageini.Read("COMPLETE", "SSP")); + } + if (Directory.Exists("Jobs")) + { + Directory.Delete("Jobs", true); + } + MessageBox.Show(languageini.Read("jobscomplete", "SSP") + "\n\n" + languageini.Read("jobscomplete2", "SSP"), languageini.Read("information", "SSP"), MessageBoxButtons.OK, MessageBoxIcon.Information); + StartBtn.Enabled=false; + AddBtn.Enabled=false; + DelBtn.Enabled=false; + ClearQueueBtn.PerformClick(); + } + else + { + MessageBox.Show(languageini.Read("loginwarning", "SSP"), languageini.Read("Warning", "SSP"), MessageBoxButtons.OK, MessageBoxIcon.Warning); + PasswordTextBox.Enabled = true; + UsernameTextBox.Enabled = true; + } + } + + private void MoreSettingsBtn_Click(object sender, EventArgs e) + { + MoreSettingsForm settingsMenu = new MoreSettingsForm(); + settingsMenu.ShowDialog(); + this.Refresh(); + if (!File.Exists("userdata.ini")) + { + SaveLoginBtn.Enabled=true; + UsernameTextBox.Enabled=true; + PasswordTextBox.Enabled=true; + } + } + + private void UsernameTextBox_TextChanged(object sender, EventArgs e) + { + if (UsernameTextBox.Text == "anonymous") + { + PasswordTextBox.Enabled = false; + } + else + { + PasswordTextBox.Enabled = true; + } + } + + private void ClearQueueBtn_Click(object sender, EventArgs e) + { + MoveUpBtn.Enabled = false; + MoveDownBtn.Enabled = false; + ClearQueueBtn.Enabled = false; + StartBtn.Enabled = false; + DelBtn.Enabled = false; + ExportQueueButton.Enabled = false; + TmpLstBx.Items.Clear(); + QueueBox.Items.Clear(); + AppIDTxtBox.Enabled = true; + OSBox.Enabled = true; + + } + + private void csrinbtn_Click(object sender, EventArgs e) + { + Process.Start("https://cs.rin.ru/forum"); + } + + private void GithubBtn_Click(object sender, EventArgs e) + { + Process.Start("https://github.com/Masquerade64"); + } + + private void QueueBox_SelectedIndexChanged(object sender, EventArgs e) + { + DelBtn.Enabled=true; + if (QueueBox.Items.Count != 1) + { + if (QueueBox.SelectedIndex == 0) + { + MoveUpBtn.Enabled = false; + } + else + { + MoveUpBtn.Enabled = true; + } + if (QueueBox.SelectedIndex == QueueBox.Items.Count-1) + { + MoveDownBtn.Enabled = false; + } + else + { + MoveDownBtn.Enabled = true; + } + } + + } + + private void MoveUpBtn_Click(object sender, EventArgs e) + { + object selecteditem = QueueBox.SelectedItem; + int newindex = QueueBox.SelectedIndex - 1; + + QueueBox.Items.Remove(selecteditem); + TmpLstBx.Items.Remove(selecteditem); + QueueBox.Items.Insert(newindex, selecteditem); + TmpLstBx.Items.Insert(newindex, selecteditem); + QueueBox.SetSelected(newindex, true); + } + + private void MoveDownBtn_Click(object sender, EventArgs e) + { + object selecteditem = QueueBox.SelectedItem; + int newindex = QueueBox.SelectedIndex + 1; + + QueueBox.Items.Remove(selecteditem); + TmpLstBx.Items.Remove(selecteditem); + QueueBox.Items.Insert(newindex, selecteditem); + TmpLstBx.Items.Insert(newindex, selecteditem); + QueueBox.SetSelected(newindex, true); + } + + private void ExportQueueButton_Click(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + SaveFileDialog savequeue = new SaveFileDialog(); + savequeue.Title = languageini.Read("Export", "SSP"); + savequeue.Filter = "SSP Queue Files (*.SSPQ)|*.SSPQ"; + DialogResult result = savequeue.ShowDialog(); + if (result == DialogResult.OK) + { + string filePath = savequeue.FileName; + using (StreamWriter writer = new StreamWriter(filePath)) + { + foreach (var item in TmpLstBx.Items) + { + writer.WriteLine(item.ToString()); + } + } + } + } + + private void ImportQueueButton_Click(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + OpenFileDialog openqueue = new OpenFileDialog(); + openqueue.Title = languageini.Read("Import", "SSP"); + openqueue.Filter = "SSP Queue Files (*.SSPQ)|*.SSPQ"; + DialogResult result = openqueue.ShowDialog(); + if (result == DialogResult.OK) + { + QueueBox.Items.Clear(); + TmpLstBx.Items.Clear(); + + string[] lines = File.ReadAllLines(openqueue.FileName); + + foreach (string line in lines) + { + TmpLstBx.Items.Add(line); + string os = line.Substring(0, 5); + switch (os) + { + case "win64": + os = "Windows x64"; + break; + case "win32": + os = "Windows x86"; + break; + case "macos": + os = "Mac"; + break; + case "linux": + os = "Linux"; + break; + } + if (os == "Mac" || os == "Linux") + { + QueueBox.Items.Add("AppID: " + line.Substring(5) + "\t\t" + "OS: " + os + "\t\t\t" + languageini.Read("Status", "SSP") + ":" + " " + languageini.Read("READY", "SSP")); + } + else + { + QueueBox.Items.Add("AppID: " + line.Substring(5) + "\t\t" + "OS: " + os + "\t\t" + languageini.Read("Status", "SSP") + ":" + " " + languageini.Read("READY", "SSP")); + } + + DelBtn.Enabled = true; + ClearQueueBtn.Enabled = true; + StartBtn.Enabled = true; + ExportQueueButton.Enabled = true; + } + } + } + + private void AppIDTxtBox_TextChanged(object sender, EventArgs e) + { + AddBtn.Enabled = true; + OSBox.Enabled = true; + } + + static async Task GetSteamGameDataAsync(string appId) + { + using (var httpClient = new HttpClient()) + { + var url = $"https://api.steamcmd.net/v1/info/{appId}"; + var response = await httpClient.GetAsync(url); + response.EnsureSuccessStatusCode(); + var jsonString = await response.Content.ReadAsStringAsync(); + return JObject.Parse(jsonString); + } + } + } +} \ No newline at end of file diff --git a/MainForm.resx b/MainForm.resx new file mode 100644 index 0000000..34c9dec --- /dev/null +++ b/MainForm.resx @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAMGAAAAEAGACoHAAAFgAAACgAAAAwAAAAYAAAAAEAGAAAAAAAgBwAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAASExMTFBQUFBQTFBMUFBQTFBMUFBQTExMTFBQTFBMTFBMUFBQTExMUFBQT + ExMUFBQTFBMTFBMUFBQTExMUFBQTExMUFBQTExMTFBMTFBMTFBMUFBQTExMUFBQTExMTFBQTFBMTFBMU + FBQTFBMUFBQSEhIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATFRUVFhUWFhYWFhYVFhYWFxYVFhYWFxYW + FhYWFhYVFhYVFhYWFhYVFhYWFxYVFhYWFxYVFhYWFhYWFhYVFhYWFxYVFhYWFxYWFhYWFhYVFhYVFhYW + FhYVFhYWFxYVFhYWFhYVFhYWFhYWFhYVFhYWFxYVFhYWFxYVFhYUFRUAAAAAAAAAAAAAAAAAAAAUFRYW + FhYWFxcWFhYWFxcWFxcWFhcWFxcWFhYWFxcWFhcWFxcWFxcWFhcWFxcWFhcWFxcWFhYWFxcWFhYWFxcW + FxcWFhcWFxcWFhYWFxcWFhcWFxcWFxcWFhcWFxcWFhcWFxcWFhYWFxcWFhYWFxcWFxcWFhcWFxcWFhcW + FxcWFhYVFhYAAAAAAAAAAAAVFhYWFxcXFxgWFxcXFx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Z2kop6lop6hn5t6e3g5PD0kJyglKCkjJyglKCokJykkKCkkJykjJygkKCkjJigkKCkjJygkJyki + JSeUlJKcmpicm5icm5mdnJmenJqenJqdnJqenJuenJufnZ2ioaGYmpp2eXtLT1FgZGaLjY6dnp+jo6Sj + oqKjoaCko6KkoqGko6Klo6Klo6Glo6GmpKKmpKGmo6GnpaKopqKop6OVlpNnaWhYW1pIS0swMzQmKSsl + KCkmKSslKCokKCklKSokJyklKSskKCkkKCqYmZegn52gn52hoJ6ioZ+hoJ+hoJ+hoJ+joqGjo6OOkZFj + aGk6PkAnKy0nKy0mKistMTM7P0FITU+LjY6npqWopqanpqaop6apqKepqKapqKaqqaeqqaaqqKarqaes + q6esq6iurKmvrquurqqrq6ibnJpzdnU7P0AmKSsmKy0mKislKSsmKiwlKSomKiwkJymbnJukpKKkpKKl + pKKkpKOlpKOmpqafoaF/g4RQVFYwNDYnKy0nKy0oLC4nKiwoLC8nKy0oLC8oLC5JTlCio6Ssq6usrKyt + rKyurayvra2vr62wr62vrqyvrqywrqywrqywr62ysa6ysa6ysq+0tLG2trS6urimp6ZZXF0oLC4oLC4n + Ky0mKiwnKy0mKiwmKy2foaCoqKaoqKepqaipqqqXmZlscHJBRUgqLjApLC8oKy4pLC8oLC8nKy4oLC8n + Ki0pLC8oKy4qLTArLjFtcXOvr7CysbKzsrKzs7O0s7O0tLO0s7KysrGysbCysrC1tbOytLKlp6eeoaCn + qai3ube8vbu9vbu/wL63uLZjZ2gpLC8pLC8oKy4nKi0oLC8mKSuipaSurq6oqamKjY5aXmA1OTwpLTAp + LC8qLjEoLC8pLTAoKy4pLTArLjEtMDMxNTgzNzk4Oz46PUA9QENGSUyanZ+8vL28vb69vb69vb69vb6+ + vb29vb28vby3uLeKjo9SVlg5PT8wNDY0ODtLT1GHi4y6vLvCw8HFxsS5urlSVlcoLC4pLTApLC8oKy4o + LC+Rlpd3e3xITU8uMjQqLjEqLjEqLjEqLjEpLTAsMDMuMTQ1ODs5PT8+Qk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3hrc3lob3RqcXdpb3VpcHVpcHVob3NqcXZob3RqcXZob3NpcHZob3RpcHVpcHZob3NqcXZo + bnNqcXZpb3RpcHVpcHVob3RqcXZob3NqcXZob3RpcHVob3RpcHVpcXZobnNqcXZobnNqcXZqcXdtdXoA + AAAAAAAAAAAAAAAAAAD4AAAAAB///+AAAAAAB///wAAAAAAD//+AAAAAAAH//4AAAAAAAf//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//4AA + AAAAAf//gAAAAAAB///AAAAAAAP//+AAAAAAB///+AAAAAAf//8= + + + \ No newline at end of file diff --git a/MoreSettingsForm.Designer.cs b/MoreSettingsForm.Designer.cs new file mode 100644 index 0000000..6822b22 --- /dev/null +++ b/MoreSettingsForm.Designer.cs @@ -0,0 +1,146 @@ +namespace SuperSteamPacker +{ + partial class MoreSettingsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MoreSettingsForm)); + this.DelSavedLoginBtn = new System.Windows.Forms.Button(); + this.CompressorLabel = new System.Windows.Forms.Label(); + this.LangLabel = new System.Windows.Forms.Label(); + this.LangChoiceBox = new System.Windows.Forms.ComboBox(); + this.CompressorChoiceBox = new System.Windows.Forms.ComboBox(); + this.CustomCompressorOptionsCheckBox = new System.Windows.Forms.CheckBox(); + this.CustomCompressorOptionsTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // DelSavedLoginBtn + // + this.DelSavedLoginBtn.Location = new System.Drawing.Point(12, 157); + this.DelSavedLoginBtn.Name = "DelSavedLoginBtn"; + this.DelSavedLoginBtn.Size = new System.Drawing.Size(279, 23); + this.DelSavedLoginBtn.TabIndex = 0; + this.DelSavedLoginBtn.Text = "DelSavedLoginBtn"; + this.DelSavedLoginBtn.UseVisualStyleBackColor = true; + this.DelSavedLoginBtn.Click += new System.EventHandler(this.DelSavedLoginBtn_Click); + // + // CompressorLabel + // + this.CompressorLabel.AutoSize = true; + this.CompressorLabel.Location = new System.Drawing.Point(9, 59); + this.CompressorLabel.Name = "CompressorLabel"; + this.CompressorLabel.Size = new System.Drawing.Size(88, 13); + this.CompressorLabel.TabIndex = 1; + this.CompressorLabel.Text = "CompressorLabel"; + // + // LangLabel + // + this.LangLabel.AutoSize = true; + this.LangLabel.Location = new System.Drawing.Point(9, 9); + this.LangLabel.Name = "LangLabel"; + this.LangLabel.Size = new System.Drawing.Size(57, 13); + this.LangLabel.TabIndex = 2; + this.LangLabel.Text = "LangLabel"; + // + // LangChoiceBox + // + this.LangChoiceBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.LangChoiceBox.FormattingEnabled = true; + this.LangChoiceBox.Location = new System.Drawing.Point(13, 30); + this.LangChoiceBox.Name = "LangChoiceBox"; + this.LangChoiceBox.Size = new System.Drawing.Size(278, 21); + this.LangChoiceBox.TabIndex = 3; + this.LangChoiceBox.SelectedIndexChanged += new System.EventHandler(this.LangChoiceBox_SelectedIndexChanged); + // + // CompressorChoiceBox + // + this.CompressorChoiceBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CompressorChoiceBox.FormattingEnabled = true; + this.CompressorChoiceBox.Items.AddRange(new object[] { + "7-Zip", + "WinRAR"}); + this.CompressorChoiceBox.Location = new System.Drawing.Point(12, 79); + this.CompressorChoiceBox.Name = "CompressorChoiceBox"; + this.CompressorChoiceBox.Size = new System.Drawing.Size(279, 21); + this.CompressorChoiceBox.TabIndex = 4; + this.CompressorChoiceBox.SelectedIndexChanged += new System.EventHandler(this.CompressorChoiceBox_SelectedIndexChanged); + // + // CustomCompressorOptionsCheckBox + // + this.CustomCompressorOptionsCheckBox.AutoSize = true; + this.CustomCompressorOptionsCheckBox.Location = new System.Drawing.Point(12, 107); + this.CustomCompressorOptionsCheckBox.Name = "CustomCompressorOptionsCheckBox"; + this.CustomCompressorOptionsCheckBox.Size = new System.Drawing.Size(201, 17); + this.CustomCompressorOptionsCheckBox.TabIndex = 5; + this.CustomCompressorOptionsCheckBox.Text = "CustomCompressorOptionsCheckBox"; + this.CustomCompressorOptionsCheckBox.UseVisualStyleBackColor = true; + this.CustomCompressorOptionsCheckBox.CheckedChanged += new System.EventHandler(this.CustomCompressorOptionsCheckBox_CheckedChanged); + // + // CustomCompressorOptionsTextBox + // + this.CustomCompressorOptionsTextBox.Location = new System.Drawing.Point(12, 131); + this.CustomCompressorOptionsTextBox.Name = "CustomCompressorOptionsTextBox"; + this.CustomCompressorOptionsTextBox.Size = new System.Drawing.Size(279, 20); + this.CustomCompressorOptionsTextBox.TabIndex = 6; + this.CustomCompressorOptionsTextBox.WordWrap = false; + this.CustomCompressorOptionsTextBox.TextChanged += new System.EventHandler(this.CustomCompressorOptionsTextBox_TextChanged); + // + // MoreSettingsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Window; + this.ClientSize = new System.Drawing.Size(303, 191); + this.Controls.Add(this.CustomCompressorOptionsTextBox); + this.Controls.Add(this.CustomCompressorOptionsCheckBox); + this.Controls.Add(this.CompressorChoiceBox); + this.Controls.Add(this.LangChoiceBox); + this.Controls.Add(this.LangLabel); + this.Controls.Add(this.CompressorLabel); + this.Controls.Add(this.DelSavedLoginBtn); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "MoreSettingsForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "MoreSettingsForm"; + this.Load += new System.EventHandler(this.MoreSettingsForm_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button DelSavedLoginBtn; + private System.Windows.Forms.Label CompressorLabel; + private System.Windows.Forms.Label LangLabel; + private System.Windows.Forms.ComboBox LangChoiceBox; + private System.Windows.Forms.ComboBox CompressorChoiceBox; + private System.Windows.Forms.CheckBox CustomCompressorOptionsCheckBox; + private System.Windows.Forms.TextBox CustomCompressorOptionsTextBox; + } +} \ No newline at end of file diff --git a/MoreSettingsForm.cs b/MoreSettingsForm.cs new file mode 100644 index 0000000..0bdf766 --- /dev/null +++ b/MoreSettingsForm.cs @@ -0,0 +1,129 @@ +using System; +using System.IO; +using System.Windows.Forms; + +namespace SuperSteamPacker +{ + public partial class MoreSettingsForm : Form + { + public MoreSettingsForm() + { + InitializeComponent(); + + var settingsini = new Ini("Settings.ini"); + + string[] langfiles = Directory.GetFiles("Language", "*.ini"); + foreach (string langfile in langfiles) + { + if (langfile.Substring(9, langfile.Length-(9+4)).ToLower() != "global") + { + LangChoiceBox.Items.Add(langfile.Substring(9, langfile.Length-(9+4))); + } + } + LangChoiceBox.SelectedItem = settingsini.Read("language", "SSP"); + + switch (settingsini.Read("compressor", "SSP")) + { + case "7z": + CompressorChoiceBox.SelectedIndex = 0; + break; + case "RAR": + CompressorChoiceBox.SelectedIndex = 1; + break; + } + + if (!File.Exists("userdata.ini")) + { + DelSavedLoginBtn.Enabled = false; + } + + if (String.IsNullOrEmpty(settingsini.Read("customcompressoption", "SSP"))) + { + CustomCompressorOptionsTextBox.Enabled = false; + CustomCompressorOptionsCheckBox.Checked = false; + } + else + { + CustomCompressorOptionsTextBox.Text = settingsini.Read("customcompressoption", "SSP"); + CustomCompressorOptionsCheckBox.Checked = true; + } + + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + this.Text = languageini.Read("MoreSettings", "SSP"); + LangLabel.Text = languageini.Read("Language","SSP") + ":"; + CompressorLabel.Text = languageini.Read("Compressor", "SSP") + ":"; + CustomCompressorOptionsCheckBox.Text = languageini.Read("customcompressoroptions", "SSP"); + DelSavedLoginBtn.Text = languageini.Read("DeleteSavedLogin", "SSP"); + } + + private void DelSavedLoginBtn_Click(object sender, EventArgs e) + { + File.Delete("userdata.ini"); + DelSavedLoginBtn.Enabled = false; + } + + private void MoreSettingsForm_Load(object sender, EventArgs e) + { + } + + private void LangChoiceBox_SelectedIndexChanged(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + settingsini.Write("language", LangChoiceBox.SelectedItem.ToString(), "SSP"); + } + + private void CustomCompressorOptionsCheckBox_CheckedChanged(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + var globalini = new Ini("Language\\Global.ini"); + string readlanguage = settingsini.Read("language", "SSP"); + var languageini = new Ini("Language\\" + readlanguage + ".ini"); + + if (CustomCompressorOptionsCheckBox.Checked == true) + { + if (String.IsNullOrEmpty(settingsini.Read("customcompressoption", "SSP"))) + { + DialogResult result = MessageBox.Show(languageini.Read("compressionwarning1", "SSP") + "\n\n" + languageini.Read("compressionwarning2", "SSP"), languageini.Read("Warning", "SSP"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + if (result == DialogResult.OK) + { + CustomCompressorOptionsTextBox.Enabled = true; + } + else + { + CustomCompressorOptionsTextBox.Enabled = false; + CustomCompressorOptionsCheckBox.Checked = false; + } + } + } + else + { + settingsini.Write("customcompressoption", null, "SSP"); + CustomCompressorOptionsTextBox.Enabled = false; + CustomCompressorOptionsTextBox.Text = null; + } + } + + private void CustomCompressorOptionsTextBox_TextChanged(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + settingsini.Write("customcompressoption", CustomCompressorOptionsTextBox.Text, "SSP"); + } + + private void CompressorChoiceBox_SelectedIndexChanged(object sender, EventArgs e) + { + var settingsini = new Ini("Settings.ini"); + switch (CompressorChoiceBox.SelectedIndex) + { + case 0: + settingsini.Write("compressor", "7z", "SSP"); + break; + case 1: + settingsini.Write("compressor", "RAR", "SSP"); + break; + } + + } + } +} diff --git a/MoreSettingsForm.resx b/MoreSettingsForm.resx new file mode 100644 index 0000000..34c9dec --- /dev/null +++ b/MoreSettingsForm.resx @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAMGAAAAEAGACoHAAAFgAAACgAAAAwAAAAYAAAAAEAGAAAAAAAgBwAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAASExMTFBQUFBQTFBMUFBQTFBMUFBQTExMTFBQTFBMTFBMUFBQTExMUFBQT + ExMUFBQTFBMTFBMUFBQTExMUFBQTExMUFBQTExMTFBMTFBMTFBMUFBQTExMUFBQTExMTFBQTFBMTFBMU + FBQTFBMUFBQSEhIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATFRUVFhUWFhYWFhYVFhYWFxYVFhYWFxYW + FhYWFhYVFhYVFhYWFhYVFhYWFxYVFhYWFxYVFh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e + ICEdHyAeICEeICAfISEeICEeICAiJCVDRUWVlJSgn56ioJ+hn56gn56gnp2gnp2fnp2gnpyPj44xMzNU + VlafnpxTVFQfICEeICEeICEdHyAeICEdHyAeICEeICEeHyAeICEdHyAeICEeHyAeICEeICAeHyAeICEe + HyAeICEdHyAeICEcHh4dHyAeISIeISIeICEfISMeISIfIiMeISIpKyxKS0tzdHORj42Zl5abmJebmZib + mZecmZibmZebmJecmZebmJaZl5VNUE82OTmVlJFnaWgeICIgIiMeICEfISIeICEfISIeICEeISIeISIe + ICEfISIeICEfISIeICEeISIeICIeICEeISIeICEfISIeICEeISIfIiMfISIgIyQgIiQfISMhJCUzNjZZ + W1p/fnyRjoyUkY+UkpCVkpCWk5GXlJKXlJKXlJOXlJOXlJKXlJOWk5GXlJJUVlYzNjaQjot+fnszNjYg + IiMgIyQfIiMfIiQeISIfIiMeISIfIiMfIiMeISIfIiQeISIfIiQeISIfIiMfIiMfISIfIiMfISMfIiQd + ICEfIiIhJCUfIiMnKitCRUVqammIhoSSj4yTj42Sj42Tj46TkI+UkY+VkpCVkpCVkpGWk5KXk5KWk5KW + k5GVkpCUkpBDRkdAQkKTkY6Wk5CFhIFJTEsiJSYhJCUgIyQgIyUfIiMgIyUfIiMgIyQgIyQgIiQgIyUf + IiMgIyUgIiQgIyQgIyQgIiQgIyQgIiMgIyQiJSYwMzNUVVR5eXeOjImSj4ySkI2TkI6TkI6TkI+UkY+V + kpCWk5GWk5GWk5KWk5KXlJKXlJKXk5KWkpGYlZR5enopLC1lZmWXlJKYlZKYlZGSkIxmZ2UsLi8iJSYi + JCUiJCYhIyQhJCYhIyQhJCUhJCUhIyUiJCYhIyQiJCYhIyUhJCUhIyUhIyQhJCUgIiNnaGeGhYGSkIyT + kY6TkI2UkY6UkY+VkpCVkpCVkpGWlJKXlJOXlJOXlZSYlZSYlZSZlpSZlpWcmZiYl5Z2eHgzNjhFSEiP + joyZl5Sal5ScmZWcmZWbmJSAgH4/QUEkJigjJScjJichJCUiJSchJCUiJSciJSciJCYiJSchJCUjJSci + JCYiJSciJCYiJCYhJCWOjYuVk4+Vk5CWk5CWlJGXlJKXlZOYlZOYlZOYlpSYlpSZl5WZlpWYlpaZlpaZ + l5abmZmSk5Jsb29AQ0QuMTJRU1OOjYubmZedm5iem5mem5iem5ienJifnJiWlJFbXVwqLS4jJigkJykj + JickJygiJScjJigjJigiJScjJigiJSYjJygjJScjJigjJiciJSaRkY+Yl5SZlpSZlpSamJWamJabmZeb + mZebmZebmZibmZibmZibmZienJyfnp6fnp6enJyBg4NkZmZsbW6FhYScmpmhnp2hn52hn52ioJ2ioJ2i + oJ2joZ2kop6lop6hn5t6e3g5PD0kJyglKCkjJyglKCokJykkKCkkJykjJygkKCkjJigkKCkjJygkJyki + JSeUlJKcmpicm5icm5mdnJmenJqenJqdnJqenJuenJufnZ2ioaGYmpp2eXtLT1FgZGaLjY6dnp+jo6Sj + oqKjoaCko6KkoqGko6Klo6Klo6Glo6GmpKKmpKGmo6GnpaKopqKop6OVlpNnaWhYW1pIS0swMzQmKSsl + KCkmKSslKCokKCklKSokJyklKSskKCkkKCqYmZegn52gn52hoJ6ioZ+hoJ+hoJ+hoJ+joqGjo6OOkZFj + aGk6PkAnKy0nKy0mKistMTM7P0FITU+LjY6npqWopqanpqaop6apqKepqKapqKaqqaeqqaaqqKarqaes + q6esq6iurKmvrquurqqrq6ibnJpzdnU7P0AmKSsmKy0mKislKSsmKiwlKSomKiwkJymbnJukpKKkpKKl + pKKkpKOlpKOmpqafoaF/g4RQVFYwNDYnKy0nKy0oLC4nKiwoLC8nKy0oLC8oLC5JTlCio6Ssq6usrKyt + rKyurayvra2vr62wr62vrqyvrqywrqywrqywr62ysa6ysa6ysq+0tLG2trS6urimp6ZZXF0oLC4oLC4n + Ky0mKiwnKy0mKiwmKy2foaCoqKaoqKepqaipqqqXmZlscHJBRUgqLjApLC8oKy4pLC8oLC8nKy4oLC8n + Ki0pLC8oKy4qLTArLjFtcXOvr7CysbKzsrKz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lpQ + VVpRV1tQVVlRV1tQVVlRV1tQVlpQVlpRVltQVlpRV1xQVVlRV1tQVVlRV1tRVltQVVpRV1tQVVlRV1xQ + VlpRV1tQVlpQVVpRVltTWV1dZGoAAAAAAAAAAAAAAAAAAABlbHJcYmdVW2BRV1tTWV1RV1tSWFxRV1tR + V1tRV1xRVltSWF1QVlpSWFxQVlpSWFxRV1xRVltSWFxQVlpSWF1RVltSWFxRV1tRVltSV1xRVltSWF1Q + VlpSWFxQVlpSV1xSV1xRVltSWF1QVlpSWF1RVltSWF1UWl9cYmdkbHIAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAABsc3hrc3lob3RqcXdpb3VpcHVpcHVob3NqcXZob3RqcXZob3NpcHZob3RpcHVpcHZob3NqcXZo + bnNqcXZpb3RpcHVpcHVob3RqcXZob3NqcXZob3RpcHVob3RpcHVpcXZobnNqcXZobnNqcXZqcXdtdXoA + AAAAAAAAAAAAAAAAAAD4AAAAAB///+AAAAAAB///wAAAAAAD//+AAAAAAAH//4AAAAAAAf//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA + AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA + //8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//4AA + AAAAAf//gAAAAAAB///AAAAAAAP//+AAAAAAB///+AAAAAAf//8= + + + \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..8bfb62e --- /dev/null +++ b/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SuperSteamPacker +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainWindow()); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..70b04bb --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Super Steam Packer")] +[assembly: AssemblyDescription("Super Steam Packer")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Masquerade")] +[assembly: AssemblyProduct("SuperSteamPacker")] +[assembly: AssemblyCopyright("Copyright © Masquerade 2023")] +[assembly: AssemblyTrademark("SuperSteamPacker")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a8c1f190-f299-4027-9c5a-fa65acda5841")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ee9f2be --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SuperSteamPacker.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SuperSteamPacker.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _7z { + get { + object obj = ResourceManager.GetObject("_7z", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] LANGDATA_English { + get { + object obj = ResourceManager.GetObject("LANGDATA_English", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] LANGDATA_Global { + get { + object obj = ResourceManager.GetObject("LANGDATA_Global", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap logo { + get { + object obj = ResourceManager.GetObject("logo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] rar { + get { + object obj = ResourceManager.GetObject("rar", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] Settings { + get { + object obj = ResourceManager.GetObject("Settings", resourceCulture); + return ((byte[])(obj)); + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..d276a1d --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\English.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Global.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\rar.exe;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 + + + ..\Resources\7z.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..0eafc38 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SuperSteamPacker.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Resources/7z.exe b/Resources/7z.exe new file mode 100644 index 0000000..6a34fc6 Binary files /dev/null and b/Resources/7z.exe differ diff --git a/Resources/English.bin b/Resources/English.bin new file mode 100644 index 0000000..ff6c4b6 --- /dev/null +++ b/Resources/English.bin @@ -0,0 +1,54 @@ +# +# Super Steam Packer Language File +# + +[SSP] +by=by +queue=Queue +add=Add to Queue +del=Delete from Queue +ClearQueue=Clear Queue +AppIDInfoMsg1=The AppID for the game you want to download. +AppIDInfoMsg2=Can be found here: +OSMsg1=Operating System version to download. +OSMsg2=Please note not all games are available on more than one OS. Check SteamDB for game specific information! +AppIDWarning=Please enter a valid AppID. +Warning=Warning! +Status=Status +Forum=Forum +READY=READY +DOWNLOADING=DOWNLOADING +COMPRESSING=COMPRESSING +COMPLETE=COMPLETE +FAIL=FAILED +RATELIMITED=RATE LIMITED +BADLOGIN=BAD LOGIN +SKIPPED=SKIPPED [EXISTS] +GETINFO=GETTING INFO +UNABLETOREACH=UNABLE TO REACH API +WRITINGINFO=WRITING INFO +Start=Start +Username=Steam Username: +Password=Steam Password: +AlreadyAdded=Item already added to queue! +SaveLogin=Save Login Details +LoginSaveWarning1=By pressing OK, you understand that your login details will be stored by this program. +LoginSaveWarning2=This data is stored locally and is not sent across the internet! +MoreSettings=More Settings +Information=Information +pleaseselectwarning=Please select an item to remove. +Language=Language +Compressor=Compressor +customcompressoroptions=Use Custom Compression Options: +DeleteSavedLogin=Delete Saved Login Data +jobscomplete=All Jobs Complete! +jobscomplete2=Pressing OK will clear the queue. +compressionwarning1=The default settings will be ideal for most users. +compressionwarning2=Only change this if you know what you are doing! +loginwarning=Please enter valid login details. +anonymousconfirmation=By continuing, you will use an Anonymous login. This severly reduces what you can download from Steam! +MoveUp=Move Item Up +MoveDown=Move Item Down +Import=Import Queue +Export=Export Queue +RateLimitWarn=You are Rate Limited, meaning, Steam has blocked you from logging in. Please choose to continue (not recommended) or try again later. Continue? \ No newline at end of file diff --git a/Resources/Global.bin b/Resources/Global.bin new file mode 100644 index 0000000..c896e47 --- /dev/null +++ b/Resources/Global.bin @@ -0,0 +1,6 @@ +[SSP] +Title=Super Steam Packer +Version=v1.0 +Author=Masquerade +Forum=CS.RIN.RU +Github=Masquerade's Github \ No newline at end of file diff --git a/Resources/Settings.bin b/Resources/Settings.bin new file mode 100644 index 0000000..126967e --- /dev/null +++ b/Resources/Settings.bin @@ -0,0 +1,5 @@ +[SSP] +language=English +loginwarningaccepted=false +userdatasaved=false +compressor=7z diff --git a/Resources/rar.exe b/Resources/rar.exe new file mode 100644 index 0000000..ed063c5 Binary files /dev/null and b/Resources/rar.exe differ diff --git a/SuperSteamPacker.csproj b/SuperSteamPacker.csproj new file mode 100644 index 0000000..3fbe37e --- /dev/null +++ b/SuperSteamPacker.csproj @@ -0,0 +1,157 @@ + + + + + Debug + AnyCPU + {A8C1F190-F299-4027-9C5A-FA65ACDA5841} + WinExe + SuperSteamPacker + SuperSteamPacker + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + application.ico + + + + packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll + + + packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + packages\protobuf-net.3.0.101\lib\net461\protobuf-net.dll + + + packages\protobuf-net.Core.3.0.101\lib\net461\protobuf-net.Core.dll + + + packages\SteamKit2.2.4.1\lib\netstandard2.0\SteamKit2.dll + + + + packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + packages\System.Collections.Immutable.1.7.1\lib\net461\System.Collections.Immutable.dll + + + + + packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll + True + True + + + packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + packages\System.Security.AccessControl.5.0.0\lib\net461\System.Security.AccessControl.dll + + + packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + Form + + + MoreSettingsForm.cs + + + + + MainForm.cs + + + MoreSettingsForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SuperSteamPacker.sln b/SuperSteamPacker.sln new file mode 100644 index 0000000..8c7f761 --- /dev/null +++ b/SuperSteamPacker.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33502.453 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperSteamPacker", "SuperSteamPacker.csproj", "{A8C1F190-F299-4027-9C5A-FA65ACDA5841}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A8C1F190-F299-4027-9C5A-FA65ACDA5841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A8C1F190-F299-4027-9C5A-FA65ACDA5841}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A8C1F190-F299-4027-9C5A-FA65ACDA5841}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A8C1F190-F299-4027-9C5A-FA65ACDA5841}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ED24917F-9768-49EB-97E9-6C4E1045B5BA} + EndGlobalSection +EndGlobal diff --git a/application.ico b/application.ico new file mode 100644 index 0000000..792e1b6 Binary files /dev/null and b/application.ico differ diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..a5fd635 Binary files /dev/null and b/logo.png differ diff --git a/packages.config b/packages.config new file mode 100644 index 0000000..08b3990 --- /dev/null +++ b/packages.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file