Manually Packaging TyranoScript and TyranoBuilder Projects for Windows and Mac

In some cases, large project size (1gb or greater) may cause the export process to hang and fail when creating applications for Windows or Mac.

This tutorial covers two solutions to this problem:
① Distribute after manually packaging
② Distribute without packaging

First, we’ll show how to manually packaging method without using TyranoBuilder export function.

Once your project is ready, we should have the files necessary to package your game.

For TyranoBuilder projects:
We’ll use the output from “Export Game” → “Browser Game Format”.

For non-TyranoBuilder projects:
The files we need are included in the folder “myproject / [project name] /”

As long as we have the tyrano folder and data folders, we’re all good.

[IMAGE]

Copy all of these files and folders to a new folder and name it “game”.

The procedure from here differs for Mac and Windows versions.

Packaging for Mac
Download the relevant* version of TyranoScript for Mac from the below link.
* If you’re unsure which version to use, just use the latest version.

[LINK]

Extract the file to your computer, locate the folder “node_modules”, and copy it to your project folder.
(Your project folder should contain a file named index.html and the Tyrano folders.)

Let’s leave this folder for a moment and go back to the “game” folder you prepared earlier. Select all of the contents, right click, and compress all items.

[IMAGE]

This will generate a zip file named archive .zip. Change the name of this file to “app.nw”.

Now go back to the TyranoScript for Mac folder and delete everything in the folder except for the file “tyranoscript.app”.

[IMAGE]

Right-click on the tyranoscript.app file and select “Show package contents” to display the contents.
Then copy the app.nw file we created earlier to the Contents – Resources folder.

[IMAGE]

And we’re all done!

Go back to the folder containing tyranoscript.app and run it by double clicking on the file. If the game starts, then the process was successful and your project is now packaged for Mac.

Packaging for Windows
The following tutorial assumes Windows 10. Other versions of Windows will differ slightly visually, but the process is the same.

Download the relevant* version of TyranoScript for Windows from the below link.
* If you’re unsure which version to use, just use the latest version.

[LINK]

Extract the file to your computer, locate the folder “node_modules”, and copy it to your project folder.
(Your project folder should contain a file named index.html and the Tyrano folders.)

Open your “game” folder, select all of the contents, right click, and compress all items.

This will generate a zip file named archive .zip. Change the name of this file to “app.nw”.

Now copy this file into the TyranoScript for Windows folder.

Next, launch the command prompt. (You can do this by searching for ‘command prompt’ in the search field at the left of the Taskbar.)

[IMAGE]

↑ This icon.

Type “cd ” (note the space after “cd”) and drag and drop the TyranoScript for Windows folder where you placed app.nw into the command prompt window.

[IMAGE]

This will add the path of the folder to the command line.
Press the Enter key. You should have a command that looks something like:

Now for the final steps.

Type or copy and paste the following command and press enter.

If all goes correctly, file called game.exe will be created in the same folder. This is the game executable file.

Let’s go ahead and delete unnecessary files from this folder. We no longer need tyranoscript.exe or any of the other files.

Run game.exe to confirm that the game starts.

You only need the game.exe file, but it’s a good idea to add supporting documentation such as readme etc. to the same folder before zipping and distributing it.

You can of course change the name of game.exe to anything you like, and you can easily change the icon by using a resource hacker such as the one at the below link.

[LINK]

To change the screen size, open package.json in an editor prior to packaging, and edit the below lines:

“width”: 640,
“height”: 480,

** IMPORTANT **
Please be sure to include the credits.html file when packaging for Mac or Windows. Failing to include this will be in violation of license.

Distributing without Packaging
Packaging large-capacity games may increase the time required for the application to start up. In these cases, we recommend distributing without packaging. This method allows for very fast start up times.

Please note, however: the downside to not packaging is that the game data will be in a relatively easy to read state.

First, export your project to browser format, then copy it to the corresponding folder below:

For Mac applications: TyranoScript for Mac [LINK] For Windows Applications: TyranoScript for Windows [LINK]

Then simply click tyranoscript.exe (Windows) or start.cmmand (Mac) to start your game.
You can rename tyranoscript.exe to suit your preference, zip the folders and distribute.

cd C: \ User \ Shikemoku \ ty ranoscript _ for _ windows _ v 400 rc

copy / b tyranoscript.exe + app.nw game.exe