Tutorial Others Playing On Linux - Tutorials, Tools And Help

5.00 star(s) 3 Votes
Nov 24, 2019
283
260
I got all Tyrano games I could test to run natively on Linux using nwjs-0.12.3, there might be a few menu glitches but nothing too serious. The game needs to be unpacked, use tyranocut.ps1 for that. Thank you for your script, Surgy!
You need to edit the getProcessPath function, in tyrano/libs.js
JavaScript:
    $.getProcessPath = function(){
        var path = process.execPath;
        var tmp_index = 0;
        var os = "linux";
        if(path.indexOf(".app") !== -1){
            os = "mac";
            tmp_index = path.indexOf(".app");
        }else if(path.indexOf(".exe") !== -1){
            os = "win";
            tmp_index = path.indexOf(".exe");
        }
        if(os == "linux"){
            return process.cwd();
        }
        var tmp_path = path.substr(0,tmp_index);
        var path_index=0;
        if(os == "mac"){
            path_index = tmp_path.lastIndexOf("/");
        }else{
            path_index = tmp_path.lastIndexOf("\\");
        }
        var out_path = path.substr(0,path_index);
        return out_path;
    };
That makes it work on Windows and Linux, macOS should work too but I can't test that.
Upgrading to a newer nwjs version didn't work though.
I was also able to get all RPG Maker MV games to run on nwjs-0.45.6, again it needs to be unpacked, I used EnigmaVBUnpacker. If you are using an Intel GPU, run
Code:
MESA_GLSL_CACHE_DISABLE=true nw .
in the game directory, where the package.json is. Upgrading nwjs from the ancient version the game is bundled with to a modern x64 release fixes some memory leaks for me. Works with Windows too, of course. As long as you don't mess with the .js files and plugins, upgrading the bundled browser should be safe.
Setting the www/ directory case insensitive helps getting rid of all the "file not found" errors. Or simply make all files lowercase, that would work too I guess.
A more step-by-step walkthrough for newbies:

0. Make a backup. The script will override the files, so always make a backup first!
If a folder "tyrano/" already exists, then you can skip to step 5.

1. Install Power Shell. Fortunately, there is a version for Linux.
You can get it on their GitHub:
Otherwise, there are more detailed instructions in Microsoft's website:


It should be installed to /usr/bin/pwsh

2.
Download Tyranocut1.ps (from Surgy)
It is a powershell script you can find on this very website:
https://f95zone.to/threads/script-to-cut-data-file-out-of-combined-tyranobuilder-exe.47164/

3. Open a Terminal and change dir to wherever your Tyrano game is.

4. Extract the exe file using Tyranocut. Example:
Code:
user@pc:~/games/tyranogame$ pwsh -executionPolicy bypass -file "tyranocut.ps1" -Unpack -GameExeName "game.exe"
Assuming the game is called "game.exe", of course.

Output may look something like this:
Code:
Processing game.exe...
Unpacking data.zip.
tyranocut.ps1: Exception calling "ExtractToFile" with "3" argument(s): "Access to the path '/home/user/games/tyranogame/data/' is denied."
Good news are: If it made data.zip, then this error only means you have to extract it yourself!

However if it got the error before creating data.zip, I really cannot help.

Anyway, if you get the same error as me, you can just extract data.zip over the main dir.

5. Go to tyrano/ folder, and go to tyrano/ folder.
Open the file libs.js on your preferred text editor.

6. Search for getProcessPath function. Replace it.

7. Treat the game like any other nw-based game. The www/ folder may be named differently.


Quick Troubleshooting

Q. When I run ./nw it asks to open xdg-open, and says there is no support to the specified location.
A. Edit package.json - it'll have a field called "main". If it starts with "app://", remove that part and it should work.

Q. I could not find tyrano/ folder!
A. Did you extract data.zip over the game dir? Usually it may be extracted in a folder of its own, and you DON'T want this.

Q. "Exception of type 'System.OutOfMemoryException' was thrown."
A. As the name suggests, your system does not have enough RAM to extract this. The script uses a lot of memory and I don't think it accepts swap, either. I got this error by trying to extract a 600MB exe file with "only" 1.6 GB of free RAM.
Or maybe it hit some limit, I don't know >.> Better ask Surgy as he is the author.
PS. Lies. did a simplified version of Tyranocut which might help you out using Python; However, I have not tested it.

Q. "Backup of game exe already exists."
A. The script will try to backup the exe file. The backup will have ".old" extension. You probably can rename the extension to .exe to try again.

Q. "Byte sequence not found."
A. This is not a Tyrano game.

Q. I want to run it using Wine because Wine is cool and why not.
A. You can edit the code snippet so it always return process.cwd() regardless of the OS. This is not guaranteed to work but should do the trick for Wine.

Q. How do I run this a nwjs game? Help!
A. It should be explained in the thread (https://f95zone.to/threads/playing-on-linux-tutorials-tools-and-help.19523/) , the only difference is that the www folder may be called differently. (It was called "data" in the game I used this).
Basically, download nwjs, and copy-paste its contents (overwriting when need, you did make a backup first, right?), except for nw.pak, package.json and the data (or www) folder.

Q. «Insert some crypt error message here»
A. I only tested this with two Tyrano games. One worked and the other raised a memory error, so I'm not sure how other Tyrano games will behave.
 
Last edited:

Axeleen

Member
May 1, 2018
253
277
NW.js GAMES
(Treasure of Nadia - Demon Deals - etc...)
-
[(ARCH) LINUX INSTALLATION]

Yo there,

I'm making this post cause nobody here could ever clearly explain what is necessary and sufficient in order to play Treasure of Nadia on a bare Linux install. Most of the people who have answered, wrongly saying that it works out-of-the-box simply have systems with tons of packages installed which is why they didn't have to do anything, just as I didn't have to on my previous Ubuntu 18.04 system.

But on a bare Linux install like an ArchLinux system, here is what you must do:

You will most likely encounter this issue when trying to launch the game normally by executing the nw binary (the launcher.sh and Game.desktop are just wrappers) in the game directory :

FATAL:platform_font_linux.cc(83)] Check failed: InitDefaultFont(). Could not find the default font


Install Packages :

  • ffmpeg
  • nwjs-ffmpeg-codecs-bin (for Arch -> AUR) which will install nwjs-bin (AUR too) consequently
Then, launch the game this way (and not the way everybody says):

  1. cd <game_dirpath>
  2. LD_PRELOAD=/opt/nwjs/libffmpeg.so /usr/bin/nw .
The environment variable in the last command is to enforce nw (the command /usr/bin/nw, not to be confused with the file nw in the game directory) to use the ffmpeg codecs we installed which are needed to run the game.

Hope this post can help some of you other FOSS (Fappers with Open Source Software) !!

PS: You can also get an error about libXss.so.1 missing for which you can install the package libxss, but it will normally be installed automatically as a dependency to nwjs-bin

References:
[1]https://f95zone.to/threads/playing-on-linux-tutorials-tools-and-help.19523/post-3187251 | Thanks to johnelros for leading me to the right path !
[2]
[3] | Thread about another NW.js game with a very similar problem
 
Last edited:
Feb 7, 2018
370
933
Treasure of Nadia
-
[ARCH LINUX INSTALLATION]

Yo there,

I'm making this post cause nobody here could ever clearly explain what is necessary and sufficient in order to play Treasure of Nadia on a bare Linux install. Most of the people who have answered, wrongly saying that it works out-of-the-box simply have systems with tons of packages installed which is why they didn't have to do anything, just as I didn't have to on my previous Ubuntu 18.04 system.

But on a bare Linux install like an ArchLinux system, here is what you must do:

You will most likely encounter this issue when trying to launch the game normally by executing the nw binary (the launcher.sh and Game.desktop are just wrappers) in the game directory :

FATAL:platform_font_linux.cc(83)] Check failed: InitDefaultFont(). Could not find the default font


Install Packages :

  • ffmpeg
  • nwjs-ffmpeg-codecs-bin (for Arch -> AUR) which will install nwjs-bin (AUR too) consequently
Then, launch the game this way (and not the way everybody says):

  1. cd <game_dirpath>
  2. LD_PRELOAD=/opt/nwjs/libffmpeg.so /usr/bin/nw .
The environment varialbe in the last command is to enforce nw (the command /usr/bin/nw, not to be confused with the file nw in the game directory) to use the ffmpeg codecs we installed which are needed to run the game.

Hope this post can help some of you other FOSS (Fappers with Open Source Software) !!

PS:You can also get an error about libXss.so.1 missing for which you can install the package libxss, but it will normally be installed automatically as a dependency to nwjs-bin

References:
[1]https://f95zone.to/threads/playing-on-linux-tutorials-tools-and-help.19523/post-3187251 | Thanks to johnelros for leading me to the right path !
[2]
[3] | Thread about another NW.js game with a very similar problem
The issue here isn't related with the "bare Linux install" or lack of any mentioned packages installed system-wide with the exception of libxss (which is installed with any chromium based browser or mpv, anyway). This particular issue with Treasure of Nadia on Arch is caused by heavily outdated nwjs version (0.29.0) bundled with the game files, which crashes on Arch. Solution is plain and simple - update nwjs. This simple how-to works on any Linux distribution and might help also with other issues, e.g. performance related:

1. , extract, optionally rename (for this case lets name the folder ToN) any recent version of nwjs, that works well on your PC.
2. , extract and move libffmpeg.so to ToN/lib/.
3. Move the www folder and the package.json from the downloaded game to our new ToN folder (repeat this step when updating the game - merge and overwrite just the www folder).
4. Run ./nw from our new ToN folder (make it executable first if needed: chmod +x nw)
 

cold_arctus

Devoted Member
Sep 25, 2018
8,945
10,816
  • Like
Reactions: rrxm and Pigfarmer

Pigfarmer

Member
May 25, 2019
274
617
which NWJS do you use? People reported freezes with the newer version and had to downgrade their NWJS version - which fixed the issue.
I was using 0.47.1. I'll try a few different ones and see if it helps. Any idea which version the other folks downgraded to?
 

HentaiOnLinux

New Member
Aug 18, 2020
7
5
Question for my fellow penguins, does anyone have a workaround / patch for Custom Order Maid 3D2 start up times in Wine? The game runs fine, but takes an age to start (~5 minutes?). I assume it's something to do with hooking out to a missing VR call normally found in windows? Suggestions?
 

ririmudev

Member
Dec 15, 2018
304
302
Just wondering, any commentary on Ubuntu 20 and Wine generally? I know new versions always have some amount of backwards movement, so I'm wondering how much of a headache it would be to upgrade one of my machines and still be able to run most programs in my `H` folder...

(also, I always like to hear exact OS versions and wine versions - I'd much rather pick known-to-work versions, rather than latest versions which "should be fine"...)
 
Nov 24, 2019
283
260
Just wondering, any commentary on Ubuntu 20 and Wine generally? I know new versions always have some amount of backwards movement, so I'm wondering how much of a headache it would be to upgrade one of my machines and still be able to run most programs in my `H` folder...

(also, I always like to hear exact OS versions and wine versions - I'd much rather pick known-to-work versions, rather than latest versions which "should be fine"...)
I've been using Ubuntu 18.04 with Wine 5, runs smoothly with little to no problem (self-compiled, I mostly use 64 bits architeture with sysWOW).

However, for Adobe AIR games, I had to use Wine 1.6 (or maybe Wine 3? The default one from Ubuntu 18 repository) in a 32 bit installation.

I always run wine with q4wine, whom is also set to run from a special group which firewall rules drop inbound and outbound network traffic. (Better safe than sorry when it is about Windows' stuff). I also, out of habit, disabled winegstreamer from winecfg and always run my programs on a Windows 7 emulation. Ironically, I did not sandbox the wine prefix (so it still have access to the whole /home/ directory).


I don't know about other versions, and perhaps updating would be better in terms of security and reliability. A few games won't run, naturally. I installed K3Lite pack + the codecs provided by Winetricks, however, sometimes, the games do not have sound. It is very common when the sounds are in MIDI format, and still somewhat common for RPGMaker-based games (specially those using RPGMaker MV). Some of these RPG Maker games can be run using NW directly, however, and that fixes sound; But some other have... weird plugins which try to interact with the OS, and obviously they will fail outside wine. (And also why I always use the firewall drop rule...)

That is my personal experience and setup.
(PS. I do note several games present more reliable behavior running in a virtual desktop than running virtually. Specially Unity games, these games almost always freeze when they lose focus, unless you give them a virtual desktop so they always have focus even when you minimize the desktop.)
 

Killerbee8967

Newbie
Jun 10, 2020
80
42
is there a way to play Linus on Mac, I'm using the recent wine 5.0, and decided to take shot on learning how to used Linus. much help would appreciated
 

cold_arctus

Devoted Member
Sep 25, 2018
8,945
10,816
is there a way to play Linus on Mac, I'm using the recent wine 5.0, and decided to take shot on learning how to used Linus. much help would appreciated
Yes, you can install Linux next to macOS as dual boot.

Download any Linux Distro .iso of your liking, for example Ubuntu (good start for novice), and create either a bootable USB-stick or a CD.

During installation make sure you do not choose to delete your existent HDD, but want to install Ubuntu next to it!
 

Xorgroth

Well-Known Member
Modder
Oct 12, 2017
1,090
1,116
is there a way to play Linus on Mac, I'm using the recent wine 5.0, and decided to take shot on learning how to used Linus. much help would appreciated
Did you mean use PlayOnLinux for Mac? Like using the program on a Mac? Think there's a app called PlayOnMac. Never used it though since I don't have a Mac.
 

Killerbee8967

Newbie
Jun 10, 2020
80
42
Did you mean use PlayOnLinux for Mac? Like using the program on a Mac? Think there's a app called PlayOnMac. Never used it though since I don't have a Mac.
Well to be honest, I’m kinda embarrassed that I confused Linus with nw.js. I was sent to this forum as someone told me you guys can explain how to used Nw.js on Mac, but I’m not sure if Linus and nw.js are the same thing as I’m learning all of this. Sorry for the confusion
 

cold_arctus

Devoted Member
Sep 25, 2018
8,945
10,816
Well to be honest, I’m kinda embarrassed that I confused Linus with nw.js. I was sent to this forum as someone told me you guys can explain how to used Nw.js on Mac, but I’m not sure if Linus and nw.js are the same thing as I’m learning all of this. Sorry for the confusion
First, Linus is a guys name. Linux is an operation system such as Windows, macOS, Android or iOS are.

Second, nw.js has nothing to do with with Linux or any other operation system (OS). It is a web-kit (module) which allows application to run through a browser (???) (please correct me I'm not entirely sure what it really does or how it really works!).

I'm guessing you try to run games made with RPG Maker (MV) on your Mac nativley, which use nw.js to run on a numbers of platforms (several OS).

Since nw.js supports macOS too you can play any game made with RPG Maker (MV) natively on your Mac - by downloading the Windows version of the game - without the need of Wine or other "emulation" applications.

The easiest why to achieve this is by downloading the native RPG Maker (MV) launcher for Mac. Thanks to user pk2000 all launchers are available in his RPG Maker (MV) thread. A link to his thread you will find in my signature below. There you also will find all information on how to user-port a game from Windows to Mac.
 
Last edited:

Killerbee8967

Newbie
Jun 10, 2020
80
42
First, Linus is a guys name. Linux is an operation system such as Windows, macOS, Android or iOS are.

Second, nw.js has nothing to do with with Linux or any other operation system (OS). It is a web-kit (module) which allows application to run through a browser (???) (please correct me I'm not entirely sure what it really does or how it really works!).

I'm guessing you try to run games made with RPG Maker (MV) on your Mac nativley, which use nw.js to run on a numbers of platforms (several OS).

Since nw.js supports macOS too you can play any game made with RPG Maker (MV) natively on your Mac - by downloading the Windows version of the game - without the need of Wine and other "emulation" applications.

The easiest why to achieve this is by downloading the native RPG Maker (MV) launcher for Mac. Thanks to user pk2000 all launchers are available in his RPG Maker (MV) thread. A link to his thread you will find in my signature below. There you also will find all information on how to user-port a game from Windows to Mac.
Thank you
 
5.00 star(s) 3 Votes