Skip to content

Commit

Permalink
Tidy up and prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
uuksu committed Dec 30, 2024
1 parent 380f479 commit a546110
Show file tree
Hide file tree
Showing 36 changed files with 52 additions and 2,055 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/decryption-problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A clear and concise description of what the problem is. Include possible error m

**Details (please complete the following information):**
- OS: [e.g. Windows/MacOs/Linux]
- RPGMakerDecrypter version: [CLI/GUI]
- RPGMakerDecrypter version: [v.3.x.x]

**Screenshots**
If applicable, add screenshots to help explain your problem.
8 changes: 2 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
env:
BUILD_CONFIG: 'Release'
CLI_PROJECT: 'RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj'
GUI_PROJECT: 'RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj'

runs-on: windows-latest

Expand All @@ -27,7 +26,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore
Expand All @@ -41,10 +40,7 @@ jobs:
- name: Publish Windows CLI
run: dotnet publish $Env:CLI_PROJECT --configuration $Env:BUILD_CONFIG -r win-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=Link --self-contained true --output $Env:GITHUB_WORKSPACE

- name: Publish Windows GUI
run: dotnet publish $Env:GUI_PROJECT --configuration $Env:BUILD_CONFIG -r win-x64 -p:PublishSingleFile=true --self-contained true --output $Env:GITHUB_WORKSPACE

- uses: ncipollo/[email protected]
with:
bodyFile: CHANGELOG.MD
artifacts: "RPGMakerDecrypter-cli,RPGMakerDecrypter-cli.exe,RPGMakerDecrypter.exe"
artifacts: "RPGMakerDecrypter-cli,RPGMakerDecrypter-cli.exe"
9 changes: 7 additions & 2 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changed in this release

* **Add overwrite flag**: Add a CLI argument and GUI checkbox for controlling file overwriting behavior. Thank you @AhmedAhmedEG for your contribution!
* **Spelling error fixes**: English is hard, thank you @punctdan for nitpicking and for the fixes!
After a major architectural overhaul, I've decided to upgrade the RPG Maker Decrypter version to v3.0.0!

Biggest change in this release is the new and exiting support for the RPG Maker MV and MZ decryption. With this change, the RPG Maker Decrypter has become the only tool you will ever need to decrypt RPG Maker games made with any version.

With this change also becomes sad news for the fans of the GUI version. Because I do not have a personal Windows development environment anymore and thus am unable to update the Forms application, I've decided to drop its support. I removed the sources (including the experimental GTK UI), but they remain available in this [commit](https://github.com/uuksu/RPGMakerDecrypter/tree/1a24e8c0a9bbf7b9b1cb030a6a2eb20882e6df15). Maybe someone else would like to create a cross-platform UI (for example with Avalonia) or create a web service utilizing my code (that will be always FOSS with liberal license).

Application has also a new (not really) fancy icon!
29 changes: 0 additions & 29 deletions Deploy/7za-license.txt

This file was deleted.

Binary file removed Deploy/7za.exe
Binary file not shown.
26 changes: 0 additions & 26 deletions Deploy/deploy.bat

This file was deleted.

38 changes: 17 additions & 21 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
# RPG Maker Decrypter

RPG Maker Decrypter can be used to extract encrypted archives created with RPG Maker XP, RPG Maker VX or RPG Maker VX Ace.
Software can also generate correct type project file for decrypted data.
RPG Maker Decrypter can be used to extract encrypted archives and files created with **RPG Maker XP, VX VX Ace, MV or MZ**.
It can be also used to recreate a best guess of the original project.

## Usage

RPG Maker Decrypter has a Windows application and a cli application which both provide the same functionality but with different interface.
RPG Maker Decrypter is an advanced CLI application. To use it, you have a have basic skills of running terminal applications.

### RPG Maker Decrypter CLI
To decrypt RPG Maker XP, VX and VX Ace games, give the encrypted archive file as input (usually files with .rgssad, .rgss2a or .rgss3a extension, but these might also be renamed to something else). To decrypt MV or MZ games, give the game deployment root directory as the input.

Using RM2k2XP from commandline is simple. To get available commands, use:
To get available commands, use:

RPGMakerDecrypter-cli

To extract archive to same directory where it exists, use

RPGMakerDecrypter-cli C:\MyRPGMakerGame\Game.rgssad

To extract archive to some other directory, use
To extract RPG Maker XP, VX or VX Ace archive to some other directory, use

RPGMakerDecrypter-cli C:\MyRPGMakerGame\Game.rgssad --output=C:\OtherDirectory

To create project file with decrypted files, use

RPGMakerDecrypter-cli C:\MyRPGMakerGame\Game.rgssad --project-file
### RPG Maker Decrypter GUI
To extract RPG Maker MV or MZ game to some other directory, use

RPGMakerDecrypter-cli C:\MyRPGMakerGame\Game --output=C:\OtherDirectory

Using Windows application is more straightforward. Open RGASSAD file by using File menu.
To give a best guess in creating the original project, use

If you want to extract single files, select file from list and press extract under file name and size.
RPGMakerDecrypter-cli C:\MyRPGMakerGame\Game.rgssad --recreate-project

![Screenshots of the GUI application](/screenshots/gui1.png)
You must always specify the output directory when recreating a project for MV or MZ.

### RPG Maker Decrypter GTK GUI (Experiemental)

Repository also contains [experiemental UI](https://github.com/uuksu/RPGMakerDecrypter/tree/master/RPGMakerDecrypter.Gui.Gtk) that uses GtkSharp under the hood.
RPGMakerDecrypter-cli C:\MyRPGMakerGame\Game.rgssad --recreate-project --output=C:\OtherDirectory

There is no prebuilt binary for this UI, but it is functional and can be built from the sources if needed.
## RPG Maker Decrypter GUI

Thank you @tyrone-sudeium for porting the UI!
Unfortunately, support for GUI has ended. Sources still exist in [history](https://github.com/uuksu/RPGMakerDecrypter/tree/1a24e8c0a9bbf7b9b1cb030a6a2eb20882e6df15). Maybe you would like to continue the development of the Windows-only Forms GUI or create a totally new cross-platform alternative?

## Requirements

* GUI version works only on Windows, CLI version works with any platform .NET 6.0 targets.
* Application works with any platform .NET 8.0 targets.
* .NET Runtime is not required for prebuilt binaries on selected platforms as it is packaged in the executable.

## Binaries
Expand All @@ -52,4 +48,4 @@ Prebuilt binaries are available for selected platforms. See [Releases](https://g

## Building

RPGMakerDecrypter will compile with .NET 6.0 SDK.
CLI application will compile with .NET 8.0 SDK, libraries target .NET Standard 2.0.
2 changes: 1 addition & 1 deletion RPGMakerDecrypter.Cli/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace RPGMakerDecrypter.Cli
{
public class CommandLineOptions
{
[Value(0, Required = true, HelpText = "Path to the .rgssad, .rgss2a or .rgss3a file or to MV and MZ directory.")]
[Value(0, Required = true, HelpText = "Path to the .rgssad, .rgss2a or .rgss3a file or to MV and MZ deployment directory.")]
public string InputPath { get; set; }

[Option('o', "output", Required = false, HelpText = "Optional output directory path. Required if --reconstruct-project is set to true and input path is a MV or MZ directory.")]
Expand Down
8 changes: 0 additions & 8 deletions RPGMakerDecrypter.Cli/MVMZHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ public void Handle(CommandLineOptions commandLineOptions, RPGMakerVersion versio
Console.WriteLine(ex.Message);
Environment.Exit(1);
}
catch (Exception ex)
{
var logFilePath = ExceptionLogger.LogException(ex);
Console.WriteLine("Unexpected error happened while trying to extract the archive.");
Console.WriteLine($"Error log has been written to '{logFilePath}'");
Console.WriteLine("Please create a issue and include the log contents there: https://github.com/uuksu/RPGMakerDecrypter/issues");
Environment.Exit(1);
}
}
}
}
Expand Down
39 changes: 24 additions & 15 deletions RPGMakerDecrypter.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using CommandLine;
using RPGMakerDecrypter.Cli.Exceptions;
using RPGMakerDecrypter.Common;
using RPGMakerDecrypter.MVMZ;
using RPGMakerDecrypter.RGSSAD;

Expand All @@ -13,23 +14,23 @@ static class Program

static void Main(string[] args)
{
var parsedResult = Parser.Default.ParseArguments<CommandLineOptions>(args);
_commandLineOptions = parsedResult.Value;

if (parsedResult.Errors.Any())
{
Environment.Exit(1);
}

var version = RGSSAD.RGSSAD.GetRPGMakerVersion(_commandLineOptions.InputPath);
if (version == RPGMakerVersion.Unknown)
{
var mvMzVersionFinder = new RPGMakerVersionFinder();
version = mvMzVersionFinder.FindVersion(_commandLineOptions.InputPath);
}

try
{
var parsedResult = Parser.Default.ParseArguments<CommandLineOptions>(args);
_commandLineOptions = parsedResult.Value;

if (parsedResult.Errors.Any())
{
Environment.Exit(1);
}

var version = RGSSAD.RGSSAD.GetRPGMakerVersion(_commandLineOptions.InputPath);
if (version == RPGMakerVersion.Unknown)
{
var mvMzVersionFinder = new RPGMakerVersionFinder();
version = mvMzVersionFinder.FindVersion(_commandLineOptions.InputPath);
}

switch (version)
{
case RPGMakerVersion.Xp:
Expand All @@ -55,6 +56,14 @@ static void Main(string[] args)
Console.WriteLine(ex.Message);
Environment.Exit(1);
}
catch (Exception ex)
{
var logFilePath = ExceptionLogger.LogException(ex);
Console.WriteLine("Unexpected error happened while trying to extract the archive.");
Console.WriteLine($"Error log has been written to '{logFilePath}'");
Console.WriteLine("Please create a issue and include the log contents there: https://github.com/uuksu/RPGMakerDecrypter/issues");
Environment.Exit(1);
}
}
}
}
8 changes: 0 additions & 8 deletions RPGMakerDecrypter.Cli/RGSSADHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ public void Handle(CommandLineOptions commandLineOptions, RPGMakerVersion versio
Console.WriteLine("Please create a issue: https://github.com/uuksu/RPGMakerDecrypter/issues");
Environment.Exit(1);
}
catch (Exception ex)
{
var logFilePath = ExceptionLogger.LogException(ex);
Console.WriteLine("Unexpected error happened while trying to extract the archive.");
Console.WriteLine($"Error log has been written to '{logFilePath}'");
Console.WriteLine("Please create a issue and include the log contents there: https://github.com/uuksu/RPGMakerDecrypter/issues");
Environment.Exit(1);
}

if (commandLineOptions.ReconstructProject)
{
Expand Down
Binary file modified RPGMakerDecrypter.Cli/icon_256x256_cli.ico
Binary file not shown.
28 changes: 0 additions & 28 deletions RPGMakerDecrypter.Gui.Gtk/AboutWindow.cs

This file was deleted.

30 changes: 0 additions & 30 deletions RPGMakerDecrypter.Gui.Gtk/AboutWindow.glade

This file was deleted.

Loading

0 comments on commit a546110

Please sign in to comment.