Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Can't get corona simulator command to work
Started by Klynt Dec 04 2017 07:19 PM

15 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

So I just got this Level Director and wanted to test it out.  I started at the beginning and am on basically step 2 and already stuck??? 

 

I installed the Level Director and am not attempting to create the corona simulator command to test out some of the examples.  The problem is... it doesn't do anything and just says failed.  I have tried all versions of / or \ I have tried _ instead of spaces I tried the %20, I have tried alot.  Why doesn't the below work, and yes its in the E drive and in the corona not corona SDK folder?

 

“E:/Program Files (x86)/Corona Labs/Corona/Corona Simulator.exe” “%PROJECT_PATH%main.lua”



[TOPIC: post.html]
#2

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

Hi, thanks for trying Level Director X.

 

The command looks ok, could you confirm that you have a project loaded when you try to run the command, also, when you say fails, does it run the simulator, and what message(s) do you see?



[TOPIC: post.html]
#3

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

Attached is what I am currently using and what error I am receiving.  

 

I even tried without the Project path info to see if it owuld just open the simulator but nope.  

 

I also tried to run as admin but nothing. 

Attached Files



[TOPIC: post.html]
#4

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

Please could you try copying the first part i.e. "E:/.....exe" into a cmd prompt (type cmd into search box) and see if it runs the simulator?



[TOPIC: post.html]
#5

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

Please could you try copying the first part i.e. "E:/.....exe" into a cmd prompt (type cmd into search box) and see if it runs the simulator?

 

Ok i tried it and it opens corona as it should by typing in the below to cmd prompt

“E:/Program Files (x86)/Corona Labs/Corona/Corona Simulator.exe


[TOPIC: post.html]
#6

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

I cannot reproduce this on my system, but I researched this error and it seems that it will fail in the following situations;

  1. Invalid command/Incorrect path - but you confirmed that this is ok
  2. Permission/Access error - Possibly caused by anti-virus or Windows itself

I can only think that is a permission error, another test would be to try and run a program that was not located in program files e.g. C:\temp and see if you get the same results.

 

Alternatively, what I do is run the simulator once, and every time you export the project the simulator will automatically prompt you that changes have been made, rather than closing the simulator and rerunning it each time.



[TOPIC: post.html]
#7

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

 I am looking at the error and at the end it is finding the main.lua but it has a differnt "/" symobol than the rest it.  Could that have anything to do with it? No idea just reaching for stars here.  

 

 

I can run the file via corona itself, and that seems to work as far as I can tell.  I guess i'll just have to do that from now on. 



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

Just to clarify.  Backslash \ is the Windows official path separator. For Unix/Linux based systems (macOS, iOS, Android) it's the forward slash /

 

However many Windows apps use the C Library which basically takes either \ or /.  This, of course, leads to frustration.

 

A trailing slash treats the last name before the slash as a directory. main.lua would not be a directory, so something that is .../main.lua/ would be trying to find a folder there.  

 

Are you saying a trailing slash is being added?

 

Rob



[TOPIC: post.html]
#9

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

Just to clarify.  Backslash \ is the Windows official path separator. For Unix/Linux based systems (macOS, iOS, Android) it's the forward slash /

 

However many Windows apps use the C Library which basically takes either \ or /.  This, of course, leads to frustration.

 

A trailing slash treats the last name before the slash as a directory. main.lua would not be a directory, so something that is .../main.lua/ would be trying to find a folder there.  

 

Are you saying a trailing slash is being added?

 

Rob

 

 

Rob, 

 

   No, it just looks like the below (which from your explanation is likely how it is supposed to look).

"...Documents/Corona Projects/MetalSlug\main.lua"

As you can see above the "/" before metal slug is all / and after is \.  But it sounds like that should be ok, correct? 


[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

I don't know what library tools Level Designer is using. I would, being on Windows, be consistent and use back-slashes (\) since that's what Windows is expecting. 

 

Rob



[TOPIC: post.html]
#11

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

I don't know what library tools Level Designer is using. I would, being on Windows, be consistent and use back-slashes (\) since that's what Windows is expecting. 

 

Rob

 

Yeah i dont' know. Its not something I can change. 



[TOPIC: post.html]
#12

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

Level Director uses the QT framework and it seems to store the filename when opened (Windows) with forward slashes and when I add a dir separator, it appends a backslash.

Although inconsistent, I've tried it on various PCs and it seems to work.

 

In this instance, from my understanding you can't even run the simulator i.e. removing the reference to the project path, so until we can get that working, the project path is irrelevant, and would indicate an access/permission issue.



[TOPIC: post.html]
#13

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

I am not sure what else to try.  I have ran in admin mode, I have turned off/on firewalls, I have tried / vs \.  nothing runs the command from within level director.  I can run corona separately and just do it that way.  Is there anything else as I get further into this program that requires commands?



[TOPIC: post.html]
#14

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,613 posts
  • Enterprise

Our friends from @retrofitProductions may disagree, but I have Corona Editor installed in my Sublime Text and I could use it to launch the simulator to run my project, but it's much faster to run the simulator from the operating system and have it in automatic update mode. That way when I save my edits in my editor, the simulator updates automatically. I don't have to pay for the startup time of the simulator every time I save.

 

I would assume Level Director can work the same way when you export the files, the simulator should update with the changes. I don't see the need to have Level Director launch Corona for you.

 

Rob



[TOPIC: post.html]
#15

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

Totally agree Rob, I mentioned something similar in my earlier post;

 

"Alternatively, what I do is run the simulator once, and every time you export the project the simulator will automatically prompt you that changes have been made, rather than closing the simulator and rerunning it each time."

 

That said, it is annoying it doesn't work, and as developers it is in our nature to fix things when they don't work  :)



[TOPIC: post.html]
#16

Klynt

[GLOBAL: userInfoPane.html]
Klynt
  • Enthusiast

  • 74 posts
  • Corona SDK

Yeah for me it was trying to follow the instructions. I have gotten it working by running it the Corona simulator separately and just hit restart after saving it. I was more concerned as why the command section wasn't working incase it is needed in the future for other parts of the program (haven't reviewed all the documentation yet)


[topic_controls]
[/topic_controls]