From 872347e95af9230fbb6ef12f2b8b2c3c3f489d28 Mon Sep 17 00:00:00 2001 From: Mikko Uuksulainen Date: Mon, 9 Jan 2023 18:58:13 +0000 Subject: [PATCH] Upgrade to .NET 6.0 --- .gitignore | 210 ++---------------- README.MD | 13 +- RPGMakerDecrypter.Cli/CommandLineOptions.cs | 25 +-- RPGMakerDecrypter.Cli/Program.cs | 22 +- .../Properties/AssemblyInfo.cs | 35 --- .../RPGMakerDecrypter.Cli.csproj | 76 +------ RPGMakerDecrypter.Cli/packages.config | 4 - .../Properties/AssemblyInfo.cs | 35 --- .../RPGMakerDecrypter.Decrypter.csproj | 79 ++----- RPGMakerDecrypter.Gui/AboutBox.Designer.cs | 39 ++-- RPGMakerDecrypter.Gui/AboutBox.resx | 64 +----- RPGMakerDecrypter.Gui/Program.cs | 1 + .../Properties/AssemblyInfo.cs | 35 --- .../Properties/Resources.Designer.cs | 44 ++-- .../Properties/Settings.Designer.cs | 22 +- .../RPGMakerDecrypter.Gui.csproj | 116 ++-------- RPGMakerDecrypter.Tests/BinaryUtilsTests.cs | 24 +- RPGMakerDecrypter.Tests/FileHelpers.cs | 6 +- .../Properties/AssemblyInfo.cs | 36 --- RPGMakerDecrypter.Tests/RGSSADv1Tests.cs | 71 +++--- RPGMakerDecrypter.Tests/RGSSADv3Tests.cs | 39 ++-- .../RPGMakerDecrypter.Tests.csproj | 131 ++++------- RPGMakerDecrypter.sln | 7 +- screenshots/gui1.png | Bin 0 -> 7646 bytes 24 files changed, 247 insertions(+), 887 deletions(-) delete mode 100644 RPGMakerDecrypter.Cli/Properties/AssemblyInfo.cs delete mode 100644 RPGMakerDecrypter.Cli/packages.config delete mode 100644 RPGMakerDecrypter.Decrypter/Properties/AssemblyInfo.cs delete mode 100644 RPGMakerDecrypter.Gui/Properties/AssemblyInfo.cs delete mode 100644 RPGMakerDecrypter.Tests/Properties/AssemblyInfo.cs create mode 100755 screenshots/gui1.png diff --git a/.gitignore b/.gitignore index b06e864..68e9879 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,15 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. +*.swp +*.*~ +project.lock.json +.DS_Store +*.pyc +nupkg/ + +# Visual Studio Code +.vscode + +# Rider +.idea # User-specific files *.suo @@ -7,9 +17,6 @@ *.userosscache *.sln.docstates -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - # Build results [Dd]ebug/ [Dd]ebugPublic/ @@ -21,192 +28,13 @@ build/ bld/ [Bb]in/ [Oo]bj/ +[Oo]ut/ +msbuild.log +msbuild.err +msbuild.wrn -# Visual Studio 2015 cache/options directory +# Visual Studio 2015 .vs/ -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -## TODO: Comment the next line if you want to checkin your -## web deploy settings but do note that will include unencrypted -## passwords -#*.pubxml - -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ -orleans.codegen.cs - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# LightSwitch generated files -GeneratedArtifacts/ -_Pvt_Extensions/ -ModelManifest.xml +packages/ +launchSettings.json \ No newline at end of file diff --git a/README.MD b/README.MD index 9681d5c..001e062 100644 --- a/README.MD +++ b/README.MD @@ -5,8 +5,7 @@ Software can also generate correct type project file for decrypted data. ## Usage -RPG Maker Decrypter has Windows application and cli application which both provide same functionality -but with different interface. +RPG Maker Decrypter has a Windows application and a cli application which both provide the same functionality but with different interface. ### RPG Maker Decrypter CLI @@ -32,15 +31,17 @@ Using Windows application is more straightforward. Open RGASSAD file by using Fi If you want to extract single files, select file from list and press extract under file name and size. +![Screenshots of the GUI application](/screenshots/gui1.png) + ## Requirements -* .NET Framework 4.5.2 +* GUI version works only on Windows, CLI version works with any platform .NET 6.0 targets. +* .NET Runtime is not required for prebuilt binaries on selected platforms as it is packaged in the executable. ## Binaries -Latest builds can be found from [here](http://uuksu.fi/other/RPGMakerDecrypter). +Prebuilt binaries are available for selected platforms. See [Releases](https://github.com/uuksu/RPGMakerDecrypter/releases). ## Building -RPGMakerDecrypter will compile with Visual Studio 2015. Output deployment package can be created by running deploy.bat script -from Deploy folder. +RPGMakerDecrypter will compile with .NET 6.0 SDK. \ No newline at end of file diff --git a/RPGMakerDecrypter.Cli/CommandLineOptions.cs b/RPGMakerDecrypter.Cli/CommandLineOptions.cs index 89df4d6..c4b016c 100644 --- a/RPGMakerDecrypter.Cli/CommandLineOptions.cs +++ b/RPGMakerDecrypter.Cli/CommandLineOptions.cs @@ -12,34 +12,13 @@ namespace RPGMakerDecrypter.Cli { class CommandLineOptions { - [ValueList(typeof(List), MaximumElements = 1)] - public IList InputPaths { get; set; } + [Value(0, Required = true, HelpText = "Path to the RGSSAD file.")] + public string InputPath { get; set; } [Option('o', "output", Required = false, HelpText = "Optional output directory path.")] public string OutputDirectoryPath { get; set; } [Option('p', "project-file", Required = false, HelpText = "If set to true then generates project file.")] public bool GenerateProjectFile { get; set; } - - [HelpOption] - public string GetUsage() - { - Assembly entryAssembly = Assembly.GetEntryAssembly(); - FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(entryAssembly.Location); - - HelpText help = new HelpText - { - Heading = new HeadingInfo("RPG Maker Decrypter", fvi.FileVersion), - Copyright = new CopyrightInfo("Mikko Uuksulainen", 2015), - AdditionalNewLineAfterOption = true, - AddDashesToOption = true - }; - - help.AddPreOptionsLine(Environment.NewLine); - help.AddPreOptionsLine("Usage: RPGMakerDecrypter-cli [options]"); - help.AddOptions(this); - - return help; - } } } diff --git a/RPGMakerDecrypter.Cli/Program.cs b/RPGMakerDecrypter.Cli/Program.cs index cd4ec20..543940a 100644 --- a/RPGMakerDecrypter.Cli/Program.cs +++ b/RPGMakerDecrypter.Cli/Program.cs @@ -10,26 +10,21 @@ namespace RPGMakerDecrypter.Cli { - class Program + static class Program { private static CommandLineOptions _commandLineOptions; static void Main(string[] args) { - _commandLineOptions = new CommandLineOptions(); + var parsedResult = Parser.Default.ParseArguments(args); + _commandLineOptions = parsedResult.Value; - if (Parser.Default.ParseArguments(args, _commandLineOptions) == false) + if (parsedResult.Errors.Any()) { Environment.Exit(1); } - if (_commandLineOptions.InputPaths.Count == 0) - { - Console.WriteLine(_commandLineOptions.GetUsage()); - Environment.Exit(1); - } - - RPGMakerVersion version = RGSSAD.GetVersion(_commandLineOptions.InputPaths.First()); + RPGMakerVersion version = RGSSAD.GetVersion(_commandLineOptions.InputPath); if (version == RPGMakerVersion.Invalid) { @@ -45,7 +40,7 @@ static void Main(string[] args) } else { - FileInfo fi = new FileInfo(_commandLineOptions.InputPaths.First()); + FileInfo fi = new FileInfo(_commandLineOptions.InputPath); outputDirectoryPath = fi.DirectoryName; } @@ -55,11 +50,11 @@ static void Main(string[] args) { case RPGMakerVersion.Xp: case RPGMakerVersion.Vx: - RGSSADv1 rgssadv1 = new RGSSADv1(_commandLineOptions.InputPaths.First()); + RGSSADv1 rgssadv1 = new RGSSADv1(_commandLineOptions.InputPath); rgssadv1.ExtractAllFiles(outputDirectoryPath); break; case RPGMakerVersion.VxAce: - RGSSADv3 rgssadv2 = new RGSSADv3(_commandLineOptions.InputPaths.First()); + RGSSADv3 rgssadv2 = new RGSSADv3(_commandLineOptions.InputPath); rgssadv2.ExtractAllFiles(outputDirectoryPath); break; } @@ -80,7 +75,6 @@ static void Main(string[] args) Environment.Exit(1); } - if (_commandLineOptions.GenerateProjectFile) { ProjectGenerator.GenerateProject(version, outputDirectoryPath); diff --git a/RPGMakerDecrypter.Cli/Properties/AssemblyInfo.cs b/RPGMakerDecrypter.Cli/Properties/AssemblyInfo.cs deleted file mode 100644 index 806bcf0..0000000 --- a/RPGMakerDecrypter.Cli/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RPGMakerDecrypter.Cli")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("RPGMakerDecrypter.Cli")] -[assembly: AssemblyCopyright("Copyright © Mikko Uuksulainen 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d03bc34b-eeb1-4a26-b4fb-190ce153e06a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] diff --git a/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj b/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj index 6b71824..74c3d91 100644 --- a/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj +++ b/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj @@ -1,78 +1,26 @@ - - - + - Debug - AnyCPU - {D03BC34B-EEB1-4A26-B4FB-190CE153E06A} + net6.0 Exe - Properties - RPGMakerDecrypter.Cli RPGMakerDecrypter-cli - v4.5.2 - 512 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + true icon_256x256_cli.ico + RPG Maker Decrypter + RPG Maker Decrypter + Tool for decrypting RPG Maker XP, VX and VX Ace RGSSAD archives. + Mikko Uuksulainen © 2015-2023 + https://github.com/uuksu/RPGMakerDecrypter + 2.0.0 - - ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll - True - - - - - - - - - - - - - - + - - - - - - {baeee442-1888-4340-94be-fe743c696ae1} - RPGMakerDecrypter.Decrypter - + - + - - \ No newline at end of file diff --git a/RPGMakerDecrypter.Cli/packages.config b/RPGMakerDecrypter.Cli/packages.config deleted file mode 100644 index e1a8737..0000000 --- a/RPGMakerDecrypter.Cli/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/RPGMakerDecrypter.Decrypter/Properties/AssemblyInfo.cs b/RPGMakerDecrypter.Decrypter/Properties/AssemblyInfo.cs deleted file mode 100644 index ddef34a..0000000 --- a/RPGMakerDecrypter.Decrypter/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RPGMakerDecrypter.Decrypter")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("RPGMakerDecrypter.Decrypter")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("baeee442-1888-4340-94be-fe743c696ae1")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] diff --git a/RPGMakerDecrypter.Decrypter/RPGMakerDecrypter.Decrypter.csproj b/RPGMakerDecrypter.Decrypter/RPGMakerDecrypter.Decrypter.csproj index 2285fb6..2bb2887 100644 --- a/RPGMakerDecrypter.Decrypter/RPGMakerDecrypter.Decrypter.csproj +++ b/RPGMakerDecrypter.Decrypter/RPGMakerDecrypter.Decrypter.csproj @@ -1,63 +1,16 @@ - - - - - Debug - AnyCPU - {BAEEE442-1888-4340-94BE-FE743C696AE1} - Library - Properties - RPGMakerDecrypter.Decrypter - RPGMakerDecrypter.Decrypter - v4.5.2 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + netstandard2.0 + + + + RPG Maker Decrypter + RPG Maker Decrypter + Tool for decrypting RPG Maker XP, VX and VX Ace RGSSAD archives. + Mikko Uuksulainen © 2015-2023 + https://github.com/uuksu/RPGMakerDecrypter + 2.0.0 + + + diff --git a/RPGMakerDecrypter.Gui/AboutBox.Designer.cs b/RPGMakerDecrypter.Gui/AboutBox.Designer.cs index b2085f0..c9c967c 100644 --- a/RPGMakerDecrypter.Gui/AboutBox.Designer.cs +++ b/RPGMakerDecrypter.Gui/AboutBox.Designer.cs @@ -45,35 +45,36 @@ private void InitializeComponent() this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 0, 2); this.tableLayoutPanel.Controls.Add(this.okButton, 0, 3); this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); + this.tableLayoutPanel.Location = new System.Drawing.Point(10, 10); + this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.tableLayoutPanel.Name = "tableLayoutPanel"; this.tableLayoutPanel.RowCount = 4; this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.42236F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.04348F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 62.11181F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.42236F)); - this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265); + this.tableLayoutPanel.Size = new System.Drawing.Size(487, 307); this.tableLayoutPanel.TabIndex = 0; // // versionLabel // this.versionLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.versionLabel.Location = new System.Drawing.Point(6, 32); - this.versionLabel.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); - this.versionLabel.MaximumSize = new System.Drawing.Size(0, 17); + this.versionLabel.Location = new System.Drawing.Point(7, 38); + this.versionLabel.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0); + this.versionLabel.MaximumSize = new System.Drawing.Size(0, 20); this.versionLabel.Name = "versionLabel"; - this.versionLabel.Size = new System.Drawing.Size(408, 17); + this.versionLabel.Size = new System.Drawing.Size(476, 20); this.versionLabel.TabIndex = 25; this.versionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // labelProductName // this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelProductName.Location = new System.Drawing.Point(6, 0); - this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); - this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); + this.labelProductName.Location = new System.Drawing.Point(7, 0); + this.labelProductName.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0); + this.labelProductName.MaximumSize = new System.Drawing.Size(0, 20); this.labelProductName.Name = "labelProductName"; - this.labelProductName.Size = new System.Drawing.Size(408, 17); + this.labelProductName.Size = new System.Drawing.Size(476, 20); this.labelProductName.TabIndex = 19; this.labelProductName.Text = "RPG Maker Decrypter"; this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -81,13 +82,13 @@ private void InitializeComponent() // textBoxDescription // this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxDescription.Location = new System.Drawing.Point(6, 69); - this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.textBoxDescription.Location = new System.Drawing.Point(7, 81); + this.textBoxDescription.Margin = new System.Windows.Forms.Padding(7, 3, 4, 3); this.textBoxDescription.Multiline = true; this.textBoxDescription.Name = "textBoxDescription"; this.textBoxDescription.ReadOnly = true; this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.textBoxDescription.Size = new System.Drawing.Size(408, 158); + this.textBoxDescription.Size = new System.Drawing.Size(476, 184); this.textBoxDescription.TabIndex = 23; this.textBoxDescription.TabStop = false; this.textBoxDescription.Text = resources.GetString("textBoxDescription.Text"); @@ -96,24 +97,26 @@ private void InitializeComponent() // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.okButton.Location = new System.Drawing.Point(339, 239); + this.okButton.Location = new System.Drawing.Point(395, 277); + this.okButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.Size = new System.Drawing.Size(88, 27); this.okButton.TabIndex = 24; this.okButton.Text = "&OK"; // // AboutBox // this.AcceptButton = this.okButton; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(435, 283); + this.ClientSize = new System.Drawing.Size(507, 327); this.Controls.Add(this.tableLayoutPanel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AboutBox"; - this.Padding = new System.Windows.Forms.Padding(9); + this.Padding = new System.Windows.Forms.Padding(10); this.ShowIcon = false; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; diff --git a/RPGMakerDecrypter.Gui/AboutBox.resx b/RPGMakerDecrypter.Gui/AboutBox.resx index 5744f91..4ef4f0e 100644 --- a/RPGMakerDecrypter.Gui/AboutBox.resx +++ b/RPGMakerDecrypter.Gui/AboutBox.resx @@ -1,64 +1,4 @@ - - - + @@ -120,7 +60,7 @@ The MIT License (MIT) -Copyright (c) 2016 Mikko Uuksulainen +Copyright (c) 2015-2023 Mikko Uuksulainen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/RPGMakerDecrypter.Gui/Program.cs b/RPGMakerDecrypter.Gui/Program.cs index 09a864b..bb9faac 100644 --- a/RPGMakerDecrypter.Gui/Program.cs +++ b/RPGMakerDecrypter.Gui/Program.cs @@ -15,6 +15,7 @@ static class Program static void Main() { Application.EnableVisualStyles(); + Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); } diff --git a/RPGMakerDecrypter.Gui/Properties/AssemblyInfo.cs b/RPGMakerDecrypter.Gui/Properties/AssemblyInfo.cs deleted file mode 100644 index 4fe4963..0000000 --- a/RPGMakerDecrypter.Gui/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RPGMakerDecrypter.Gui")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("RPGMakerDecrypter.Gui")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3baa8c8a-0af9-483b-9581-bce2bfd44262")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] diff --git a/RPGMakerDecrypter.Gui/Properties/Resources.Designer.cs b/RPGMakerDecrypter.Gui/Properties/Resources.Designer.cs index 68e5d25..67dffec 100644 --- a/RPGMakerDecrypter.Gui/Properties/Resources.Designer.cs +++ b/RPGMakerDecrypter.Gui/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace RPGMakerDecrypter.Gui.Properties -{ - - +namespace RPGMakerDecrypter.Gui.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace RPGMakerDecrypter.Gui.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RPGMakerDecrypter.Gui.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/RPGMakerDecrypter.Gui/Properties/Settings.Designer.cs b/RPGMakerDecrypter.Gui/Properties/Settings.Designer.cs index 218b3ee..bf737c1 100644 --- a/RPGMakerDecrypter.Gui/Properties/Settings.Designer.cs +++ b/RPGMakerDecrypter.Gui/Properties/Settings.Designer.cs @@ -8,21 +8,17 @@ // //------------------------------------------------------------------------------ -namespace RPGMakerDecrypter.Gui.Properties -{ - - +namespace RPGMakerDecrypter.Gui.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", "17.3.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; } } diff --git a/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj b/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj index cd72cd8..03d12b4 100644 --- a/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj +++ b/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj @@ -1,111 +1,33 @@ - - - + - Debug - AnyCPU - {3BAA8C8A-0AF9-483B-9581-BCE2BFD44262} + net6.0-windows WinExe - Properties - RPGMakerDecrypter.Gui RPGMakerDecrypter - v4.5.2 - 512 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + true + true + true icon_256x256.ico + RPG Maker Decrypter + RPG Maker Decrypter + Tool for decrypting RPG Maker XP, VX and VX Ace RGSSAD archives. + Mikko Uuksulainen © 2015-2023 + https://github.com/uuksu/RPGMakerDecrypter + 2.0.0 - - - - - - - - - - - - - - - Form - - - MainForm.cs - - - - - MainForm.cs - - - Form - - - AboutBox.cs - - - AboutBox.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - + - - - - - {baeee442-1888-4340-94be-fe743c696ae1} - RPGMakerDecrypter.Decrypter - + - + + + + all + + - - \ No newline at end of file diff --git a/RPGMakerDecrypter.Tests/BinaryUtilsTests.cs b/RPGMakerDecrypter.Tests/BinaryUtilsTests.cs index 2508794..ed27bc6 100644 --- a/RPGMakerDecrypter.Tests/BinaryUtilsTests.cs +++ b/RPGMakerDecrypter.Tests/BinaryUtilsTests.cs @@ -1,15 +1,15 @@ using System; using System.IO; using System.Security.AccessControl; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using NUnit; +using NUnit.Framework; using RPGMakerDecrypter.Decrypter; namespace RPGMakerDecrypter.Tests { - [TestClass] public class BinaryUtilsTests { - [TestMethod] + [Test] public void RPGMakerXpArchiveVersionIsOne() { FileHelpers.CopyArchives(); @@ -19,13 +19,13 @@ public void RPGMakerXpArchiveVersionIsOne() string s = BinaryUtils.ReadCString(binaryReader, 7); byte version = binaryReader.ReadByte(); - Assert.AreEqual(1, version); + Assert.That(version, Is.EqualTo(1)); } FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void RPGMakerVxArchiveVersionIsOne() { FileHelpers.CopyArchives(); @@ -35,13 +35,13 @@ public void RPGMakerVxArchiveVersionIsOne() string s = BinaryUtils.ReadCString(binaryReader, 7); byte version = binaryReader.ReadByte(); - Assert.AreEqual(1, version); + Assert.That(version, Is.EqualTo(1)); } FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void RPGMakerVxAceArchiveVersionIsThree() { FileHelpers.CopyArchives(); @@ -51,13 +51,13 @@ public void RPGMakerVxAceArchiveVersionIsThree() string s = BinaryUtils.ReadCString(binaryReader, 7); byte version = binaryReader.ReadByte(); - Assert.AreEqual(3, version); + Assert.That(version, Is.EqualTo(3)); } FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void ReadCStringReturnsCorrectHeaderForArchives() { FileHelpers.CopyArchives(); @@ -65,19 +65,19 @@ public void ReadCStringReturnsCorrectHeaderForArchives() using (BinaryReader binaryReader = new BinaryReader(new FileStream(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerXpArchiveName), FileMode.Open))) { string s = BinaryUtils.ReadCString(binaryReader, 7); - Assert.AreEqual(Constants.RGSSADHeader, s); + Assert.That(s, Is.EqualTo(Constants.RGSSADHeader)); } using (BinaryReader binaryReader = new BinaryReader(new FileStream(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxArchiveName), FileMode.Open))) { string s = BinaryUtils.ReadCString(binaryReader, 7); - Assert.AreEqual(Constants.RGSSADHeader, s); + Assert.That(s, Is.EqualTo(Constants.RGSSADHeader)); } using (BinaryReader binaryReader = new BinaryReader(new FileStream(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxAceArchiveName), FileMode.Open))) { string s = BinaryUtils.ReadCString(binaryReader, 7); - Assert.AreEqual(Constants.RGSSADHeader, s); + Assert.That(s, Is.EqualTo(Constants.RGSSADHeader)); } FileHelpers.Cleanup(); diff --git a/RPGMakerDecrypter.Tests/FileHelpers.cs b/RPGMakerDecrypter.Tests/FileHelpers.cs index 7f07d2d..f2d0f77 100644 --- a/RPGMakerDecrypter.Tests/FileHelpers.cs +++ b/RPGMakerDecrypter.Tests/FileHelpers.cs @@ -21,9 +21,9 @@ public static void CopyArchives() Directory.CreateDirectory(TempDirectoryPath); - File.Copy(Path.Combine("../../EncryptedArchives", Constants.RpgMakerXpArchiveName), Path.Combine(TempDirectoryPath, Constants.RpgMakerXpArchiveName)); - File.Copy(Path.Combine("../../EncryptedArchives", Constants.RpgMakerVxArchiveName), Path.Combine(TempDirectoryPath, Constants.RpgMakerVxArchiveName)); - File.Copy(Path.Combine("../../EncryptedArchives", Constants.RpgMakerVxAceArchiveName), Path.Combine(TempDirectoryPath, Constants.RpgMakerVxAceArchiveName)); + File.Copy(Path.Combine("EncryptedArchives", Constants.RpgMakerXpArchiveName), Path.Combine(TempDirectoryPath, Constants.RpgMakerXpArchiveName)); + File.Copy(Path.Combine("EncryptedArchives", Constants.RpgMakerVxArchiveName), Path.Combine(TempDirectoryPath, Constants.RpgMakerVxArchiveName)); + File.Copy(Path.Combine("EncryptedArchives", Constants.RpgMakerVxAceArchiveName), Path.Combine(TempDirectoryPath, Constants.RpgMakerVxAceArchiveName)); } public static void Cleanup() diff --git a/RPGMakerDecrypter.Tests/Properties/AssemblyInfo.cs b/RPGMakerDecrypter.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index af254b6..0000000 --- a/RPGMakerDecrypter.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RPGMakerDecrypter.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("RPGMakerDecrypter.Tests")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cdfb3e01-de4d-4fc2-8369-21d9f70595c2")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RPGMakerDecrypter.Tests/RGSSADv1Tests.cs b/RPGMakerDecrypter.Tests/RGSSADv1Tests.cs index d6f2290..270d87f 100644 --- a/RPGMakerDecrypter.Tests/RGSSADv1Tests.cs +++ b/RPGMakerDecrypter.Tests/RGSSADv1Tests.cs @@ -4,29 +4,28 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using NUnit.Framework; using RPGMakerDecrypter.Decrypter; namespace RPGMakerDecrypter.Tests { - [TestClass] public class RGSSADv1Tests { - [TestMethod] + [Test] public void CorrectAmountOfArchivedFilesIsReadFromXpArchive() { FileHelpers.CopyArchives(); RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerXpArchiveName)); - Assert.AreEqual(16, rgssad.ArchivedFiles.Count); + Assert.That(rgssad.ArchivedFiles.Count, Is.EqualTo(16)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectFileNamesAreReadFromXpArchive() { FileHelpers.CopyArchives(); @@ -34,16 +33,16 @@ public void CorrectFileNamesAreReadFromXpArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerXpArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(@"Data\Actors.rxdata", rgssad.ArchivedFiles[0].Name); - Assert.AreEqual(@"Data\Animations.rxdata", rgssad.ArchivedFiles[1].Name); - Assert.AreEqual(@"Data\Armors.rxdata", rgssad.ArchivedFiles[2].Name); + Assert.That(rgssad.ArchivedFiles[0].Name, Is.EqualTo(@"Data\Actors.rxdata")); + Assert.That(rgssad.ArchivedFiles[1].Name, Is.EqualTo(@"Data\Animations.rxdata")); + Assert.That(rgssad.ArchivedFiles[2].Name, Is.EqualTo(@"Data\Armors.rxdata")); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectOffsetsAreReadFromXpArchive() { FileHelpers.CopyArchives(); @@ -51,16 +50,16 @@ public void CorrectOffsetsAreReadFromXpArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerXpArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(34, rgssad.ArchivedFiles[0].Offset); - Assert.AreEqual(11045, rgssad.ArchivedFiles[1].Offset); - Assert.AreEqual(147314, rgssad.ArchivedFiles[2].Offset); + Assert.That(rgssad.ArchivedFiles[0].Offset, Is.EqualTo(34)); + Assert.That(rgssad.ArchivedFiles[1].Offset, Is.EqualTo(11045)); + Assert.That(rgssad.ArchivedFiles[2].Offset, Is.EqualTo(147314)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectSizesAreReadFromXpArchive() { FileHelpers.CopyArchives(); @@ -68,16 +67,16 @@ public void CorrectSizesAreReadFromXpArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerXpArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(10981, rgssad.ArchivedFiles[0].Size); - Assert.AreEqual(136243, rgssad.ArchivedFiles[1].Size); - Assert.AreEqual(4285, rgssad.ArchivedFiles[2].Size); + Assert.That(rgssad.ArchivedFiles[0].Size, Is.EqualTo(10981)); + Assert.That(rgssad.ArchivedFiles[1].Size, Is.EqualTo(136243)); + Assert.That(rgssad.ArchivedFiles[2].Size, Is.EqualTo(4285)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectKeysAreReadFromXpArchive() { FileHelpers.CopyArchives(); @@ -85,16 +84,16 @@ public void CorrectKeysAreReadFromXpArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerXpArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual((uint)0x7B7448AE, rgssad.ArchivedFiles[0].Key); - Assert.AreEqual((uint)0x366D564E, rgssad.ArchivedFiles[1].Key); - Assert.AreEqual((uint)0x222699FE, rgssad.ArchivedFiles[2].Key); + Assert.That(rgssad.ArchivedFiles[0].Key, Is.EqualTo((uint)0x7B7448AE)); + Assert.That(rgssad.ArchivedFiles[1].Key, Is.EqualTo((uint)0x366D564E)); + Assert.That(rgssad.ArchivedFiles[2].Key, Is.EqualTo((uint)0x222699FE)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectFileNamesAreReadFromVxArchive() { FileHelpers.CopyArchives(); @@ -102,16 +101,16 @@ public void CorrectFileNamesAreReadFromVxArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(@"Data\Actors.rvdata", rgssad.ArchivedFiles[0].Name); - Assert.AreEqual(@"Data\Animations.rvdata", rgssad.ArchivedFiles[1].Name); - Assert.AreEqual(@"Data\Areas.rvdata", rgssad.ArchivedFiles[2].Name); + Assert.That(rgssad.ArchivedFiles[0].Name, Is.EqualTo(@"Data\Actors.rvdata")); + Assert.That(rgssad.ArchivedFiles[1].Name, Is.EqualTo(@"Data\Animations.rvdata")); + Assert.That(rgssad.ArchivedFiles[2].Name, Is.EqualTo(@"Data\Areas.rvdata")); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectOffsetsAreReadFromVxArchive() { FileHelpers.CopyArchives(); @@ -119,16 +118,16 @@ public void CorrectOffsetsAreReadFromVxArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(34, rgssad.ArchivedFiles[0].Offset); - Assert.AreEqual(10951, rgssad.ArchivedFiles[1].Offset); - Assert.AreEqual(139280, rgssad.ArchivedFiles[2].Offset); + Assert.That(rgssad.ArchivedFiles[0].Offset, Is.EqualTo(34)); + Assert.That(rgssad.ArchivedFiles[1].Offset, Is.EqualTo(10951)); + Assert.That(rgssad.ArchivedFiles[2].Offset, Is.EqualTo(139280)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectSizesAreReadFromVxArchive() { FileHelpers.CopyArchives(); @@ -136,16 +135,16 @@ public void CorrectSizesAreReadFromVxArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(10887, rgssad.ArchivedFiles[0].Size); - Assert.AreEqual(128304, rgssad.ArchivedFiles[1].Size); - Assert.AreEqual(4, rgssad.ArchivedFiles[2].Size); + Assert.That(rgssad.ArchivedFiles[0].Size, Is.EqualTo(10887)); + Assert.That(rgssad.ArchivedFiles[1].Size, Is.EqualTo(128304)); + Assert.That(rgssad.ArchivedFiles[2].Size, Is.EqualTo(4)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectKeysAreReadFromVxArchive() { FileHelpers.CopyArchives(); @@ -153,9 +152,9 @@ public void CorrectKeysAreReadFromVxArchive() RGSSADv1 rgssad = new RGSSADv1(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual((uint)0x7B7448AE, rgssad.ArchivedFiles[0].Key); - Assert.AreEqual((uint)0x366D564E, rgssad.ArchivedFiles[1].Key); - Assert.AreEqual((uint)0x04E0F16D, rgssad.ArchivedFiles[2].Key); + Assert.That(rgssad.ArchivedFiles[0].Key, Is.EqualTo((uint)0x7B7448AE)); + Assert.That(rgssad.ArchivedFiles[1].Key, Is.EqualTo((uint)0x366D564E)); + Assert.That(rgssad.ArchivedFiles[2].Key, Is.EqualTo((uint)0x04E0F16D)); rgssad.Dispose(); diff --git a/RPGMakerDecrypter.Tests/RGSSADv3Tests.cs b/RPGMakerDecrypter.Tests/RGSSADv3Tests.cs index 9b5e060..173e917 100644 --- a/RPGMakerDecrypter.Tests/RGSSADv3Tests.cs +++ b/RPGMakerDecrypter.Tests/RGSSADv3Tests.cs @@ -4,29 +4,28 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using NUnit.Framework; using RPGMakerDecrypter.Decrypter; namespace RPGMakerDecrypter.Tests { - [TestClass] public class RGSSADv3Tests { - [TestMethod] + [Test] public void CorrectAmountOfArchivedFilesIsReadFromVxAceArchive() { FileHelpers.CopyArchives(); RGSSADv3 rgssad = new RGSSADv3(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxAceArchiveName)); - Assert.AreEqual(16, rgssad.ArchivedFiles.Count); + Assert.That(rgssad.ArchivedFiles.Count, Is.EqualTo(16)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectFileNamesAreReadFromVxAceArchive() { FileHelpers.CopyArchives(); @@ -34,16 +33,16 @@ public void CorrectFileNamesAreReadFromVxAceArchive() RGSSADv3 rgssad = new RGSSADv3(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxAceArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(@"Data\Actors.rvdata2", rgssad.ArchivedFiles[0].Name); - Assert.AreEqual(@"Data\Animations.rvdata2", rgssad.ArchivedFiles[1].Name); - Assert.AreEqual(@"Data\Armors.rvdata2", rgssad.ArchivedFiles[2].Name); + Assert.That(rgssad.ArchivedFiles[0].Name, Is.EqualTo(@"Data\Actors.rvdata2")); + Assert.That(rgssad.ArchivedFiles[1].Name, Is.EqualTo(@"Data\Animations.rvdata2")); + Assert.That(rgssad.ArchivedFiles[2].Name, Is.EqualTo(@"Data\Armors.rvdata2")); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectOffsetsAreReadFromVxAceArchive() { FileHelpers.CopyArchives(); @@ -51,16 +50,16 @@ public void CorrectOffsetsAreReadFromVxAceArchive() RGSSADv3 rgssad = new RGSSADv3(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxAceArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(605, rgssad.ArchivedFiles[0].Offset); - Assert.AreEqual(3637, rgssad.ArchivedFiles[1].Offset); - Assert.AreEqual(222096, rgssad.ArchivedFiles[2].Offset); + Assert.That(rgssad.ArchivedFiles[0].Offset, Is.EqualTo(605)); + Assert.That(rgssad.ArchivedFiles[1].Offset, Is.EqualTo(3637)); + Assert.That(rgssad.ArchivedFiles[2].Offset, Is.EqualTo(222096)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectSizesAreReadFromVxAceArchive() { FileHelpers.CopyArchives(); @@ -68,16 +67,16 @@ public void CorrectSizesAreReadFromVxAceArchive() RGSSADv3 rgssad = new RGSSADv3(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxAceArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual(3032, rgssad.ArchivedFiles[0].Size); - Assert.AreEqual(218459, rgssad.ArchivedFiles[1].Size); - Assert.AreEqual(11472, rgssad.ArchivedFiles[2].Size); + Assert.That(rgssad.ArchivedFiles[0].Size, Is.EqualTo(3032)); + Assert.That(rgssad.ArchivedFiles[1].Size, Is.EqualTo(218459)); + Assert.That(rgssad.ArchivedFiles[2].Size, Is.EqualTo(11472)); rgssad.Dispose(); FileHelpers.Cleanup(); } - [TestMethod] + [Test] public void CorrectKeysAreReadFromVxAceArchive() { FileHelpers.CopyArchives(); @@ -85,9 +84,9 @@ public void CorrectKeysAreReadFromVxAceArchive() RGSSADv3 rgssad = new RGSSADv3(Path.Combine(FileHelpers.TempDirectoryPath, Constants.RpgMakerVxAceArchiveName)); // Verified with Falos RPG Maker Decrypter - Assert.AreEqual((uint)0x00000029, rgssad.ArchivedFiles[0].Key); - Assert.AreEqual((uint)0x00004823, rgssad.ArchivedFiles[1].Key); - Assert.AreEqual((uint)0x000018BE, rgssad.ArchivedFiles[2].Key); + Assert.That(rgssad.ArchivedFiles[0].Key, Is.EqualTo((uint)0x00000029)); + Assert.That(rgssad.ArchivedFiles[1].Key, Is.EqualTo((uint)0x00004823)); + Assert.That(rgssad.ArchivedFiles[2].Key, Is.EqualTo((uint)0x000018BE)); rgssad.Dispose(); diff --git a/RPGMakerDecrypter.Tests/RPGMakerDecrypter.Tests.csproj b/RPGMakerDecrypter.Tests/RPGMakerDecrypter.Tests.csproj index 36ca96b..c733406 100644 --- a/RPGMakerDecrypter.Tests/RPGMakerDecrypter.Tests.csproj +++ b/RPGMakerDecrypter.Tests/RPGMakerDecrypter.Tests.csproj @@ -1,92 +1,39 @@ - - - - Debug - AnyCPU - {CDFB3E01-DE4D-4FC2-8369-21D9F70595C2} - Library - Properties - RPGMakerDecrypter.Tests - RPGMakerDecrypter.Tests - v4.5.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - {baeee442-1888-4340-94be-fe743c696ae1} - RPGMakerDecrypter.Decrypter - - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file + + + + net6.0 + enable + enable + + false + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + diff --git a/RPGMakerDecrypter.sln b/RPGMakerDecrypter.sln index ed007d1..635c8e8 100644 --- a/RPGMakerDecrypter.sln +++ b/RPGMakerDecrypter.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32901.215 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RPGMakerDecrypter.Decrypter", "RPGMakerDecrypter.Decrypter\RPGMakerDecrypter.Decrypter.csproj", "{BAEEE442-1888-4340-94BE-FE743C696AE1}" EndProject @@ -49,4 +49,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2B50EE10-517D-4BAE-A617-97CAD2922589} + EndGlobalSection EndGlobal diff --git a/screenshots/gui1.png b/screenshots/gui1.png new file mode 100755 index 0000000000000000000000000000000000000000..9152e0b6816048a0c22029d3bf091ae5eacd5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