Skip to content

Commit 6ccd212

Browse files
authored
Merge pull request #3 from ADawesomeguy/net-6.0-update
Update to net6.0
2 parents 7beb304 + 2495fb5 commit 6ccd212

13 files changed

Lines changed: 681 additions & 251 deletions

WitcherScriptMerger/App.config

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
2-
3-
<!-- ABOUT THE SETTINGS
4-
GameDirectory The Witcher 3 Wild Hunt folder
5-
VanillaScriptsDirectory Where to look for vanilla scripts (default if blank: \GameDirectory\content\content0\scripts)
6-
ModsDirectory Where to look for mod folders (default if blank: \GameDirectory\mods)
7-
8-
CheckScripts Whether to check for mod conflicts in .ws script files
9-
CheckXmlFiles Whether to check for mod conflicts in .xml files
10-
CheckBundleContents Whether to check for mod conflicts in bundle file contents
11-
IgnoreModNames Which mod folders to ignore (separated by commas)
12-
13-
CollapseCustomLoadOrder Whether to auto-collapse conflicts that are resolved by your custom load order
14-
CollapseNotMergeable Whether to auto-collapse conflicts that can't be merged (non-text files)
15-
16-
ValidateMergeSources Whether to prompt to delete merges outdated by changes in mod files
17-
ValidateCustomLoadOrder Whether to detect mods.settings file on refresh & make sure it's configured to load merged files first
18-
19-
ReviewEachMerge Whether to show the text comparison UI for every merge, instead of just ones that aren't auto-solvable
20-
ShowPathsInKDiff3 Whether to show file paths in KDiff3 instead of just Vanilla, modName1, modName2
21-
PlayCompletionSounds Whether to play a sound after merging or packing a bundle
22-
ReportAfterMerge Whether to show a report after merging 2 files, with buttons to open files/directories
23-
ReportAfterPack Whether to show a report after packing a bundle, with list of contents & button to open directory
24-
MergedModName Which mod folder to save merges in (should be 1st alphabetically, so the game loads it before others)
25-
26-
KDiff3Path Where KDiff3.exe is located
27-
QuickBmsPath Where quickbms.exe is located
28-
QuickBmsPluginPath Where the witcher3.bms plugin for QuickBMS is located
29-
WccLitePath Where wcc_lite.exe is located
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- ABOUT THE SETTINGS
3+
GameDirectory The Witcher 3 Wild Hunt folder
4+
VanillaScriptsDirectory Where to look for vanilla scripts (default if blank: \GameDirectory\content\content0\scripts)
5+
ModsDirectory Where to look for mod folders (default if blank: \GameDirectory\mods)
6+
7+
CheckScripts Whether to check for mod conflicts in .ws script files
8+
CheckXmlFiles Whether to check for mod conflicts in .xml files
9+
CheckBundleContents Whether to check for mod conflicts in bundle file contents
10+
IgnoreModNames Which mod folders to ignore (separated by commas)
11+
12+
CollapseCustomLoadOrder Whether to auto-collapse conflicts that are resolved by your custom load order
13+
CollapseNotMergeable Whether to auto-collapse conflicts that can't be merged (non-text files)
14+
15+
ValidateMergeSources Whether to prompt to delete merges outdated by changes in mod files
16+
ValidateCustomLoadOrder Whether to detect mods.settings file on refresh & make sure it's configured to load merged files first
17+
18+
ReviewEachMerge Whether to show the text comparison UI for every merge, instead of just ones that aren't auto-solvable
19+
ShowPathsInKDiff3 Whether to show file paths in KDiff3 instead of just Vanilla, modName1, modName2
20+
PlayCompletionSounds Whether to play a sound after merging or packing a bundle
21+
ReportAfterMerge Whether to show a report after merging 2 files, with buttons to open files/directories
22+
ReportAfterPack Whether to show a report after packing a bundle, with list of contents & button to open directory
23+
MergedModName Which mod folder to save merges in (should be 1st alphabetically, so the game loads it before others)
24+
25+
KDiff3Path Where KDiff3.exe is located
26+
QuickBmsPath Where quickbms.exe is located
27+
QuickBmsPluginPath Where the witcher3.bms plugin for QuickBMS is located
28+
WccLitePath Where wcc_lite.exe is located
3029
-->
31-
3230
<configuration>
3331
<appSettings>
3432
<add key="GameDirectory" value="" />
@@ -59,8 +57,21 @@ WccLitePath Where wcc_lite.exe is located
5957
<add key="StartPosTop" value="" />
6058
<add key="StartPosLeft" value="" />
6159
<add key="StartSplitterPosPct" value="" />
60+
<add key="ClientSettingsProvider.ServiceUri" value="" />
6261
</appSettings>
6362
<startup>
64-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
63+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
6564
</startup>
65+
<system.web>
66+
<membership defaultProvider="ClientAuthenticationMembershipProvider">
67+
<providers>
68+
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
69+
</providers>
70+
</membership>
71+
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
72+
<providers>
73+
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
74+
</providers>
75+
</roleManager>
76+
</system.web>
6677
</configuration>
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64+
<xsd:element name="root" msdata:IsDataSet="true">
65+
<xsd:complexType>
66+
<xsd:choice maxOccurs="unbounded">
67+
<xsd:element name="metadata">
68+
<xsd:complexType>
69+
<xsd:sequence>
70+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
71+
</xsd:sequence>
72+
<xsd:attribute name="name" use="required" type="xsd:string" />
73+
<xsd:attribute name="type" type="xsd:string" />
74+
<xsd:attribute name="mimetype" type="xsd:string" />
75+
<xsd:attribute ref="xml:space" />
76+
</xsd:complexType>
77+
</xsd:element>
78+
<xsd:element name="assembly">
79+
<xsd:complexType>
80+
<xsd:attribute name="alias" type="xsd:string" />
81+
<xsd:attribute name="name" type="xsd:string" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
<xsd:element name="data">
85+
<xsd:complexType>
86+
<xsd:sequence>
87+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89+
</xsd:sequence>
90+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93+
<xsd:attribute ref="xml:space" />
94+
</xsd:complexType>
95+
</xsd:element>
96+
<xsd:element name="resheader">
97+
<xsd:complexType>
98+
<xsd:sequence>
99+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100+
</xsd:sequence>
101+
<xsd:attribute name="name" type="xsd:string" use="required" />
102+
</xsd:complexType>
103+
</xsd:element>
104+
</xsd:choice>
105+
</xsd:complexType>
106+
</xsd:element>
107+
</xsd:schema>
108+
<resheader name="resmimetype">
109+
<value>text/microsoft-resx</value>
110+
</resheader>
111+
<resheader name="version">
112+
<value>2.0</value>
113+
</resheader>
114+
<resheader name="reader">
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116+
</resheader>
117+
<resheader name="writer">
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119+
</resheader>
120+
</root>

WitcherScriptMerger/Controls/SMTree.cs

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public class NodeMetadata
5050
// From http://stackoverflow.com/a/10364283/1641069
5151
// Pinvoke:
5252
private const int TVM_SETEXTENDEDSTYLE = 0x1100 + 44;
53-
private const int TVM_GETEXTENDEDSTYLE = 0x1100 + 45;
5453
private const int TVS_EX_DOUBLEBUFFER = 0x0004;
5554
[DllImport("user32.dll")]
5655
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
@@ -256,7 +255,7 @@ void InitializeContextMenu()
256255
{
257256
_contextMenu = new ContextMenuStrip();
258257

259-
ContextOpenRegion = new ToolStripRegion(_contextMenu as ToolStrip, new ToolStripItem[]
258+
ContextOpenRegion = new ToolStripRegion(_contextMenu, new ToolStripItem[]
260259
{
261260
_contextCopyPath,
262261
_contextOpenModFile,
@@ -266,9 +265,9 @@ void InitializeContextMenu()
266265
_contextOpenVanillaFileDir
267266
});
268267

269-
ContextNodeRegion = new ToolStripRegion(_contextMenu as ToolStrip, new ToolStripItem[0]);
268+
ContextNodeRegion = new ToolStripRegion(_contextMenu, new ToolStripItem[0]);
270269

271-
ContextAllRegion = new ToolStripRegion(_contextMenu as ToolStrip, new ToolStripItem[]
270+
ContextAllRegion = new ToolStripRegion(_contextMenu, new ToolStripItem[]
272271
{
273272
_contextAllSeparator,
274273
ContextSelectAll,
@@ -356,9 +355,25 @@ void InitializeContextMenu()
356355
protected void BuildContextMenu()
357356
{
358357
_contextMenu.Items.Clear();
359-
_contextMenu.Items.AddRange(ContextOpenRegion.Items);
360-
_contextMenu.Items.AddRange(ContextNodeRegion.Items);
361-
_contextMenu.Items.AddRange(ContextAllRegion.Items);
358+
359+
// Context Open Region
360+
_contextMenu.Items.AddRange(new[] {
361+
_contextCopyPath,
362+
_contextOpenModFile,
363+
_contextOpenModFileDir,
364+
_contextOpenModBundleDir,
365+
_contextOpenVanillaFile,
366+
_contextOpenVanillaFileDir
367+
});
368+
369+
// Context All Region
370+
_contextMenu.Items.Add(_contextAllSeparator);
371+
_contextMenu.Items.AddRange(new[] {
372+
ContextSelectAll,
373+
ContextDeselectAll,
374+
_contextExpandAll,
375+
_contextCollapseAll
376+
});
362377
}
363378

364379
void ResetContextItemAvailability()

WitcherScriptMerger/Forms/DependencyForm.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,17 @@ void GetUserFileChoice(TextBox txt, string filter)
118118

119119
void lnkKDiff3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
120120
{
121-
Process.Start("http://kdiff3.sourceforge.net/");
121+
Process.Start("cmd", "/c start http://kdiff3.sourceforge.net/");
122122
}
123123

124124
void lnkBms_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
125125
{
126-
Process.Start("http://aluigi.altervista.org/quickbms.htm");
126+
Process.Start("cmd", "/c start http://aluigi.altervista.org/quickbms.htm");
127127
}
128128

129129
void lnkWccLite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
130130
{
131-
Process.Start("http://www.nexusmods.com/witcher3/news/12625/?");
131+
Process.Start("cmd", "/c start http://www.nexusmods.com/witcher3/news/12625/?");
132132
}
133133

134134
#endregion

WitcherScriptMerger/Forms/MainForm.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,8 @@ public void DeleteMerges(IEnumerable<TreeNode> fileNodes)
768768
try
769769
{
770770
File.Delete(filePath);
771-
} catch (Exception exc)
771+
}
772+
catch
772773
{
773774
ShowError(errorMsg);
774775
return;
@@ -781,7 +782,7 @@ public void DeleteMerges(IEnumerable<TreeNode> fileNodes)
781782
{
782783
Directory.Delete(dirPath);
783784
}
784-
catch (Exception exc)
785+
catch
785786
{
786787
ShowError(errorMsg);
787788
return;

WitcherScriptMerger/Forms/MessageBoxManager.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Runtime.InteropServices;
66
using System.Security.Permissions;
77

8-
[assembly: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)]
98
namespace System.Windows.Forms
109
{
1110
class MessageBoxManager
@@ -14,11 +13,7 @@ class MessageBoxManager
1413
private delegate bool EnumChildProc(IntPtr hWnd, IntPtr lParam);
1514

1615
private const int WH_CALLWNDPROCRET = 12;
17-
private const int WM_DESTROY = 0x0002;
1816
private const int WM_INITDIALOG = 0x0110;
19-
private const int WM_TIMER = 0x0113;
20-
private const int WM_USER = 0x400;
21-
private const int DM_GETDEFID = WM_USER + 0;
2217

2318
private const int MBOK = 1;
2419
private const int MBCancel = 2;

WitcherScriptMerger/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ static class Program
2222
static void Main(string[] args)
2323
{
2424
Application.EnableVisualStyles();
25+
Application.SetHighDpiMode(HighDpiMode.SystemAware);
2526
Application.SetCompatibleTextRenderingDefault(false);
2627

2728
if (!Settings.HasConfigFile)
@@ -106,4 +107,4 @@ public static bool TryOpenDirectory(string dirPath)
106107
return true;
107108
}
108109
}
109-
}
110+
}

WitcherScriptMerger/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

WitcherScriptMerger/Properties/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)