nwjs 'run file' bug (?)

Bugs will be moved here once resolved.

Post » Mon Jul 20, 2015 4:00 pm

Problem Description
The nwjs command 'run file' doesn't do anything.

Attach a Capx
https://dl.dropboxusercontent.com/u/705 ... e_bug.capx

Description of Capx
Bare-bones capx that tries to execute dxwebsetup.exe from within its build folder on start of layout.
Steps to Reproduce Bug
    Export the project then run it.

Observed Result
Nothing.
Expected Result
dxwebsetup.exe gets executed on layout start.
Affected Browsers
    nw.js

Operating System and Service Pack
Windows 7 Home Premium Service Pack 1
Construct 2 Version ID
210


-----
I guess I could just be using it wrong, but I don't see how from reading the manual.
Last edited by ErekT on Mon Jul 20, 2015 5:52 pm, edited 1 time in total.
B
38
S
16
G
6
Posts: 537
Reputation: 7,582

Post » Mon Jul 20, 2015 5:12 pm

@ErekT

You haven't set the 'Preview Browser' to NW.js, so how are you expecting this to work?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Jul 20, 2015 5:38 pm

This is something I've been thinking about for a little while now because nw.js will not function nearly well enough unless dxwebsetup.exe has been installed on the player's computer. I assume that you are not just sending a zipped folder of the nw.js files, because then you could just ask them to install dxwebsetup.exe as part of the process for your game; so are you using a program like InnoSetup to create a .exe file of your nw.js game? If so (and this is the area I have no experience of, but is the direction you should search) then you can use some help from stackoverflow which contains the code you need to place in your InnoSetup script before compiling the final .exe - I have not tried this myself yet, but I suspect that this is what you need...?

Edit - zenox is right, looking at your capx, and there's no example file or path to that example file in the nw object. I'm also not sure about what a player might think if a game just starts trying to run executables on the fly; just a thought.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,183

Post » Mon Jul 20, 2015 5:49 pm

@zenox98:
Oops, forgot to set it for the example capx. Anyways, I meant to say 'export project' in steps to reproduce.

@Colludium:
Ah, doing 'run file' on dxwebsetup.exe was just for testing actually :) The problem is I can't get the nwjs 'run file' command to run *any* executable files.
B
38
S
16
G
6
Posts: 537
Reputation: 7,582

Post » Mon Jul 20, 2015 6:03 pm

@ErekT

Does this work for you?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Jul 20, 2015 6:48 pm

I completely misunderstood what you were trying to do, lol. :)
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,183

Post » Mon Jul 20, 2015 7:19 pm

Colludium wrote:I completely misunderstood what you were trying to do, lol. :)

@Colludium:
Hehe, A for effort brudde ;)

@zenox98:
That worked. But I don't understand why my example doesn't?

Okay. To clarify, I'm trying to run an executable that changes OS resolution to something lower on game start, then switches back to the original resolution when the game quits, gets suspended, or goes into window mode. Does it have to be an 'on clicked' event maybe?
B
38
S
16
G
6
Posts: 537
Reputation: 7,582

Post » Thu Aug 06, 2015 12:31 pm

Closing as won't fix: you do not specify a full path, so the OS will try to guess the location of "dxwebsetup.exe". Presumably it guesses wrong and does not run the file. You probably want to include NWjs.AppFolder in the path to make it explicit.
Scirra Founder
B
387
S
229
G
87
Posts: 24,245
Reputation: 192,160


Return to Closed bugs

Who is online

Users browsing this forum: BackendFreak and 1 guest