How do I read external file (txt, png, ogg) in linux (nw.js)

Get help using Construct 2

Post » Fri Aug 26, 2016 5:54 am

Hi,
I'm near to finish my game, it works perfectly in win7.
I installed virtualbox with Ubuntu to test it in linux. I've got the game work, but there is no way to load the savegame, play music, ... read any external file.

-I can create files, the savegame work.
-I use: NWjs.AppFolder & "save/slot1.sav" (it works in windows)
-"NWjs path exists" detect the file.
-The files have the read permission.

Here's a sample source code:
https://drive.google.com/open?id=0B9sGs ... XhXQnRScG8
And exported to linux64 example:
https://drive.google.com/open?id=0B9sGs ... WNHVkM3eTQ
(With the "save" folder and 3 sample files)
(You need "chmod a+x nw" to execute)

I'm total noob in linux, there is something I must know about how to read files?
Thank you
B
10
S
5
G
1
Posts: 26
Reputation: 1,452

Post » Sun Aug 28, 2016 9:53 am

I install mac OS X 10.11 in virtualbox and I have the same problem. I can't read external files. It only work in windows.

The only way I have managed to open a file is through:
NWjs.ReadFile( NWjs.AppFolder & "a.txt" )
I can change all AJAX functions to use this... But I already can't load images or music.
B
10
S
5
G
1
Posts: 26
Reputation: 1,452


Return to How do I....?

Who is online

Users browsing this forum: KSLR and 42 guests