From c6598f685647b5220766a04844624f8c43e8fce7 Mon Sep 17 00:00:00 2001 From: "Denis Kuzmin [ GitHub/3F ]" Date: Sun, 15 Dec 2019 19:40:30 +0300 Subject: [PATCH] Implemented "Single + Double Inf/-Inf token patching" option. Related Issue #128 Also updated layout: GdiCharSet = 0 + background caption to filter projects by path --- .../DllExportAppDomainIsolatedTask.cs | 11 ++ .../DllExportTask.cs | 11 ++ .../ExportTaskImplementation.cs | 6 + .../IInputRawValues.cs | 8 ++ RGiesecke.DllExport/IInputValues.cs | 6 + RGiesecke.DllExport/InputValuesCore.cs | 6 + .../Parsing/Actions/ClassParserAction.cs | 73 +++++++++++ .../Parsing/Actions/MethodParserAction.cs | 70 +++++++++++ RGiesecke.DllExport/PatchesType.cs | 24 ++++ RGiesecke.DllExport/PeCheckType.cs | 7 +- .../RGiesecke.DllExport.csproj | 1 + Wizard/CompilerCfg.cs | 5 + Wizard/Extensions/StringExtension.cs | 14 +++ Wizard/MSBuildProperties.cs | 5 + Wizard/Project.cs | 19 +-- Wizard/UI/Components/TextBoxExt.cs | 61 +++++++++ Wizard/UI/ConfiguratorForm.Designer.cs | 27 ++-- .../Controls/ProjectItemControl.Designer.cs | 117 ++++++++++++------ Wizard/UI/Controls/ProjectItemControl.cs | 24 +++- Wizard/UI/Controls/ProjectItemControl.resx | 3 - Wizard/UI/Kit/FilterLineControl.Designer.cs | 14 ++- Wizard/UserConfig.cs | 3 +- Wizard/Wizard.csproj | 3 + tools/net.r_eg.DllExport.targets | 2 + 24 files changed, 445 insertions(+), 75 deletions(-) create mode 100644 RGiesecke.DllExport/PatchesType.cs create mode 100644 Wizard/UI/Components/TextBoxExt.cs diff --git a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportAppDomainIsolatedTask.cs b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportAppDomainIsolatedTask.cs index deab171..9ebf6a7 100644 --- a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportAppDomainIsolatedTask.cs +++ b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportAppDomainIsolatedTask.cs @@ -341,6 +341,17 @@ public string MetaLib } } + public PatchesType Patches + { + get => _ExportTaskImplementation.Patches; + set => _ExportTaskImplementation.Patches = value; + } + + public long PatchesRaw + { + set => Patches = (PatchesType)value; + } + public PeCheckType PeCheck { get => _ExportTaskImplementation.PeCheck; diff --git a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportTask.cs b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportTask.cs index dad9237..24d3cb2 100644 --- a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportTask.cs +++ b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/DllExportTask.cs @@ -348,6 +348,17 @@ public string MetaLib } } + public PatchesType Patches + { + get => _ExportTaskImplementation.Patches; + set => _ExportTaskImplementation.Patches = value; + } + + public long PatchesRaw + { + set => Patches = (PatchesType)value; + } + public PeCheckType PeCheck { get => _ExportTaskImplementation.PeCheck; diff --git a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/ExportTaskImplementation.cs b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/ExportTaskImplementation.cs index ab0c534..995efd9 100644 --- a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/ExportTaskImplementation.cs +++ b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/ExportTaskImplementation.cs @@ -275,6 +275,12 @@ public string MetaLib } } + public PatchesType Patches + { + get => _Values.Patches; + set => _Values.Patches = value; + } + public PeCheckType PeCheck { get => _Values.PeCheck; diff --git a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/IInputRawValues.cs b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/IInputRawValues.cs index ce320ef..f0f69d9 100644 --- a/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/IInputRawValues.cs +++ b/RGiesecke.DllExport.MSBuild/RGiesecke.DllExport.MSBuild/IInputRawValues.cs @@ -1,8 +1,16 @@  +//# Author of original code ([Decompiled] MIT-License): Copyright (c) 2009-2015 Robert Giesecke +//# Use Readme & LICENSE files for details. + +//# Modifications: Copyright (c) 2016-2019 Denis Kuzmin < entry.reg@gmail.com > GitHub/3F +//$ Distributed under the MIT License (MIT) + namespace RGiesecke.DllExport.MSBuild { public interface IInputRawValues: IInputValues { + long PatchesRaw { set; } + int PeCheckRaw { set; } } } diff --git a/RGiesecke.DllExport/IInputValues.cs b/RGiesecke.DllExport/IInputValues.cs index 9b957e0..cfcfb06 100644 --- a/RGiesecke.DllExport/IInputValues.cs +++ b/RGiesecke.DllExport/IInputValues.cs @@ -104,6 +104,12 @@ string MetaLib set; } + PatchesType Patches + { + get; + set; + } + PeCheckType PeCheck { get; diff --git a/RGiesecke.DllExport/InputValuesCore.cs b/RGiesecke.DllExport/InputValuesCore.cs index e9c4849..e2e629d 100644 --- a/RGiesecke.DllExport/InputValuesCore.cs +++ b/RGiesecke.DllExport/InputValuesCore.cs @@ -107,6 +107,12 @@ public string MetaLib set; } + public PatchesType Patches + { + get; + set; + } + public PeCheckType PeCheck { get; diff --git a/RGiesecke.DllExport/Parsing/Actions/ClassParserAction.cs b/RGiesecke.DllExport/Parsing/Actions/ClassParserAction.cs index 0ae3508..870dc52 100644 --- a/RGiesecke.DllExport/Parsing/Actions/ClassParserAction.cs +++ b/RGiesecke.DllExport/Parsing/Actions/ClassParserAction.cs @@ -5,6 +5,8 @@ //$ Distributed under the MIT License (MIT) using System; +using System.Text; +using System.Text.RegularExpressions; namespace RGiesecke.DllExport.Parsing.Actions { @@ -31,6 +33,15 @@ public override void Execute(ParserStateValues state, string trimmedLine) state.AddLine = false; state.State = ParserState.MethodDeclaration; } + else if(trimmedLine.StartsWith(".field", StringComparison.Ordinal)) + { + if(TreatField(state, ref trimmedLine)) + { + state.AddLine = false; + state.Result.Add(trimmedLine); + } + return; + } else { if(!trimmedLine.StartsWith("} // end of class", StringComparison.Ordinal)) @@ -41,5 +52,67 @@ public override void Execute(ParserStateValues state, string trimmedLine) state.State = state.ClassNames.Count > 0 ? ParserState.Class : ParserState.Normal; } } + + /// + /// raw definition of the .field + /// true if processed + private bool TreatField(ParserStateValues state, ref string raw) + { + if((Parser.InputValues.Patches & PatchesType.InfToken) == PatchesType.InfToken) + { + // .field public static literal float32 'Infinity' = float32(inf) + // .field public static literal float32 'NegativeInfinity' = float32(-inf) + // .field public static literal float64 'Infinity' = float64(inf) + // .field public static literal float64 'NegativeInfinity' = float64(-inf) + + Match m = Regex.Match + ( + raw, + @"=\s* + float(?:(?'x64'64)|32) + \( + (?'sign'-?) + inf + \) + ", + RegexOptions.IgnorePatternWhitespace + ); + + if(m.Success) + { + raw = new string(' ', 2) + raw.Substring(0, m.Index) + GetFloatDef(m); + return true; + } + } + + return false; + } + + private static string GetFloatDef(Match fld) + { + var sb = new StringBuilder(4); + sb.Append("= float"); + + if(fld.Groups["x64"].Success) + { + sb.Append("64"); + sb.Append + ( + fld.Groups["sign"].Value.Length > 0 ? + "(0xFFF0000000000000)" : "(0x7FF0000000000000)" + ); + + return sb.ToString(); + } + + sb.Append("32"); + sb.Append + ( + fld.Groups["sign"].Value.Length > 0 ? + "(0xFF800000)" : "(0x7F800000)" + ); + + return sb.ToString(); + } } } diff --git a/RGiesecke.DllExport/Parsing/Actions/MethodParserAction.cs b/RGiesecke.DllExport/Parsing/Actions/MethodParserAction.cs index 32de231..c946a92 100644 --- a/RGiesecke.DllExport/Parsing/Actions/MethodParserAction.cs +++ b/RGiesecke.DllExport/Parsing/Actions/MethodParserAction.cs @@ -5,6 +5,8 @@ //$ Distributed under the MIT License (MIT) using System; +using System.Text; +using System.Text.RegularExpressions; namespace RGiesecke.DllExport.Parsing.Actions { @@ -22,6 +24,74 @@ public override void Execute(ParserStateValues state, string trimmedLine) state.State = ParserState.Class; return; } + + if(trimmedLine.StartsWith("IL_", StringComparison.Ordinal)) + { + if(TreatIL(state, ref trimmedLine)) + { + state.AddLine = false; + state.Result.Add(trimmedLine); + } + return; + } + } + + private bool TreatIL(ParserStateValues state, ref string raw) + { + if((Parser.InputValues.Patches & PatchesType.InfToken) == PatchesType.InfToken) + { + // ldc.r8 inf + // ldc.r8 -inf + // ldc.r4 inf + // ldc.r4 -inf + + Match m = Regex.Match + ( + raw, + @" + ldc.r(?:(?'x64'8)|4) + \s* + (?'sign'-?) + inf + ", + RegexOptions.IgnorePatternWhitespace + ); + + if(m.Success) + { + raw = new string(' ', 4) + raw.Substring(0, m.Index) + GetFloatDef(m); + return true; + } + } + + return false; + } + + private static string GetFloatDef(Match fld) + { + var sb = new StringBuilder(4); + sb.Append("ldc.r"); + + if(fld.Groups["x64"].Success) + { + sb.Append("8 "); + sb.Append + ( + fld.Groups["sign"].Value.Length > 0 ? + "(00 00 00 00 00 00 F0 FF)" : "(00 00 00 00 00 00 F0 7F)" + ); + + return sb.ToString(); + } + + sb.Append("4 "); + sb.Append + ( + fld.Groups["sign"].Value.Length > 0 ? + "(00 00 80 FF)" : "(00 00 80 7F)" + ); + + return sb.ToString(); } } } diff --git a/RGiesecke.DllExport/PatchesType.cs b/RGiesecke.DllExport/PatchesType.cs new file mode 100644 index 0000000..ec49dcc --- /dev/null +++ b/RGiesecke.DllExport/PatchesType.cs @@ -0,0 +1,24 @@ + +//# Author of original code ([Decompiled] MIT-License): Copyright (c) 2009-2015 Robert Giesecke +//# Use Readme & LICENSE files for details. + +//# Modifications: Copyright (c) 2016-2019 Denis Kuzmin < entry.reg@gmail.com > GitHub/3F +//$ Distributed under the MIT License (MIT) + +namespace RGiesecke.DllExport +{ + public enum PatchesType: long + { + None, + + /// + /// Affects ldc.r8; ldc.r4; .field; + /// + /// inf/-inf to 0x7F800000/0xFF800000 + /// 0x7FF0000000000000/0xFFF0000000000000 + /// + /// https://github.com/3F/DllExport/issues/128 + /// + InfToken = 0x01, + } +} diff --git a/RGiesecke.DllExport/PeCheckType.cs b/RGiesecke.DllExport/PeCheckType.cs index 69054c4..ac62cd9 100644 --- a/RGiesecke.DllExport/PeCheckType.cs +++ b/RGiesecke.DllExport/PeCheckType.cs @@ -1,4 +1,9 @@ - +//# Author of original code ([Decompiled] MIT-License): Copyright (c) 2009-2015 Robert Giesecke +//# Use Readme & LICENSE files for details. + +//# Modifications: Copyright (c) 2016-2019 Denis Kuzmin < entry.reg@gmail.com > GitHub/3F +//$ Distributed under the MIT License (MIT) + namespace RGiesecke.DllExport { public enum PeCheckType: int diff --git a/RGiesecke.DllExport/RGiesecke.DllExport.csproj b/RGiesecke.DllExport/RGiesecke.DllExport.csproj index 046ed73..0b7d0e5 100644 --- a/RGiesecke.DllExport/RGiesecke.DllExport.csproj +++ b/RGiesecke.DllExport/RGiesecke.DllExport.csproj @@ -58,6 +58,7 @@ + diff --git a/Wizard/CompilerCfg.cs b/Wizard/CompilerCfg.cs index 6095e62..81b1d29 100644 --- a/Wizard/CompilerCfg.cs +++ b/Wizard/CompilerCfg.cs @@ -71,5 +71,10 @@ public struct CompilerCfg /// Type of checking PE32/PE32+ module. /// public PeCheckType peCheck; + + /// + /// Optional patches. + /// + public PatchesType patches; } } diff --git a/Wizard/Extensions/StringExtension.cs b/Wizard/Extensions/StringExtension.cs index 5021b4f..a914725 100644 --- a/Wizard/Extensions/StringExtension.cs +++ b/Wizard/Extensions/StringExtension.cs @@ -74,6 +74,20 @@ public static int ToInteger(this string value) return Int32.Parse(value); } + /// + /// To get long integer value from string. + /// + /// Any compatible value. + /// + public static long ToLongInteger(this string value) + { + if(String.IsNullOrWhiteSpace(value)) { + return 0; + } + + return Int64.Parse(value); + } + /// /// Open url through default application. /// diff --git a/Wizard/MSBuildProperties.cs b/Wizard/MSBuildProperties.cs index d86c7b6..01fd3c0 100644 --- a/Wizard/MSBuildProperties.cs +++ b/Wizard/MSBuildProperties.cs @@ -88,6 +88,11 @@ public struct MSBuildProperties /// public const string DXP_PE_CHECK = "DllExportPeCheck"; + /// + /// Optional patches. + /// + public const string DXP_PATCHES = "DllExportPatches"; + /// /// Platform Target for binaries. /// diff --git a/Wizard/Project.cs b/Wizard/Project.cs index cac4949..94ad522 100644 --- a/Wizard/Project.cs +++ b/Wizard/Project.cs @@ -286,6 +286,7 @@ public Project(IXProject xproject, IConfigInitializer init) MSBuildProperties.DXP_INTERMEDIATE_FILES, MSBuildProperties.DXP_TIMEOUT, MSBuildProperties.DXP_PE_CHECK, + MSBuildProperties.DXP_PATCHES, MSBuildProperties.DXP_PLATFORM ); @@ -364,7 +365,8 @@ protected IUserConfig GetUserConfig(IXProject project, IConfigInitializer cfg) Compiler = new CompilerCfg() { ordinalsBase = 1, timeout = CompilerCfg.TIMEOUT_EXEC, - peCheck = PeCheckType.PeIl + peCheck = PeCheckType.PeIl, + patches = PatchesType.None, }, }; } @@ -473,6 +475,9 @@ protected void CfgCompiler() SetProperty(MSBuildProperties.DXP_PE_CHECK, (int)Config.Compiler.peCheck); Log.send(this, $"Type of checking PE32/PE32+ module: {Config.Compiler.peCheck}"); + + SetProperty(MSBuildProperties.DXP_PATCHES, (long)Config.Compiler.patches); + Log.send(this, $"Applied Patches: {Config.Compiler.patches}"); } protected void CfgCommonData() @@ -732,15 +737,11 @@ private void SetProperty(string name, string value) } } - private void SetProperty(string name, bool val) - { - SetProperty(name, val.ToString().ToLower()); - } + private void SetProperty(string name, bool val) => SetProperty(name, val.ToString().ToLower()); - private void SetProperty(string name, int val) - { - SetProperty(name, val.ToString()); - } + private void SetProperty(string name, int val) => SetProperty(name, val.ToString()); + + private void SetProperty(string name, long val) => SetProperty(name, val.ToString()); private string CopyLib(string src, string dest) { diff --git a/Wizard/UI/Components/TextBoxExt.cs b/Wizard/UI/Components/TextBoxExt.cs new file mode 100644 index 0000000..6acfe19 --- /dev/null +++ b/Wizard/UI/Components/TextBoxExt.cs @@ -0,0 +1,61 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2019 Denis Kuzmin < entry.reg@gmail.com > GitHub/3F + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. +*/ + +using System.Drawing; +using System.Windows.Forms; + +namespace net.r_eg.DllExport.Wizard.UI.Components +{ + internal class TextBoxExt: TextBox + { + private const int WM_PAINT = 0x000F; + + public string BackgroundCaption { get; set; } + + public int BackgroundCaptionAlpha { get; set; } = 60; + + protected void DrawString(string str, int alpha) + { + Graphics g = CreateGraphics(); + + g.DrawString(str, Font, new SolidBrush(Color.FromArgb(alpha, ForeColor)), ClientRectangle, new StringFormat + { + Alignment = StringAlignment.Near + }); + } + + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + + if(m.Msg == WM_PAINT) + { + if(!string.IsNullOrEmpty(BackgroundCaption) && string.IsNullOrEmpty(Text)) + { + DrawString(BackgroundCaption, BackgroundCaptionAlpha); + } + } + } + } +} diff --git a/Wizard/UI/ConfiguratorForm.Designer.cs b/Wizard/UI/ConfiguratorForm.Designer.cs index 9b8c5b0..43b0fc0 100644 --- a/Wizard/UI/ConfiguratorForm.Designer.cs +++ b/Wizard/UI/ConfiguratorForm.Designer.cs @@ -106,7 +106,7 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.comboBoxSln.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxSln.DropDownWidth = 500; - this.comboBoxSln.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.comboBoxSln.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBoxSln.FormattingEnabled = true; this.comboBoxSln.Location = new System.Drawing.Point(1, 2); this.comboBoxSln.Margin = new System.Windows.Forms.Padding(1); @@ -147,8 +147,8 @@ private void InitializeComponent() // splitCon.Panel2 // this.splitCon.Panel2.Controls.Add(this.tabCtrl); - this.splitCon.Size = new System.Drawing.Size(446, 340); - this.splitCon.SplitterDistance = 84; + this.splitCon.Size = new System.Drawing.Size(446, 341); + this.splitCon.SplitterDistance = 78; this.splitCon.TabIndex = 2; // // panelPrjs @@ -158,7 +158,7 @@ private void InitializeComponent() this.panelPrjs.Location = new System.Drawing.Point(0, 26); this.panelPrjs.Margin = new System.Windows.Forms.Padding(0); this.panelPrjs.Name = "panelPrjs"; - this.panelPrjs.Size = new System.Drawing.Size(446, 58); + this.panelPrjs.Size = new System.Drawing.Size(446, 52); this.panelPrjs.TabIndex = 2; // // dgvFilter @@ -178,7 +178,7 @@ private void InitializeComponent() this.gcPath}); dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(238)))), ((int)(((byte)(239))))); dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); @@ -197,7 +197,7 @@ private void InitializeComponent() this.dgvFilter.RowTemplate.Height = 17; this.dgvFilter.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.dgvFilter.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgvFilter.Size = new System.Drawing.Size(446, 58); + this.dgvFilter.Size = new System.Drawing.Size(446, 52); this.dgvFilter.TabIndex = 0; this.dgvFilter.RowEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvFilter_RowEnter); this.dgvFilter.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dgvFilter_KeyDown); @@ -245,11 +245,12 @@ private void InitializeComponent() this.tabCtrl.Appearance = System.Windows.Forms.TabAppearance.Buttons; this.tabCtrl.Controls.Add(this.tabCfgDxp); this.tabCtrl.Controls.Add(this.tabCfgOpt); + this.tabCtrl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabCtrl.Location = new System.Drawing.Point(-4, 0); this.tabCtrl.Margin = new System.Windows.Forms.Padding(0); this.tabCtrl.Name = "tabCtrl"; this.tabCtrl.SelectedIndex = 0; - this.tabCtrl.Size = new System.Drawing.Size(450, 252); + this.tabCtrl.Size = new System.Drawing.Size(450, 259); this.tabCtrl.TabIndex = 0; // // tabCfgDxp @@ -258,7 +259,7 @@ private void InitializeComponent() this.tabCfgDxp.Location = new System.Drawing.Point(4, 25); this.tabCfgDxp.Name = "tabCfgDxp"; this.tabCfgDxp.Padding = new System.Windows.Forms.Padding(3); - this.tabCfgDxp.Size = new System.Drawing.Size(442, 223); + this.tabCfgDxp.Size = new System.Drawing.Size(442, 230); this.tabCfgDxp.TabIndex = 0; this.tabCfgDxp.Text = "Options"; this.tabCfgDxp.UseVisualStyleBackColor = true; @@ -275,7 +276,7 @@ private void InitializeComponent() this.projectItems.Name = "projectItems"; this.projectItems.NamespaceValidate = null; this.projectItems.OpenUrl = null; - this.projectItems.Size = new System.Drawing.Size(448, 229); + this.projectItems.Size = new System.Drawing.Size(448, 247); this.projectItems.TabIndex = 2; // // tabCfgOpt @@ -291,7 +292,7 @@ private void InitializeComponent() this.tabCfgOpt.Location = new System.Drawing.Point(4, 25); this.tabCfgOpt.Name = "tabCfgOpt"; this.tabCfgOpt.Padding = new System.Windows.Forms.Padding(3); - this.tabCfgOpt.Size = new System.Drawing.Size(442, 223); + this.tabCfgOpt.Size = new System.Drawing.Size(442, 230); this.tabCfgOpt.TabIndex = 1; this.tabCfgOpt.Text = " +"; // @@ -323,7 +324,7 @@ private void InitializeComponent() // this.lnk3F.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.lnk3F.AutoSize = true; - this.lnk3F.Location = new System.Drawing.Point(360, 205); + this.lnk3F.Location = new System.Drawing.Point(360, 207); this.lnk3F.Name = "lnk3F"; this.lnk3F.Size = new System.Drawing.Size(57, 13); this.lnk3F.TabIndex = 14; @@ -353,7 +354,7 @@ private void InitializeComponent() this.txtBuildInfo.Name = "txtBuildInfo"; this.txtBuildInfo.ReadOnly = true; this.txtBuildInfo.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtBuildInfo.Size = new System.Drawing.Size(436, 156); + this.txtBuildInfo.Size = new System.Drawing.Size(436, 158); this.txtBuildInfo.TabIndex = 12; // // labelStorage @@ -369,7 +370,7 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(446, 369); + this.ClientSize = new System.Drawing.Size(446, 370); this.Controls.Add(this.splitCon); this.Controls.Add(this.panelTop); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; diff --git a/Wizard/UI/Controls/ProjectItemControl.Designer.cs b/Wizard/UI/Controls/ProjectItemControl.Designer.cs index 1fc8595..9ec9c03 100644 --- a/Wizard/UI/Controls/ProjectItemControl.Designer.cs +++ b/Wizard/UI/Controls/ProjectItemControl.Designer.cs @@ -1,4 +1,6 @@ -namespace net.r_eg.DllExport.Wizard.UI.Controls +using net.r_eg.DllExport.Wizard.UI.Components; + +namespace net.r_eg.DllExport.Wizard.UI.Controls { partial class ProjectItemControl { @@ -26,11 +28,13 @@ private void InitializeComponent() this.rbPlatformAnyCPU = new System.Windows.Forms.RadioButton(); this.rbPlatformX64 = new System.Windows.Forms.RadioButton(); this.groupCompiler = new System.Windows.Forms.GroupBox(); + this.linkInfPatching = new System.Windows.Forms.LinkLabel(); this.linkSysObjRebase = new System.Windows.Forms.LinkLabel(); this.chkRebaseSysObj = new System.Windows.Forms.CheckBox(); - this.textBoxCustomILAsm = new System.Windows.Forms.TextBox(); + this.textBoxCustomILAsm = new net.r_eg.DllExport.Wizard.UI.Components.TextBoxExt(); this.chkIntermediateFiles = new System.Windows.Forms.CheckBox(); this.chkCustomILAsm = new System.Windows.Forms.CheckBox(); + this.chkInfPatching = new System.Windows.Forms.CheckBox(); this.rbPlatformX86 = new System.Windows.Forms.RadioButton(); this.groupPlatform = new System.Windows.Forms.GroupBox(); this.rbPlatformAuto = new System.Windows.Forms.RadioButton(); @@ -52,9 +56,9 @@ private void InitializeComponent() this.chkInstalled = new System.Windows.Forms.CheckBox(); this.menuForInstalled = new System.Windows.Forms.ContextMenuStrip(this.components); this.menuItemLimitPKT = new System.Windows.Forms.ToolStripMenuItem(); - this.panelBottomLine = new System.Windows.Forms.Panel(); this.panelStatus = new System.Windows.Forms.Panel(); this.groupTimeout = new System.Windows.Forms.GroupBox(); + this.linkPeCheck = new System.Windows.Forms.LinkLabel(); this.labelTimeout = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numOrdinal)).BeginInit(); this.groupCompiler.SuspendLayout(); @@ -71,8 +75,8 @@ private void InitializeComponent() // this.linkOurILAsm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.linkOurILAsm.AutoSize = true; - this.linkOurILAsm.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.linkOurILAsm.Location = new System.Drawing.Point(291, 55); + this.linkOurILAsm.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkOurILAsm.Location = new System.Drawing.Point(291, 45); this.linkOurILAsm.Name = "linkOurILAsm"; this.linkOurILAsm.Size = new System.Drawing.Size(13, 13); this.linkOurILAsm.TabIndex = 7; @@ -85,7 +89,7 @@ private void InitializeComponent() this.chkOurILAsm.AutoSize = true; this.chkOurILAsm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chkOurILAsm.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkOurILAsm.Location = new System.Drawing.Point(10, 59); + this.chkOurILAsm.Location = new System.Drawing.Point(10, 49); this.chkOurILAsm.Name = "chkOurILAsm"; this.chkOurILAsm.Size = new System.Drawing.Size(276, 17); this.chkOurILAsm.TabIndex = 6; @@ -98,7 +102,7 @@ private void InitializeComponent() this.linkExpLib.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.linkExpLib.AutoSize = true; this.linkExpLib.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkExpLib.Location = new System.Drawing.Point(247, 35); + this.linkExpLib.Location = new System.Drawing.Point(247, 25); this.linkExpLib.Name = "linkExpLib"; this.linkExpLib.Size = new System.Drawing.Size(13, 13); this.linkExpLib.TabIndex = 5; @@ -110,8 +114,8 @@ private void InitializeComponent() // this.linkOrdinals.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.linkOrdinals.AutoSize = true; - this.linkOrdinals.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.linkOrdinals.Location = new System.Drawing.Point(211, 15); + this.linkOrdinals.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkOrdinals.Location = new System.Drawing.Point(211, 9); this.linkOrdinals.Name = "linkOrdinals"; this.linkOrdinals.Size = new System.Drawing.Size(13, 13); this.linkOrdinals.TabIndex = 4; @@ -124,7 +128,7 @@ private void InitializeComponent() this.chkGenExpLib.AutoSize = true; this.chkGenExpLib.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chkGenExpLib.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkGenExpLib.Location = new System.Drawing.Point(10, 39); + this.chkGenExpLib.Location = new System.Drawing.Point(10, 29); this.chkGenExpLib.Name = "chkGenExpLib"; this.chkGenExpLib.Size = new System.Drawing.Size(233, 17); this.chkGenExpLib.TabIndex = 3; @@ -134,7 +138,7 @@ private void InitializeComponent() // numOrdinal // this.numOrdinal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.numOrdinal.Location = new System.Drawing.Point(10, 16); + this.numOrdinal.Location = new System.Drawing.Point(10, 8); this.numOrdinal.Maximum = new decimal(new int[] { 10000000, 0, @@ -149,7 +153,7 @@ private void InitializeComponent() // this.labelOrdinals.AutoSize = true; this.labelOrdinals.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelOrdinals.Location = new System.Drawing.Point(99, 19); + this.labelOrdinals.Location = new System.Drawing.Point(99, 11); this.labelOrdinals.Name = "labelOrdinals"; this.labelOrdinals.Size = new System.Drawing.Size(110, 13); this.labelOrdinals.TabIndex = 1; @@ -181,6 +185,7 @@ private void InitializeComponent() // // groupCompiler // + this.groupCompiler.Controls.Add(this.linkInfPatching); this.groupCompiler.Controls.Add(this.linkSysObjRebase); this.groupCompiler.Controls.Add(this.chkRebaseSysObj); this.groupCompiler.Controls.Add(this.textBoxCustomILAsm); @@ -193,19 +198,31 @@ private void InitializeComponent() this.groupCompiler.Controls.Add(this.chkGenExpLib); this.groupCompiler.Controls.Add(this.numOrdinal); this.groupCompiler.Controls.Add(this.labelOrdinals); + this.groupCompiler.Controls.Add(this.chkInfPatching); this.groupCompiler.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupCompiler.Location = new System.Drawing.Point(130, 82); this.groupCompiler.Name = "groupCompiler"; - this.groupCompiler.Size = new System.Drawing.Size(313, 142); + this.groupCompiler.Size = new System.Drawing.Size(313, 149); this.groupCompiler.TabIndex = 9; this.groupCompiler.TabStop = false; - this.groupCompiler.Text = "Compiler settings"; + // + // linkInfPatching + // + this.linkInfPatching.AutoSize = true; + this.linkInfPatching.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkInfPatching.Location = new System.Drawing.Point(221, 130); + this.linkInfPatching.Name = "linkInfPatching"; + this.linkInfPatching.Size = new System.Drawing.Size(13, 13); + this.linkInfPatching.TabIndex = 15; + this.linkInfPatching.TabStop = true; + this.linkInfPatching.Text = "?"; + this.linkInfPatching.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkInfPatching_LinkClicked); // // linkSysObjRebase // this.linkSysObjRebase.AutoSize = true; - this.linkSysObjRebase.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.linkSysObjRebase.Location = new System.Drawing.Point(287, 117); + this.linkSysObjRebase.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkSysObjRebase.Location = new System.Drawing.Point(287, 107); this.linkSysObjRebase.Name = "linkSysObjRebase"; this.linkSysObjRebase.Size = new System.Drawing.Size(13, 13); this.linkSysObjRebase.TabIndex = 13; @@ -213,13 +230,13 @@ private void InitializeComponent() this.linkSysObjRebase.Text = "?"; this.linkSysObjRebase.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkSysObjRebase_LinkClicked); // - // chkSysObjRebase + // chkRebaseSysObj // this.chkRebaseSysObj.AutoSize = true; this.chkRebaseSysObj.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chkRebaseSysObj.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkRebaseSysObj.Location = new System.Drawing.Point(10, 119); - this.chkRebaseSysObj.Name = "chkSysObjRebase"; + this.chkRebaseSysObj.Location = new System.Drawing.Point(10, 109); + this.chkRebaseSysObj.Name = "chkRebaseSysObj"; this.chkRebaseSysObj.Size = new System.Drawing.Size(263, 17); this.chkRebaseSysObj.TabIndex = 12; this.chkRebaseSysObj.Text = "Rebase System Object: System.Runtime > mscorlib"; @@ -227,10 +244,12 @@ private void InitializeComponent() // // textBoxCustomILAsm // + this.textBoxCustomILAsm.BackgroundCaption = null; + this.textBoxCustomILAsm.BackgroundCaptionAlpha = 60; this.textBoxCustomILAsm.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.textBoxCustomILAsm.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); + this.textBoxCustomILAsm.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxCustomILAsm.ForeColor = System.Drawing.Color.DarkGray; - this.textBoxCustomILAsm.Location = new System.Drawing.Point(103, 77); + this.textBoxCustomILAsm.Location = new System.Drawing.Point(103, 67); this.textBoxCustomILAsm.Name = "textBoxCustomILAsm"; this.textBoxCustomILAsm.Size = new System.Drawing.Size(204, 20); this.textBoxCustomILAsm.TabIndex = 9; @@ -240,7 +259,7 @@ private void InitializeComponent() this.chkIntermediateFiles.AutoSize = true; this.chkIntermediateFiles.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chkIntermediateFiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkIntermediateFiles.Location = new System.Drawing.Point(10, 99); + this.chkIntermediateFiles.Location = new System.Drawing.Point(10, 89); this.chkIntermediateFiles.Name = "chkIntermediateFiles"; this.chkIntermediateFiles.Size = new System.Drawing.Size(251, 17); this.chkIntermediateFiles.TabIndex = 11; @@ -252,7 +271,7 @@ private void InitializeComponent() this.chkCustomILAsm.AutoSize = true; this.chkCustomILAsm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.chkCustomILAsm.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkCustomILAsm.Location = new System.Drawing.Point(10, 79); + this.chkCustomILAsm.Location = new System.Drawing.Point(10, 69); this.chkCustomILAsm.Name = "chkCustomILAsm"; this.chkCustomILAsm.Size = new System.Drawing.Size(93, 17); this.chkCustomILAsm.TabIndex = 8; @@ -260,6 +279,18 @@ private void InitializeComponent() this.chkCustomILAsm.UseVisualStyleBackColor = true; this.chkCustomILAsm.CheckedChanged += new System.EventHandler(this.chkCustomILAsm_CheckedChanged); // + // chkInfPatching + // + this.chkInfPatching.AutoSize = true; + this.chkInfPatching.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.chkInfPatching.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.chkInfPatching.Location = new System.Drawing.Point(10, 129); + this.chkInfPatching.Name = "chkInfPatching"; + this.chkInfPatching.Size = new System.Drawing.Size(207, 17); + this.chkInfPatching.TabIndex = 14; + this.chkInfPatching.Text = "Single + Double Inf/-Inf token patching"; + this.chkInfPatching.UseVisualStyleBackColor = true; + // // rbPlatformX86 // this.rbPlatformX86.AutoSize = true; @@ -392,7 +423,7 @@ private void InitializeComponent() 0, 0, 0}); - this.numTimeout.Location = new System.Drawing.Point(8, 74); + this.numTimeout.Location = new System.Drawing.Point(8, 76); this.numTimeout.Maximum = new decimal(new int[] { 10000000, 0, @@ -475,7 +506,7 @@ private void InitializeComponent() // textBoxProjectPath // this.textBoxProjectPath.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.textBoxProjectPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.textBoxProjectPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxProjectPath.Location = new System.Drawing.Point(73, 21); this.textBoxProjectPath.Name = "textBoxProjectPath"; this.textBoxProjectPath.ReadOnly = true; @@ -513,36 +544,39 @@ private void InitializeComponent() this.menuItemLimitPKT.Text = "Limitations if not used PublicKeyToken"; this.menuItemLimitPKT.Click += new System.EventHandler(this.menuItemLimitPKT_Click); // - // panelBottomLine - // - this.panelBottomLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.panelBottomLine.BackColor = System.Drawing.Color.Gray; - this.panelBottomLine.Location = new System.Drawing.Point(6, 224); - this.panelBottomLine.Margin = new System.Windows.Forms.Padding(0); - this.panelBottomLine.Name = "panelBottomLine"; - this.panelBottomLine.Size = new System.Drawing.Size(438, 2); - this.panelBottomLine.TabIndex = 12; - // // panelStatus // this.panelStatus.BackColor = System.Drawing.Color.DarkRed; this.panelStatus.Location = new System.Drawing.Point(0, 2); this.panelStatus.Name = "panelStatus"; - this.panelStatus.Size = new System.Drawing.Size(4, 223); + this.panelStatus.Size = new System.Drawing.Size(4, 228); this.panelStatus.TabIndex = 0; // // groupTimeout // + this.groupTimeout.Controls.Add(this.linkPeCheck); this.groupTimeout.Controls.Add(this.chkPECheckIl); this.groupTimeout.Controls.Add(this.chkPECheck1to1); this.groupTimeout.Controls.Add(this.labelTimeout); this.groupTimeout.Controls.Add(this.numTimeout); this.groupTimeout.Location = new System.Drawing.Point(5, 126); this.groupTimeout.Name = "groupTimeout"; - this.groupTimeout.Size = new System.Drawing.Size(122, 98); + this.groupTimeout.Size = new System.Drawing.Size(122, 105); this.groupTimeout.TabIndex = 9; this.groupTimeout.TabStop = false; // + // linkPeCheck + // + this.linkPeCheck.AutoSize = true; + this.linkPeCheck.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkPeCheck.Location = new System.Drawing.Point(97, 16); + this.linkPeCheck.Name = "linkPeCheck"; + this.linkPeCheck.Size = new System.Drawing.Size(13, 13); + this.linkPeCheck.TabIndex = 16; + this.linkPeCheck.TabStop = true; + this.linkPeCheck.Text = "?"; + this.linkPeCheck.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkPeCheck_LinkClicked); + // // labelTimeout // this.labelTimeout.AutoSize = true; @@ -558,7 +592,6 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.panelBottomLine); this.Controls.Add(this.groupPlatform); this.Controls.Add(this.groupCompiler); this.Controls.Add(this.groupTimeout); @@ -566,7 +599,7 @@ private void InitializeComponent() this.Controls.Add(this.gbProject); this.Controls.Add(this.groupNS); this.Name = "ProjectItemControl"; - this.Size = new System.Drawing.Size(444, 226); + this.Size = new System.Drawing.Size(444, 231); ((System.ComponentModel.ISupportInitialize)(this.numOrdinal)).EndInit(); this.groupCompiler.ResumeLayout(false); this.groupCompiler.PerformLayout(); @@ -607,12 +640,11 @@ private void InitializeComponent() private System.Windows.Forms.GroupBox gbProject; private System.Windows.Forms.Button btnBrowse; private System.Windows.Forms.CheckBox chkInstalled; - private System.Windows.Forms.Panel panelBottomLine; private System.Windows.Forms.TextBox textBoxIdent; private System.Windows.Forms.Panel panelStatus; private System.Windows.Forms.CheckBox chkIntermediateFiles; private System.Windows.Forms.NumericUpDown numTimeout; - private System.Windows.Forms.TextBox textBoxCustomILAsm; + private TextBoxExt textBoxCustomILAsm; private System.Windows.Forms.CheckBox chkCustomILAsm; private System.Windows.Forms.GroupBox groupTimeout; private System.Windows.Forms.Label labelBackgroundNS; @@ -626,5 +658,8 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton rbPlatformAuto; private System.Windows.Forms.LinkLabel linkSysObjRebase; private System.Windows.Forms.CheckBox chkRebaseSysObj; + private System.Windows.Forms.CheckBox chkInfPatching; + private System.Windows.Forms.LinkLabel linkInfPatching; + private System.Windows.Forms.LinkLabel linkPeCheck; } } diff --git a/Wizard/UI/Controls/ProjectItemControl.cs b/Wizard/UI/Controls/ProjectItemControl.cs index 4f7c25f..ce80bd0 100644 --- a/Wizard/UI/Controls/ProjectItemControl.cs +++ b/Wizard/UI/Controls/ProjectItemControl.cs @@ -117,7 +117,8 @@ public CompilerCfg Compiler rSysObj = chkRebaseSysObj.Checked, intermediateFiles = chkIntermediateFiles.Checked, timeout = (int)numTimeout.Value, - peCheck = GetPeCheckType() + peCheck = GetPeCheckType(), + patches = GetPatchesType(), }; set { @@ -138,6 +139,7 @@ public CompilerCfg Compiler chkIntermediateFiles.Checked = value.intermediateFiles; SetPeCheckType(value.peCheck); + SetPatchesType(value.patches); } } @@ -258,6 +260,22 @@ private void SetPeCheckType(PeCheckType type) chkPECheckIl.Checked = (type & PeCheckType.PeIl) == PeCheckType.PeIl; } + private PatchesType GetPatchesType() + { + PatchesType patches = PatchesType.None; + + if(chkInfPatching.Checked) { + patches |= PatchesType.InfToken; + } + + return patches; + } + + private void SetPatchesType(PatchesType type) + { + chkInfPatching.Checked = (type & PatchesType.InfToken) == PatchesType.InfToken; + } + private void InstalledStatus(bool status) { if(status) { @@ -308,6 +326,10 @@ private void numOrdinal_KeyDown(object sender, KeyEventArgs e) private void linkSysObjRebase_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => OpenUrl?.Invoke("https://github.com/3F/DllExport/issues/125#issuecomment-561245575"); + private void LinkInfPatching_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => OpenUrl?.Invoke("https://github.com/3F/DllExport/issues/128"); + + private void LinkPeCheck_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => OpenUrl?.Invoke("https://github.com/3F/DllExport/issues/55"); + private void comboNS_TextUpdate(object sender, EventArgs e) { if(NamespaceValidate == null) { diff --git a/Wizard/UI/Controls/ProjectItemControl.resx b/Wizard/UI/Controls/ProjectItemControl.resx index 7d0de5e..650b1b5 100644 --- a/Wizard/UI/Controls/ProjectItemControl.resx +++ b/Wizard/UI/Controls/ProjectItemControl.resx @@ -120,9 +120,6 @@ 19, 17 - - 19, 17 - 109, 17 diff --git a/Wizard/UI/Kit/FilterLineControl.Designer.cs b/Wizard/UI/Kit/FilterLineControl.Designer.cs index 15cd79e..613949f 100644 --- a/Wizard/UI/Kit/FilterLineControl.Designer.cs +++ b/Wizard/UI/Kit/FilterLineControl.Designer.cs @@ -1,4 +1,6 @@ -namespace net.r_eg.DllExport.Wizard.UI.Kit +using net.r_eg.DllExport.Wizard.UI.Components; + +namespace net.r_eg.DllExport.Wizard.UI.Kit { partial class FilterLineControl { @@ -16,7 +18,7 @@ partial class FilterLineControl private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - this.textBoxFilter = new System.Windows.Forms.TextBox(); + this.textBoxFilter = new TextBoxExt(); this.panelFBorder = new System.Windows.Forms.Panel(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.panelFBorder.SuspendLayout(); @@ -24,15 +26,16 @@ private void InitializeComponent() // // textBoxFilter // + this.textBoxFilter.BackgroundCaption = "Filter by project path ..."; + this.textBoxFilter.BackgroundCaptionAlpha = 70; this.textBoxFilter.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBoxFilter.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxFilter.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.textBoxFilter.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxFilter.Location = new System.Drawing.Point(1, 1); this.textBoxFilter.Margin = new System.Windows.Forms.Padding(0); this.textBoxFilter.Name = "textBoxFilter"; this.textBoxFilter.Size = new System.Drawing.Size(464, 16); this.textBoxFilter.TabIndex = 0; - this.toolTip.SetToolTip(this.textBoxFilter, "Filter by project path"); this.textBoxFilter.TextChanged += new System.EventHandler(this.textBoxFilter_TextChanged); // // panelFBorder @@ -63,9 +66,8 @@ private void InitializeComponent() } #endregion - - private System.Windows.Forms.TextBox textBoxFilter; private System.Windows.Forms.Panel panelFBorder; private System.Windows.Forms.ToolTip toolTip; + private TextBoxExt textBoxFilter; } } diff --git a/Wizard/UserConfig.cs b/Wizard/UserConfig.cs index 040568e..d5e2569 100644 --- a/Wizard/UserConfig.cs +++ b/Wizard/UserConfig.cs @@ -182,7 +182,8 @@ public UserConfig(IWizardConfig cfg, IXProject xp) rSysObj = GetValue(MSBuildProperties.DXP_SYSOBJ_REBASE, xp).ToBoolean(), intermediateFiles = GetValue(MSBuildProperties.DXP_INTERMEDIATE_FILES, xp).ToBoolean(), timeout = String.IsNullOrWhiteSpace(rawTimeout) ? CompilerCfg.TIMEOUT_EXEC : rawTimeout.ToInteger(), - peCheck = (PeCheckType)GetValue(MSBuildProperties.DXP_PE_CHECK, xp).ToInteger() + peCheck = (PeCheckType)GetValue(MSBuildProperties.DXP_PE_CHECK, xp).ToInteger(), + patches = (PatchesType)GetValue(MSBuildProperties.DXP_PATCHES, xp).ToLongInteger() }; } diff --git a/Wizard/Wizard.csproj b/Wizard/Wizard.csproj index 2a65aa5..2674ae3 100644 --- a/Wizard/Wizard.csproj +++ b/Wizard/Wizard.csproj @@ -79,6 +79,9 @@ True Resources.resx + + Component + Component diff --git a/tools/net.r_eg.DllExport.targets b/tools/net.r_eg.DllExport.targets index 18751d4..0271311 100644 --- a/tools/net.r_eg.DllExport.targets +++ b/tools/net.r_eg.DllExport.targets @@ -70,6 +70,7 @@ $(DllExportVSRoot)Common7\Tools\VsDevCmd.bat $(DllExportVSRoot)VC\vcvarsall.bat;$(DllExportVSRoot)VC\Auxiliary\Build\vcvarsall.bat +