Linux version generated with the NW.js it's not working

Discussion and feedback on Construct 2

Post » Fri Aug 19, 2016 8:38 pm

It is just a demo I would like to send to a possible client that use Linux. Anyway, I have installed the VirtualBox and the Ubuntu on my Mac (nice! :mrgreen: ). Now I can access the files that I generated for Linux. However, even change the file permissions to execute the "nw" file, the system is asking if I want to search for an app to open this file. Can someone help me?
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Sat Aug 20, 2016 10:52 am

UP
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Sun Aug 21, 2016 11:16 am

I'm still trying to execute the "nw" file without success. Any help, please? Thanks in advance.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Sun Aug 21, 2016 11:32 am

If the files sit in the shared folders (i.e. if you try to access it from within virtualbox, but they still sit on the regular filesystem) you might not be able to change the permission. I'm not familiar with it, but I remember from a long time ago (that was with virtualbox on windows) that you had to mount the shared filesystem in a very specific way and also add your linux user to a specific usergroup to be able to change the permissions and owners accordingly.

The simplest thing would (probably) be to copy the files into the linux file system and not try to get it right on the shared folders.
B
72
S
28
G
32
Posts: 477
Reputation: 19,640

Post » Sun Aug 21, 2016 11:48 am

Eisenhans wrote:If the files sit in the shared folders (i.e. if you try to access it from within virtualbox, but they still sit on the regular filesystem) you might not be able to change the permission. I'm not familiar with it, but I remember from a long time ago (that was with virtualbox on windows) that you had to mount the shared filesystem in a very specific way and also add your linux user to a specific usergroup to be able to change the permissions and owners accordingly.

The simplest thing would (probably) be to copy the files into the linux file system and not try to get it right on the shared folders.


Thanks @Eisenhans.

I will give it a try.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Tue Aug 23, 2016 10:41 am

I have compressed and copied the package to the home folder and after I extracted the files, I defined the file permission. When I try to execute the game the system continues to warning me that there is no application installed for "shared library" files and asking me if want to search one to open this file. I checked the properties and the location path is correct (/home/user/game) but in the location I have "shared library (application/x-sharedlib). I try to execute the app through the terminal and I got the message: "The program 'nw' is currently not installed. You can install it by typing sudo apt install newtrw". So, I did it and now, when I try to open the nw in the terminal, it shows a lot of options (nw [udp] <options> <host> <port>) . In the file manager, all remains the same (Could not display 'nw'. There is no application installed ...). I really need to show this demonstration for a possible client that only use linux. Any help, please?
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Tue Aug 23, 2016 11:05 am

RBuster wrote:I have compressed and copied the package to the home folder and after I extracted the files, I defined the file permission. When I try to execute the game the system continues to warning me that there is no application installed for "shared library" files and asking me if want to search one to open this file.


This typically happens, if you mismatch builds, like trying to execute a 32bit executable on a 64bit linux. Unlike windows, this does not work (not by default and requires some work). So if you have a 64bit Linux, be sure to use the 64bit executable.
B
72
S
28
G
32
Posts: 477
Reputation: 19,640

Post » Tue Aug 23, 2016 1:31 pm

Eisenhans wrote:
RBuster wrote:I have compressed and copied the package to the home folder and after I extracted the files, I defined the file permission. When I try to execute the game the system continues to warning me that there is no application installed for "shared library" files and asking me if want to search one to open this file.


This typically happens, if you mismatch builds, like trying to execute a 32bit executable on a 64bit linux. Unlike windows, this does not work (not by default and requires some work). So if you have a 64bit Linux, be sure to use the 64bit executable.


Oh man! Thank you so much. Now I can run the game from the terminal.

But unfortunately I've two problems now (an old and a new one): the application is not working properly: I'm using a xml to load images, text and a sound file that I 've imported to the Project Files and that are in the folder's root with the "nw" file. When I click to load one of these assets, nothing happens. My other problem is that I really need that the nw file can be executed through the file manager, is it possible?

Edited:

@Eisenhans

Can I share the files with you? It is just a small demo.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Tue Aug 23, 2016 3:05 pm

I have no idea about the XML problem (I have never tried that and also have not been using C2 for quite a while now), but for your issues with the executable, you can send me a PM with a link to a zip or something like that, then I will have a look at here on my linux PC.
B
72
S
28
G
32
Posts: 477
Reputation: 19,640

Post » Wed Aug 24, 2016 10:45 am

@RBuster

I checked your demo.
The thing on linux is: shared libraries (something like a .dll on windows) can be executable too, depending on how they are programmed. The file managers try to identify those by various methods and hide the executable options on them.
The problem is: the way modern executables are compiled those file managers sometimes misinterpret and have false positives. This is typically no problem, because, unlike on windows, people do not browse to a directory with a file manager and execute stuff there. You run your stuff either through your desktop environment (start menu entries or whatever the specific linux distribution offers for its own software), or by terminal.

The file manager that I have tested (thunar) falls for the nw-executable too and does not offer to execute it. There is probably no way to get this to work reliably, because of the way chromium is required to be built.
If your customer requires this: drop the customer ;)
B
72
S
28
G
32
Posts: 477
Reputation: 19,640

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests