Skip to content

Commit 1c4d42b

Browse files
Merge pull request #1 from UselessBullets/next-bta
Converted to BTAExplorer
2 parents 15b1b28 + 82884cf commit 1c4d42b

32 files changed

Lines changed: 166 additions & 401 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ obj
44
*.user
55
*.cache
66
*.userprefs
7+
*.vs
78
Staging/
89
UpgradeLog*.htm

NBTExplorer.Installer/NBTExplorer.Installer.wixproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ProductVersion>3.8</ProductVersion>
77
<ProjectGuid>a1566071-7cbb-4c54-aae1-4b81b7715db3</ProjectGuid>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<OutputName>NBTExplorer</OutputName>
9+
<OutputName>BTAExplorer</OutputName>
1010
<OutputType>Package</OutputType>
1111
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
1212
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

NBTExplorer.sln

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.23107.0
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.11.35327.3
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorer", "NBTExplorer\NBTExplorer.csproj", "{8A458245-8176-4599-95CD-3CA39F2435CE}"
77
EndProject
@@ -16,7 +16,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTUtil", "NBTUtil\NBTUtil.
1616
EndProject
1717
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTModel", "NBTModel\NBTModel.csproj", "{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}"
1818
EndProject
19-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Substrate (NET2)", "..\Substrate\SubstrateCS\Substrate (NET2).csproj", "{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}"
19+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Substrate (NET4)", "..\Substrate\SubstrateCS\Substrate (NET4).csproj", "{7264A1C4-AB4A-4437-B252-7379B98B5509}"
2020
EndProject
2121
Global
2222
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -95,24 +95,24 @@ Global
9595
{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
9696
{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}.Release|x86.ActiveCfg = Release|Any CPU
9797
{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}.Release|x86.Build.0 = Release|Any CPU
98-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
99-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Any CPU.Build.0 = Release|Any CPU
100-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
101-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
102-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|x86.ActiveCfg = Release|Any CPU
103-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|x86.Build.0 = Release|Any CPU
104-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
105-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
106-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
107-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
108-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|x86.ActiveCfg = Debug|Any CPU
109-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|x86.Build.0 = Debug|Any CPU
110-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
111-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Any CPU.Build.0 = Release|Any CPU
112-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
113-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
114-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|x86.ActiveCfg = Release|Any CPU
115-
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|x86.Build.0 = Release|Any CPU
98+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
99+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.AppStore|Any CPU.Build.0 = Debug|Any CPU
100+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.AppStore|Mixed Platforms.ActiveCfg = Debug|Any CPU
101+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.AppStore|Mixed Platforms.Build.0 = Debug|Any CPU
102+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.AppStore|x86.ActiveCfg = Debug|Any CPU
103+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.AppStore|x86.Build.0 = Debug|Any CPU
104+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
105+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Debug|Any CPU.Build.0 = Debug|Any CPU
106+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
107+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
108+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Debug|x86.ActiveCfg = Debug|Any CPU
109+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Debug|x86.Build.0 = Debug|Any CPU
110+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Release|Any CPU.ActiveCfg = Release|Any CPU
111+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Release|Any CPU.Build.0 = Release|Any CPU
112+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
113+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Release|Mixed Platforms.Build.0 = Release|Any CPU
114+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Release|x86.ActiveCfg = Release|Any CPU
115+
{7264A1C4-AB4A-4437-B252-7379B98B5509}.Release|x86.Build.0 = Release|Any CPU
116116
EndGlobalSection
117117
GlobalSection(SolutionProperties) = preSolution
118118
HideSolutionNode = FALSE

NBTExplorer/Controllers/NodeTreeController.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ private void InitializeIconRegistry ()
765765
_iconRegistry.Register(typeof(TagShortArrayDataNode), 16);
766766
_iconRegistry.Register(typeof(TagLongArrayDataNode), 17);
767767
_iconRegistry.Register(typeof(RootDataNode), 18);
768+
_iconRegistry.Register(typeof(TagDoubleArrayDataNode), 19);
768769
}
769770

770771
private void UpdateNodeText (TreeNode node)
@@ -963,6 +964,11 @@ public static bool CreateLongArrayNodePred (DataNode dataNode, out GroupCapabili
963964
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LONG_ARRAY);
964965
}
965966

967+
public static bool CreateDoubleArrayNodePred(DataNode dataNode, out GroupCapabilities caps) {
968+
caps = GroupCapabilities.Single;
969+
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_DOUBLE_ARRAY);
970+
}
971+
966972
public static bool CreateStringNodePred (DataNode dataNode, out GroupCapabilities caps)
967973
{
968974
caps = GroupCapabilities.Single;

NBTExplorer/NBTExplorer.csproj

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -9,8 +9,8 @@
99
<OutputType>WinExe</OutputType>
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>NBTExplorer</RootNamespace>
12-
<AssemblyName>NBTExplorer</AssemblyName>
13-
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
12+
<AssemblyName>BTAExplorer</AssemblyName>
13+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<IsWebBootstrapper>false</IsWebBootstrapper>
1616
<PublishUrl>publish\</PublishUrl>
@@ -27,6 +27,7 @@
2727
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
2828
<UseApplicationTrust>false</UseApplicationTrust>
2929
<BootstrapperEnabled>true</BootstrapperEnabled>
30+
<TargetFrameworkProfile />
3031
</PropertyGroup>
3132
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
3233
<PlatformTarget>x86</PlatformTarget>
@@ -37,6 +38,7 @@
3738
<DefineConstants>DEBUG;TRACE</DefineConstants>
3839
<ErrorReport>prompt</ErrorReport>
3940
<WarningLevel>4</WarningLevel>
41+
<Prefer32Bit>false</Prefer32Bit>
4042
</PropertyGroup>
4143
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
4244
<PlatformTarget>x86</PlatformTarget>
@@ -46,9 +48,10 @@
4648
<DefineConstants>TRACE</DefineConstants>
4749
<ErrorReport>prompt</ErrorReport>
4850
<WarningLevel>4</WarningLevel>
51+
<Prefer32Bit>false</Prefer32Bit>
4952
</PropertyGroup>
5053
<PropertyGroup>
51-
<ApplicationIcon>dead_bush.ico</ApplicationIcon>
54+
<ApplicationIcon>spinifex.ico</ApplicationIcon>
5255
</PropertyGroup>
5356
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
5457
<DebugSymbols>True</DebugSymbols>
@@ -67,6 +70,7 @@
6770
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
6871
<WarningLevel>4</WarningLevel>
6972
<Optimize>False</Optimize>
73+
<Prefer32Bit>false</Prefer32Bit>
7074
</PropertyGroup>
7175
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
7276
<OutputPath>bin\Release\</OutputPath>
@@ -83,13 +87,15 @@
8387
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
8488
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
8589
<WarningLevel>4</WarningLevel>
90+
<Prefer32Bit>false</Prefer32Bit>
8691
</PropertyGroup>
8792
<PropertyGroup>
8893
<StartupObject />
8994
</PropertyGroup>
9095
<ItemGroup>
91-
<Reference Include="Substrate">
92-
<HintPath>..\References\Substrate.dll</HintPath>
96+
<Reference Include="Substrate-BTA, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
97+
<SpecificVersion>False</SpecificVersion>
98+
<HintPath>..\References\Substrate-BTA.dll</HintPath>
9399
</Reference>
94100
<Reference Include="System" />
95101
<Reference Include="System.Data" />
@@ -240,6 +246,7 @@
240246
</EmbeddedResource>
241247
<EmbeddedResource Include="Windows\About.resx">
242248
<DependentUpon>About.cs</DependentUpon>
249+
<SubType>Designer</SubType>
243250
</EmbeddedResource>
244251
<EmbeddedResource Include="Windows\EditName.resx">
245252
<DependentUpon>EditName.cs</DependentUpon>
@@ -286,13 +293,13 @@
286293
</None>
287294
</ItemGroup>
288295
<ItemGroup>
289-
<Content Include="dead_bush.ico" />
290296
<None Include="Properties\Settings.settings">
291297
<Generator>SettingsSingleFileGenerator</Generator>
292298
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
293299
</None>
294300
<None Include="Resources\arrow-090.png" />
295301
<None Include="Resources\arrow-270.png" />
302+
<Content Include="spinifex.ico" />
296303
<Content Include="Windows\NBTExplorer.visualelementsmanifest.xml" />
297304
<Content Include="Vendor\Be.Windows.Forms.HexBox\HexBox.bmp" />
298305
</ItemGroup>

NBTExplorer/Program.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,30 +51,30 @@ private static void AppDomainFailureHandler (object sender, UnhandledExceptionEv
5151
if (e.ExceptionObject is Exception)
5252
ProcessException(e.ExceptionObject as Exception);
5353
else if (e.IsTerminating) {
54-
MessageBox.Show("NBTExplorer encountered an unknown exception object: " + e.ExceptionObject.GetType().FullName,
55-
"NBTExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
54+
MessageBox.Show("BTAExplorer encountered an unknown exception object: " + e.ExceptionObject.GetType().FullName,
55+
"BTAExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
5656
Application.Exit();
5757
}
5858
}
5959

6060
private static void ProcessException (Exception ex)
6161
{
6262
if (IsMissingSubstrate(ex)) {
63-
MessageBox.Show("NBTExplorer could not find required assembly \"Substrate.dll\".\n\nIf you obtained NBTExplorer from a ZIP distribution, make sure you've extracted NBTExplorer and all of its supporting files into another directory before running it.",
64-
"NBTExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
63+
MessageBox.Show("BTAExplorer could not find required assembly \"Substrate-BTA.dll\".\n\nIf you obtained BTAExplorer from a ZIP distribution, make sure you've extracted BTAExplorer and all of its supporting files into another directory before running it.",
64+
"BTAExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
6565
Application.Exit();
6666
return;
6767
}
6868

6969
if (IsMissingNBTModel(ex)) {
70-
MessageBox.Show("NBTExplorer could not find required assembly \"NBTModel.dll\".\n\nIf you obtained NBTExplorer from a ZIP distribution, make sure you've extracted NBTExplorer and all of its supporting files into another directory before running it.",
71-
"NBTExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
70+
MessageBox.Show("BTAExplorer could not find required assembly \"NBTModel.dll\".\n\nIf you obtained BTAExplorer from a ZIP distribution, make sure you've extracted BTAExplorer and all of its supporting files into another directory before running it.",
71+
"BTAExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
7272
Application.Exit();
7373
return;
7474
}
7575

7676
StringBuilder errorText = new StringBuilder();
77-
errorText.AppendLine("NBTExplorer encountered the following exception while trying to run: " + ex.GetType().Name);
77+
errorText.AppendLine("BTAExplorer encountered the following exception while trying to run: " + ex.GetType().Name);
7878
errorText.AppendLine("Message: " + ex.Message);
7979

8080
Exception ix = ex;
@@ -86,13 +86,13 @@ private static void ProcessException (Exception ex)
8686
}
8787

8888
try {
89-
string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "NBTExplorer");
89+
string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "BTAExplorer");
9090
if (!Directory.Exists(logDir))
9191
Directory.CreateDirectory(logDir);
9292

9393
string logPath = Path.Combine(logDir, "error.log");
9494
using (var writer = new StreamWriter(logPath, true)) {
95-
writer.WriteLine("NBTExplorer Error Report");
95+
writer.WriteLine("BTAExplorer Error Report");
9696
writer.WriteLine(DateTime.Now);
9797
writer.WriteLine("-------");
9898
writer.WriteLine(errorText);
@@ -113,7 +113,7 @@ private static void ProcessException (Exception ex)
113113
}
114114
catch { }
115115

116-
MessageBox.Show(errorText.ToString(), "NBTExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
116+
MessageBox.Show(errorText.ToString(), "BTAExplorer failed to run", MessageBoxButtons.OK, MessageBoxIcon.Error);
117117
Application.Exit();
118118
}
119119

NBTExplorer/Properties/AssemblyInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("NBTExplorer")]
9-
[assembly: AssemblyDescription("Graphical editor for most NBT data sources. NBT is used by Minecraft.")]
8+
[assembly: AssemblyTitle("BTAExplorer")]
9+
[assembly: AssemblyDescription("Graphical editor for most BTA NBT data sources. NBT is used by Minecraft.")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("NBTExplorer")]
13-
[assembly: AssemblyCopyright("Copyright © Justin Aquadro 2011-2017")]
12+
[assembly: AssemblyProduct("BTAExplorer")]
13+
[assembly: AssemblyCopyright("Copyright © Useless 2024")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.8.0.0")]
36-
[assembly: AssemblyFileVersion("2.8.0.0")]
35+
[assembly: AssemblyVersion("3.0.0.0")]
36+
[assembly: AssemblyFileVersion("3.0.0.0")]

NBTExplorer/Properties/Resources.Designer.cs

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

NBTExplorer/Properties/Settings.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.
-693 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)