Villager

What is this?
This tool automates the compilation of JavaScript files with NW.js' compiler. The compiler creates binary versions of the files, ensuring protection of the source code. The tool also packages the code (and the assets) on an archive that Nw.js can read.

How do I use it?
First of, you'll need to do a few modifications to the project. I've included the replacement code you need to apply to your project (after deploying it, of course). After that, it's pretty simple: Tell the tool where the nwjc.exe file is (RPG Maker MV has the SDK as well, which includes nwjc, but you can download a different version from https://nwjs.io) and the project you want to compile. In a few minutes, you can upload the game to the public.

Do note: once you compile it, you can only use the same version of nwjs for the same operating system. So, if you compiled the game with SDK Version 0.30.4 (for example) on Windows, you can only use the code with Standard Version 0.30.4 on Windows.

Command Line Arguments (CLI version only):

--SDKLocation: Sets the location of the SDK.
--ProjectLocation: Sets the location of the project.
--FileExtension: Sets the File Extension for the compiled files. It's used like this: --FileExtension <insert file extension here>
--Parallel: Turns on Parallel mode. You can use it without the previous two arguments as well.
--ReleaseMode: Removes the JavaScript files after compiling.
--CompressProject: Compress project after compiling. "--CompressProject Final" (without quotes) removes the files after compression. Only works with the ReleaseMode flag.
--TestMode: Test the game after compiling. Cannot work when the CompressProject argument is in place.

System Requirements:
Windows 7 Service Pack 1 or newer.

Microsoft .NET Framework 4.7.2

Any computer that can run RPG Maker MV games, practically speaking.

NW.js SDK. You can use any version you want (preferably 0.22.x or newer (RPG Maker MV 1.6.1 ships with 0.29.0), as 0.21.x and older have a bug where the compiled versions ran 30% slower).

FAQ:Can I use it on Linux with WINE (or Proton or <insert a compatibility layer here>)?
Depends. If it is to make the Windows version of your game, then yes (assuming that it can run .NET Framework apps). If you want to use the tool to make the Linux version, then no. You can use the Console App.

Can I use it on my current project?
The tool is a wrapper for the nwjc. I have used the tool for my project and I haven't noticed any issues. So, it has a "go-live" license (as in, it's OK to use it on your projects).

Praised Adventurer

this is a true game changer... (sorrry) seriously, absolutely amazing tool that you've created here. the name your price option is beyond kind. this has incredible value. for all of those gamedevs out there who have been trying to obfuscate their code, check this out instead.

Villager

@Starbird , I'm glad to hear that it's useful for you. Now, the tool is practically a UI wrapper for the nwjs' compiler tool (which is included in the SDK). I am planning to add features to it, though. In any case, if anyone wants to donate, by all means, please do so.

----

A quick announcement: I have released version D1.03. You can take a look at the changes here. I've also made a command line app version of it. The console app version is written in .NET Core, thus it's capable to run on Windows and Linux.

Villager

Well... It's been a while. Since the last post, the tool received new features and bug fixes:

D1.04 Rev.1 / CLI Version D1.01

UI

Minor text fix.

CLIChangelog:

Command Line Arguments have been added. (see the OP).

The compiler will compile in serial mode (you can compile in parallel mode by adding the –Parallel command line argument).

Slight Text improvements.

Switched to .NET Core 2.2.

Fixed a bug where the compiler would compress the files, even though the user asked not to.

Known issues:

In Parallel mode, some files aren’t processed correctly on Linux.

Version D1.04 Update 1/ CLI Build 20190129

UIChangelog:

Re-worked how the UI is updated during compilation. Fixes the lock-up that happens when compiling files.

Added the option to cancel the compilation.

CLIChangelog:
- The "Press Enter/Return key to exit" message will not show up when compiling via command line arguments.

I'm also making a new tool as well. In the UI version, I made a package.json editor for MV projects. This allows you to edit some details for NW.js' settings (such as window resolution, turning on/off NodeJS, etc.). I may spin this off as a standalone tool as well.

I have also added the option to adjust the compression of the package.

Towns Guard

The tool looks great, will be a pretty decent step towards final builds of games distribution. I would definitely redo that tutorial video though, if your going to just use text over the video for the tutorial, you have to make sure the text is able to be read easily or people are going to just stop watching it and look for something else. As a rule, a tutorial should get its information across as cleanly as possible. And in the first minute of yours I was straining my eyes trying to read the text. A quick tip, is either use a white text with black outline to make it very readable on any background, or put a panel behind the text to make the text easily read. That's my 2 cents on the matter anyway.