Problem with Node-webkit's "run file" action

Bugs will be moved here once resolved.

Post » Sat Aug 17, 2013 5:18 pm

I've found out a problem with Node-Webkit's "Run file" action. The problem is that the path of the file to execute with the "run file" action must NOT have any spaces on it. Otherwise it doesn't work.
I guess that's why it is not working in preview, using Node-Webkit as preview browser (at least for me), beacuse of the blank space in "Program Files" that is part of the AppFolder path.


Link to .capx file:
https://dl.dropboxusercontent.com/u/14522925/C2%20examples/NWRunFile.capx
(this capx was made by GeometriX)

Steps to reproduce:
If you export this project, or any other using "run file", to the Desktop in a folder with NO spaces in its name and execute it, the run file action works perfectly (There is no spaces in the hole appfolder path). Then move the same folder (or export it again) to Program Files for example, execute it, and run file stopped working (because of the sapces in the Appfolder path), at least for me.

We've been discussing this bug here too: http://www.scirra.com/forum/topic73313.html

Browsers affected:
Chrome: no
Firefox: no
Internet Explorer: no
Node-Webkit: yes

Operating system & service pack:
I've experience this in two different pcs, one with Windows 7 Home Premium SP1 64b, and the other one with Windows 8 Pro 64b.

Construct 2 version:
I've tested in R139, R140 and R141.   
B
7
S
1
Posts: 11
Reputation: 1,267

Post » Sun Aug 18, 2013 12:08 am

Yes it's true there is a bug but you can avoid it before this will be fixed

Create a constant text variable called quote and containing "
so this will display quote = """

And then use the run file command using
quote & NodeWebkit.AppFolder & "/dxwebsetup.exe" & quote

Doing so even with spaces in exe folder name or path (ex : "new project") the dxwebsetup program will be run, this is exactly the same way use by windows to manage spaces in path.

Strangely some others node webkit plugin commands are running well if AppFolfer name or path use spaces such as "List Files" or "Copy Files"naelian2013-08-18 00:40:33
B
18
S
5
G
3
Posts: 298
Reputation: 5,332

Post » Mon Aug 19, 2013 4:02 pm

Closing as not a bug. As the description of the action says, spaces are used to separate arguments. If you need to run a path with spaces in it, wrap it in double-quotes (as if you were running it on a command-line - since in fact it works by running a command-line statement).

Since expressions already use double-quotes to mark strings, to make a string containing a double quote you need to use two double quotes next to each other. For example: """C:\Program Files\File.exe""". Or in your case: """" & NodeWebkit.AppFolder & "/dxwebsetup.exe""". I've underlined the double-quotes that end up returning a single character - it's a little tricky, but it should work once you get the hang of it. I've updated the action description to include this tip.Ashley2013-08-19 16:02:54
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests