diff --git a/Hoi4 Launcher/App.config b/Hoi4 Launcher/App.config index 892c7c3..921f386 100644 --- a/Hoi4 Launcher/App.config +++ b/Hoi4 Launcher/App.config @@ -1,5 +1,10 @@  + + +
+ + @@ -9,6 +14,20 @@ + + + + + + + + False + + + + + + \ No newline at end of file diff --git a/Hoi4 Launcher/Form1.Designer.cs b/Hoi4 Launcher/Form1.Designer.cs index 59dbf9a..098654a 100644 --- a/Hoi4 Launcher/Form1.Designer.cs +++ b/Hoi4 Launcher/Form1.Designer.cs @@ -101,7 +101,6 @@ private void InitializeComponent() this.userControl11.TabIndex = 4; this.userControl11.Text = "PLAY"; this.userControl11.Click += new System.EventHandler(this.UserControl11_Click); - this.userControl11.Load += new System.EventHandler(this.userControl11_Load); // // metroSetControlBox1 // @@ -421,6 +420,7 @@ private void InitializeComponent() this.Text = "HEARTS OF IRON IV LAUNCHER"; this.TextColor = System.Drawing.Color.White; this.ThemeName = "MetroLight"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); this.Load += new System.EventHandler(this.Form1_Load_1); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); diff --git a/Hoi4 Launcher/Form1.cs b/Hoi4 Launcher/Form1.cs index aeca6fc..7c84dd1 100644 --- a/Hoi4 Launcher/Form1.cs +++ b/Hoi4 Launcher/Form1.cs @@ -13,6 +13,7 @@ using Timer = System.Timers.Timer; using Hoi4_Launcher.Utility; using System.Drawing.Imaging; +using Hoi4_Launcher.Parser; namespace Hoi4_Launcher { @@ -30,6 +31,7 @@ public partial class Form1 : MetroSet_UI.Forms.MetroSetForm private string args; Timer updateUI = new Timer(100); + modParser modParser; static launchSettings data = new launchSettings(); @@ -40,7 +42,10 @@ public partial class Form1 : MetroSet_UI.Forms.MetroSetForm public Form1(string[] args) { - foreach (var arg in args) + var defaultArgsLaunch = args.ToList(); + var settingsArgsLaunch = Properties.Settings.Default.startArguments.Split(' ').ToList(); + var launchArguments = defaultArgsLaunch.Union(settingsArgsLaunch).ToList(); + foreach (var arg in launchArguments) { this.args += arg + " "; } @@ -48,6 +53,21 @@ public Form1(string[] args) var steamLink = new SteamLink { Dock = DockStyle.Fill, TopLevel = false }; panel2.Controls.Add(steamLink) ; steamLink.Show(); + if (Properties.Settings.Default.generateDescriptor) + { + modParser = new modParser(AppContext.BaseDirectory); + if (modParser.isPathValid) + { + foreach (var mod in modParser.mods) + { + var id = mod.Split('\\').Last(); + modParser.createDescriptorFile(mod, Hoi4_Mods, id); + } + } + else { + Logger("Application encontered an error: " + modParser.exception); + } + } } protected override CreateParams CreateParams @@ -83,19 +103,19 @@ private void Form1_Load_1(object sender, EventArgs e) //Release Candidate disable settings //Remove this when Finished - //Settings settingsForm = new Settings(); - //settingsForm.TopLevel = false; - //settingsForm.AutoScroll = true; - //settingsForm.Dock = DockStyle.Fill; - //panel1.Controls.Add(settingsForm); - //settingsForm.Show(); + Settings settingsForm = new Settings(); + settingsForm.TopLevel = false; + settingsForm.AutoScroll = true; + settingsForm.Dock = DockStyle.Fill; + panel1.Controls.Add(settingsForm); + settingsForm.Show(); - //panel1.AutoScroll = true; + panel1.AutoScroll = true; categoriesBox.DropDownStyle = ComboBoxStyle.DropDownList; - Logger("Application arguments: " + (String.IsNullOrEmpty(args) ? "null" : args)); + Logger("Application arguments: " + (String.IsNullOrWhiteSpace(args) ? "null" : args)); this.DoubleBuffered = true; Util.enableDoubleBuff(tabControl1); Util.enableDoubleBuff(tabPage1); @@ -144,7 +164,7 @@ public launchSettings load_items() } public List load_mods_info() { - string[] stringSeparators = new string[] { "\n\t" }; + string[] stringSeparators = new string[] { "\n\t", "\n\r", Environment.NewLine }; List mods = new List(); DirectoryInfo d = new DirectoryInfo(Hoi4_Mods); FileInfo[] Files = d.GetFiles("*.mod"); @@ -276,6 +296,7 @@ private void UserControl11_Click(object sender, EventArgs e) config.enabled_mods = enabled_mods; config.disabled_dlcs = disabled_dlc; SerializeConfig(config); + Properties.Settings.Default.Save(); Process.Start(@"hoi4.exe", args); Application.Exit(); } @@ -543,6 +564,11 @@ private void panel1_Paint(object sender, PaintEventArgs e) { } + + private void Form1_FormClosing(object sender, FormClosingEventArgs e) + { + Properties.Settings.Default.Save(); + } } } diff --git a/Hoi4 Launcher/Hoi4 Launcher.csproj b/Hoi4 Launcher/Hoi4 Launcher.csproj index 0779f7d..08342cb 100644 --- a/Hoi4 Launcher/Hoi4 Launcher.csproj +++ b/Hoi4 Launcher/Hoi4 Launcher.csproj @@ -73,11 +73,30 @@ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + ..\packages\SharpCompress.0.30.0\lib\net461\SharpCompress.dll + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\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.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Text.Encoding.CodePages.5.0.0\lib\net461\System.Text.Encoding.CodePages.dll + diff --git a/Hoi4 Launcher/Parser/modParser.cs b/Hoi4 Launcher/Parser/modParser.cs index dd56c73..7797ad3 100644 --- a/Hoi4 Launcher/Parser/modParser.cs +++ b/Hoi4 Launcher/Parser/modParser.cs @@ -1,12 +1,133 @@ -using System; +using Hoi4_Launcher.Utility; +using SharpCompress.Readers; +using System; using System.Collections.Generic; +using System.IO; +using System.IO.Compression; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Forms; namespace Hoi4_Launcher.Parser { class modParser { + public string modsFolder; + public string[] mods; + public bool isPathValid = false; + public Exception exception; + public modParser(string thisPath) + { + this.modsFolder = workshop(thisPath); + try + { + mods = Directory.GetDirectories(modsFolder); + this.isPathValid = true; + } + catch (Exception ex) { + string message = "I couldn't find the path to the mods directory." + + Environment.NewLine+ + "Perhaps this is not a steam install?" + + Environment.NewLine + + "Either way descriptor.mod is disabled. If you think this is an issue, open one on github."+ + Environment.NewLine + + "More info in Log tab!"; + string title = "Something intresting happened"; + MessageBox.Show(message, title); + Properties.Settings.Default.generateDescriptor = false; + Properties.Settings.Default.Save(); + this.exception = ex; + } + } + public string workshop(string path) => path.Split(new string[] { "steamapps" }, StringSplitOptions.None)[0] + "steamapps\\workshop\\content\\394360"; + + public bool createDescriptorFile(string path, string savePath, string id) + { + DirectoryInfo dInfo = new DirectoryInfo(path); + FileInfo zipFile; + try + { + zipFile = dInfo.GetFilesByExtensions(new string[] { ".rar", ".zip", ".7z" }).First(); + } + catch (Exception ex) { + zipFile = null; + } + // We are going to check if descriptor.mod exists + if (File.Exists(dInfo.FullName + "\\descriptor.mod")) + { + if (!File.Exists(savePath + "\\ugc_" + id + ".mod")){ + var descriptorFile = editDescriptor(File.ReadAllText(dInfo.FullName + "\\descriptor.mod"), dInfo.FullName); + System.IO.File.WriteAllLines(savePath + "\\ugc_" + id + ".mod", descriptorFile); + } + return true; + } + else if (zipFile != null) + { + if (!File.Exists(savePath + "\\ugc_" + id + ".mod")) + { + try + { + //using (ZipArchive archive = ZipFile.OpenRead(zipFile.FullName)) + //{ + // ZipArchiveEntry descriptor = archive.GetEntry("descriptor.mod"); + // descriptor.ExtractToFile(@"descriptor.mod"); + // var textStream = descriptor.Open(); + // StreamReader reader = new StreamReader(textStream); + // var descriptorFile = editDescriptor(reader.ReadToEnd(), zipFile.FullName); + // System.IO.File.WriteAllLines(savePath + "\\ugc_" + id + ".mod", descriptorFile); + //} + + using (Stream stream = File.OpenRead(zipFile.FullName)) + using (var reader = ReaderFactory.Open(stream)) + { + while (reader.MoveToNextEntry()) + { + if (!reader.Entry.IsDirectory && reader.Entry.Key == "descriptor.mod") + { + reader.WriteEntryToFile(@"tempDescriptor.mod"); + var descriptorFile = editDescriptor(File.ReadAllText(@"tempDescriptor.mod"), zipFile.FullName); + System.IO.File.WriteAllLines(savePath + "\\ugc_" + id + ".mod", descriptorFile); + break; + } + } + } + } + catch (Exception ex) { } + } + if (File.Exists(@"tempDescriptor.mod")) + { + File.Delete(@"tempDescriptor.mod"); + } + return true; + } + else + { + return false; + } + } + + // this rlly needs a rewrite + private string[] editDescriptor(string descriptor, string path) + { + bool doesItContainPath = false; + List descriptorFile = new List(); + foreach (var line in descriptor.Split(new string[] { Environment.NewLine, "\n\t", "\n\r", "\n"}, StringSplitOptions.RemoveEmptyEntries)) + { + var currentLine = line; + if (line.Split('=').First().ToLower() == "path") + { + currentLine = "path=" + path; + doesItContainPath = true; + + } + descriptorFile.Add(currentLine); + } + if (!doesItContainPath) + { + descriptorFile.Add("path=" + path); + } + return descriptorFile.ToArray(); + } } } diff --git a/Hoi4 Launcher/Properties/Settings.Designer.cs b/Hoi4 Launcher/Properties/Settings.Designer.cs index 84999ca..d598268 100644 --- a/Hoi4 Launcher/Properties/Settings.Designer.cs +++ b/Hoi4 Launcher/Properties/Settings.Designer.cs @@ -8,23 +8,43 @@ // //------------------------------------------------------------------------------ -namespace Hoi4_Launcher.Properties -{ - - +namespace Hoi4_Launcher.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 - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.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 - { + + public static Settings Default { + get { return defaultInstance; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool generateDescriptor { + get { + return ((bool)(this["generateDescriptor"])); + } + set { + this["generateDescriptor"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string startArguments { + get { + return ((string)(this["startArguments"])); + } + set { + this["startArguments"] = value; + } + } } } diff --git a/Hoi4 Launcher/Properties/Settings.settings b/Hoi4 Launcher/Properties/Settings.settings index 3964565..e7db97c 100644 --- a/Hoi4 Launcher/Properties/Settings.settings +++ b/Hoi4 Launcher/Properties/Settings.settings @@ -1,7 +1,12 @@  - - - - - - + + + + + False + + + + + + \ No newline at end of file diff --git a/Hoi4 Launcher/Utility/Settings.Designer.cs b/Hoi4 Launcher/Utility/Settings.Designer.cs index 7022146..cc6e7a4 100644 --- a/Hoi4 Launcher/Utility/Settings.Designer.cs +++ b/Hoi4 Launcher/Utility/Settings.Designer.cs @@ -28,84 +28,139 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Settings)); this.label5 = new System.Windows.Forms.Label(); - this.transparentDVG1 = new Hoi4_Launcher.Utility.TransparentDVG(); - this.checkBox2 = new System.Windows.Forms.CheckBox(); - this.radioButton1 = new System.Windows.Forms.RadioButton(); + this.panel1 = new System.Windows.Forms.Panel(); this.radioButton2 = new System.Windows.Forms.RadioButton(); - ((System.ComponentModel.ISupportInitialize)(this.transparentDVG1)).BeginInit(); + this.radioButton1 = new System.Windows.Forms.RadioButton(); + this.label1 = new System.Windows.Forms.Label(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.panel1.SuspendLayout(); this.SuspendLayout(); // // label5 // this.label5.AutoSize = true; this.label5.BackColor = System.Drawing.Color.Black; - this.label5.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(9, 11); + this.label5.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.ForeColor = System.Drawing.SystemColors.AppWorkspace; + this.label5.Location = new System.Drawing.Point(12, 11); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(56, 19); + this.label5.Size = new System.Drawing.Size(296, 23); this.label5.TabIndex = 7; - this.label5.Text = "Images"; + this.label5.Text = "Use built in descriptor.mod generator"; + this.toolTip1.SetToolTip(this.label5, resources.GetString("label5.ToolTip")); // - // transparentDVG1 + // panel1 // - this.transparentDVG1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.transparentDVG1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; - this.transparentDVG1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; - this.transparentDVG1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.transparentDVG1.Location = new System.Drawing.Point(12, 93); - this.transparentDVG1.Name = "transparentDVG1"; - this.transparentDVG1.Size = new System.Drawing.Size(275, 84); - this.transparentDVG1.TabIndex = 8; + this.panel1.Controls.Add(this.radioButton2); + this.panel1.Controls.Add(this.radioButton1); + this.panel1.Location = new System.Drawing.Point(12, 52); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(311, 24); + this.panel1.TabIndex = 9; // - // checkBox2 + // radioButton2 // - this.checkBox2.AutoSize = true; - this.checkBox2.Location = new System.Drawing.Point(7, 183); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(81, 17); - this.checkBox2.TabIndex = 10; - this.checkBox2.Text = "Fade Effect"; - this.checkBox2.UseVisualStyleBackColor = true; + this.radioButton2.AutoSize = true; + this.radioButton2.Location = new System.Drawing.Point(160, 3); + this.radioButton2.Name = "radioButton2"; + this.radioButton2.Size = new System.Drawing.Size(60, 17); + this.radioButton2.TabIndex = 11; + this.radioButton2.TabStop = true; + this.radioButton2.Text = "Disable"; + this.radioButton2.UseVisualStyleBackColor = true; + this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged); // // radioButton1 // this.radioButton1.AutoSize = true; - this.radioButton1.Location = new System.Drawing.Point(10, 34); + this.radioButton1.Location = new System.Drawing.Point(4, 4); this.radioButton1.Name = "radioButton1"; - this.radioButton1.Size = new System.Drawing.Size(114, 17); - this.radioButton1.TabIndex = 11; + this.radioButton1.Size = new System.Drawing.Size(58, 17); + this.radioButton1.TabIndex = 10; this.radioButton1.TabStop = true; - this.radioButton1.Text = "Don\'t show images"; + this.radioButton1.Text = "Enable"; + this.toolTip1.SetToolTip(this.radioButton1, "If you don\'t have mod files generated next startup of the program it will take lo" + + "nger but don\'t worry."); this.radioButton1.UseVisualStyleBackColor = true; + this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged); // - // radioButton2 + // label1 // - this.radioButton2.AutoSize = true; - this.radioButton2.Location = new System.Drawing.Point(9, 57); - this.radioButton2.Name = "radioButton2"; - this.radioButton2.Size = new System.Drawing.Size(88, 17); - this.radioButton2.TabIndex = 12; - this.radioButton2.TabStop = true; - this.radioButton2.Text = "Show images"; - this.radioButton2.UseVisualStyleBackColor = true; + this.label1.AutoSize = true; + this.label1.BackColor = System.Drawing.Color.Black; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.SystemColors.AppWorkspace; + this.label1.Location = new System.Drawing.Point(12, 184); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(155, 19); + this.label1.TabIndex = 10; + this.label1.Text = "Hover any title for info"; + // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 0; + this.toolTip1.InitialDelay = 500; + this.toolTip1.ReshowDelay = 100; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.BackColor = System.Drawing.Color.Black; + this.label3.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.ForeColor = System.Drawing.SystemColors.AppWorkspace; + this.label3.Location = new System.Drawing.Point(8, 79); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(154, 23); + this.label3.TabIndex = 12; + this.label3.Text = "Startup arguments"; + this.toolTip1.SetToolTip(this.label3, "The arguments to use when starting up Hearts of Iron IV executable.\r\nYes this is " + + "where you can enable debug.\r\nExample \"-debug -autosave=NEVER\" (USE SPACE BETWEEN" + + " EACH ARGUMENT)"); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.BackColor = System.Drawing.SystemColors.Highlight; + this.label2.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.ForeColor = System.Drawing.SystemColors.AppWorkspace; + this.label2.Location = new System.Drawing.Point(13, 34); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(232, 15); + this.label2.TabIndex = 11; + this.label2.Text = "THIS ONLY WORKS WITH STEAM INSTALL!!!"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(12, 106); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(455, 20); + this.textBox1.TabIndex = 13; + this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // Settings // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.SystemColors.GrayText; this.ClientSize = new System.Drawing.Size(541, 212); - this.Controls.Add(this.radioButton2); - this.Controls.Add(this.radioButton1); - this.Controls.Add(this.checkBox2); - this.Controls.Add(this.transparentDVG1); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.panel1); this.Controls.Add(this.label5); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "Settings"; this.Text = "Settings"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Settings_FormClosing); this.Load += new System.EventHandler(this.Settings_Load); - ((System.ComponentModel.ISupportInitialize)(this.transparentDVG1)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -114,9 +169,13 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Label label5; - private TransparentDVG transparentDVG1; - private System.Windows.Forms.CheckBox checkBox2; - private System.Windows.Forms.RadioButton radioButton1; + private System.Windows.Forms.Panel panel1; private System.Windows.Forms.RadioButton radioButton2; + private System.Windows.Forms.RadioButton radioButton1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox1; } } \ No newline at end of file diff --git a/Hoi4 Launcher/Utility/Settings.cs b/Hoi4 Launcher/Utility/Settings.cs index c94be62..6f65370 100644 --- a/Hoi4 Launcher/Utility/Settings.cs +++ b/Hoi4 Launcher/Utility/Settings.cs @@ -28,6 +28,15 @@ private void Settings_Load(object sender, EventArgs e) { SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.BackColor = Color.Transparent; + if (Properties.Settings.Default.generateDescriptor) + { + radioButton1.Checked = true; + } + else + { + radioButton2.Checked = true; + } + textBox1.Text = Properties.Settings.Default.startArguments; } protected override CreateParams CreateParams { @@ -60,5 +69,26 @@ private void label1_Click(object sender, EventArgs e) { } + + private void radioButton1_CheckedChanged(object sender, EventArgs e) + { + if (radioButton1.Checked) + { + Properties.Settings.Default.generateDescriptor = true; + } + else + { + Properties.Settings.Default.generateDescriptor = false; + } + } + + private void radioButton2_CheckedChanged(object sender, EventArgs e) + { + } + + private void textBox1_TextChanged(object sender, EventArgs e) + { + Properties.Settings.Default.startArguments = textBox1.Text; + } } } diff --git a/Hoi4 Launcher/Utility/Settings.resx b/Hoi4 Launcher/Utility/Settings.resx index 1af7de1..158c3ea 100644 --- a/Hoi4 Launcher/Utility/Settings.resx +++ b/Hoi4 Launcher/Utility/Settings.resx @@ -117,4 +117,16 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + By default the launcher doesn't generate +descriptor.mod(the file that allows you to load mods) +by enabeling this the launcher on startup will generate the files. +WARNING! This feature is in testing, it doesn't even check if the +descriptop.mod is valid so use with caution. Any feedback is +appreciated, you can open an issue. + + \ No newline at end of file diff --git a/Hoi4 Launcher/Utility/Utility.cs b/Hoi4 Launcher/Utility/Utility.cs index 5762fb1..9327ab2 100644 --- a/Hoi4 Launcher/Utility/Utility.cs +++ b/Hoi4 Launcher/Utility/Utility.cs @@ -103,6 +103,7 @@ public static Image parseImage(string path, string file) } catch (Exception ex) { return null; } } + public static void enableDoubleBuff(System.Windows.Forms.Control cont) { System.Reflection.PropertyInfo DemoProp = typeof(System.Windows.Forms.Control).GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); diff --git a/Hoi4 Launcher/packages.config b/Hoi4 Launcher/packages.config index 6fed04d..b8387d7 100644 --- a/Hoi4 Launcher/packages.config +++ b/Hoi4 Launcher/packages.config @@ -10,4 +10,10 @@ + + + + + + \ No newline at end of file