Skip to content

Commit

Permalink
Update for 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyman192 committed Jul 19, 2024
1 parent d8f7a9a commit 9b23251
Show file tree
Hide file tree
Showing 2,459 changed files with 23,469 additions and 659,062 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ paket-files/
.cr/
*.manifest

/MBINCompilerTests/Config/*
**/launchSettings.json
/.nuget/

Expand Down
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/Build/Debug/net6.0/MBINCompiler.dll",
"args": [],
"cwd": "${workspaceFolder}/MBINCompiler",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/MBINCompiler.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/MBINCompiler.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/MBINCompiler.sln"
],
"problemMatcher": "$msCompile"
}
]
}
2 changes: 0 additions & 2 deletions MBINCompiler.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.31313.79
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MBINCompiler", "MBINCompiler\MBINCompiler.csproj", "{CE736EF9-7BE9-4FF0-9551-78F0071AA373}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MBINCompilerTests", "MBINCompilerTests\MBINCompilerTests.csproj", "{836B3A35-C1EA-47C8-B3AB-59C0E2E0C763}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "libMBIN-Shared", "libMBIN\libMBIN-Shared.shproj", "{B6850F17-D8FD-48DE-9CF2-240F1BA87236}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "libMBIN-DLL", "libMBIN-DLL\libMBIN-DLL.csproj", "{F2D295A6-D082-4EB4-8FC9-F4687F674939}"
Expand Down
2 changes: 0 additions & 2 deletions MBINCompiler/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@
// To Update the version, see libMBIN.Version.VERSION.STRING.
[assembly: AssemblyVersion( libMBIN.Version.VERSION_STRING )]
[assembly: AssemblyFileVersion( libMBIN.Version.VERSION_STRING )]

[assembly: InternalsVisibleTo("MBINCompilerTests")]
2 changes: 1 addition & 1 deletion MBINCompiler/Source/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static int ShowException( Exception e, bool wait=true ) {
}

public static string GetFileInfo( MBINFile mbin ) {
return $"MBIN\tversion:\t{mbin.Header.GetMBINVersion()}\tguid:\t{mbin.Header.TemplateGUID:X}\ttemplate:\t{mbin.Header.TemplateName}";
return $"MBIN\tversion:\t{mbin.Header.GetMBINVersion()}\tguid:\t{mbin.Header.TemplateGUID:X}\ttemplate:\t{mbin.Header.GetXMLTemplateName()}";
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion MBINCompiler/Source/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class OptionBackers
public static FormatType optOutputFormat = FormatType.Unknown;
public static List<string> optIncludeFilters = null;
public static List<string> optExcludeFilters = null;
public static HeaderFormat optFormatVersion = HeaderFormat.V3;
public static HeaderFormat optFormatVersion = HeaderFormat.V4;
public static bool optUseThreads = true;
}

Expand Down
4 changes: 3 additions & 1 deletion MBINCompiler/Source/Commands/Convert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ public static void ConvertFile( string inputPath, string fileIn, string fileOut,
/// <returns>fileOut</returns>
private static string ConvertMBIN( string inputPath, FileStream fIn, MemoryStream msOut, string fileOut ) {
var mbin = new MBINFile( fIn );
if ( !(mbin.Load() && mbin.Header.IsValid) ) throw new InvalidDataException( "Not a valid MBIN file!" );
if (!mbin.Load()) throw new InvalidDataException( "Cannot load MBIN file!" );
if ( !mbin.Header.IsValid ) throw new InvalidDataException( "Not a valid MBIN file!" );

var type = NMSTemplate.GetTemplateType( mbin.Header.GetXMLTemplateName() );
var nms = (NMSAttribute) (type.GetCustomAttributes( typeof( NMSAttribute ), false )?[0] ?? null);
Expand Down Expand Up @@ -259,6 +260,7 @@ private static string ConvertEXML( string inputPath, FileStream fIn, MemoryStrea
mbin.SetData( data );
mbin.Save();
} catch ( Exception e ) {
Console.WriteLine($"ERR INFO: {e.StackTrace}");
throw new ExmlException( e, fIn.Name, data );
}

Expand Down
41 changes: 0 additions & 41 deletions MBINCompilerTests/Config/default.runsettings

This file was deleted.

Loading

0 comments on commit 9b23251

Please sign in to comment.