coronalabs / CoronaSDK-SublimeText

Corona Editor is the official Corona SDK plugin for Sublime Text
https://coronalabs.com
MIT License
108 stars 28 forks source link

Update CoronaSDK.sublime-build #1

Closed Givemeyourgits closed 10 years ago

Givemeyourgits commented 11 years ago

Fixed Windows support:

1) Long file name does not work when specifying a file parameter (must use 8.3 notation due to Sublime bug) 2) Re-added shell so print and console messages can be seen as Corona does not place output in Sublime Console window like OSX does.

Returned Working Directory parameter.

ghost commented 11 years ago

Thanks for the pull request for Windows.

I'll need to figure out how to manage the 8.3 paths because the path on your machine:

  "cmd": ["C:\\Progra~2\\Corona~1\\Corona~1\\Corona~2.exe", "main.lua"],

is different on my Windows machine:

  "cmd": ["C:\\Progra~1\\Corona~1\\Corona~1\\Corona~1.exe", "main.lua"],

I'm also having trouble with the "shell" option as it doesn't cause the output of the Simulator to go into the Build Results window (though it does prevent running apps off a network drive).

Givemeyourgits commented 11 years ago

When I go without shell, I am unable to get any output from Console or Print statements on Windows. It doesn’t work like OSX where it puts the results in Sublime’s console. Did you manage to get that to work? I haven’t in ages, but I have always used shell so I get a cmd prompt that shows the output. Otherwise there is no way to get the output on Windows.

Plus in the end, the cmd prompt works better as the output console in sublime disappears quickly and you constantly find yourself resizing it larger and smaller as your testing and trying to get it away.

As for the path, that’s possible because differences between Windows versions changed path slightly. Newer versions have an additional program folder. That’s something that will likely need to be put into a user settings configuration file. If default path doesn’t work, customize it in user.settings. The plugin should have its own default settings and user settings. Ideally available in package control menu for easy access.

I sent Walter a few more suggestions, and the current version of the plugin doesn’t seem to be working for me on OSX/Windows. I tried directly from GitHub a few days ago and it worked but had the problems with the build file. This version from Package Control directly doesn’t seem to give me any completions. I removed the github plugin version and the version I started before sending it to Walter.

Did you get the suggestions I made to Walter as well? I think renaming the language file to be ‘Corona SDK’ instead of ‘CoronaSDKLua” would look nicer. As well as the build file changing to ‘Corona SDK’ by just adding a space to the file name.

Also adding a default and user settings file with links in the package control menu like some of the popular plugins do. Here is an example: http://screencast.com/t/CftnEEsm

If you want to discuss over the phone, feel free to call me.

From: Perry Clarke [mailto:notifications@github.com] Sent: Monday, October 7, 2013 5:30 PM To: coronalabs/CoronaSDK-SublimeText Cc: Christopher R. Spence Subject: Re: [CoronaSDK-SublimeText] Update CoronaSDK.sublime-build (#1)

Thanks for the pull request for Windows.

I'll need to figure out how to manage the 8.3 paths because the path on your machine:

"cmd": ["C:\Progra~2\Corona~1\Corona~1\Corona~2.exe", "main.lua"],

is different on my Windows machine:

"cmd": ["C:\Progra~1\Corona~1\Corona~1\Corona~1.exe", "main.lua"],

I'm also having trouble with the "shell" option as it doesn't cause the output of the Simulator to go into the Build Results window (though it does prevent running apps off a network drive).

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-25846971.

This email has been scanned by the MX Police managed email security.

ghost commented 11 years ago

On Oct 7, 2013, at 2:39 PM, Givemeyourgits notifications@github.com wrote:

When I go without shell, I am unable to get any output from Console or Print statements on Windows. It doesn’t work like OSX where it puts the results in Sublime’s console. Did you manage to get that to work? I haven’t in ages, but I have always used shell so I get a cmd prompt that shows the output. Otherwise there is no way to get the output on Windows.

Plus in the end, the cmd prompt works better as the output console in sublime disappears quickly and you constantly find yourself resizing it larger and smaller as your testing and trying to get it away.

When you start the Simulator on Windows you should get the Welcome screen (or the last project you were working on) and the "Corona Simulator Output" window which contains all the "console" output from your app. In fact, we can't figure out how you'd run the Simulator without seeing the output window. I'd suggest removing your Corona Simulator preferences and starting over to see if that fixes the problem. When I do a build in Sublime the Simulator starts and the output window appears so I can see the console output which is why I didn't feel it was a big deal that the output didn't appear in Sublime.

As for the path, that’s possible because differences between Windows versions changed path slightly. Newer versions have an additional program folder. That’s something that will likely need to be put into a user settings configuration file. If default path doesn’t work, customize it in user.settings. The plugin should have its own default settings and user settings. Ideally available in package control menu for easy access.

Short paths are generated based on what's in a directory when the new path is created. They can, and often are different on different machines. For example, if someone had installed an application from "Corona Software" before installing the Simulator then the short name of their "Corona Labs" directory would be "\CORONA~2" not "\CORONA~1". We'll need to find a portable way of using short paths if they are necessary. Can you describe in detail what the bug is that using long paths causes?

I sent Walter a few more suggestions,

I've seen those, thanks. I'm thinking about how best to implement the fuzzy matching (possibly optionally) when there's a very large list of completions. I see your point about how you use it and it makes sense.

and the current version of the plugin doesn’t seem to be working for me on OSX/Windows. I tried directly from GitHub a few days ago and it worked but had the problems with the build file. This version from Package Control directly doesn’t seem to give me any completions. I removed the github plugin version and the version I started before sending it to Walter.

Several people have installed the plugin from Package Control today and it's working fine (version 0.8.5).

Did you get the suggestions I made to Walter as well? I think renaming the language file to be ‘Corona SDK’ instead of ‘CoronaSDKLua” would look nicer. As well as the build file changing to ‘Corona SDK’ by just adding a space to the file name.

The syntax file already has a "display name" specified in the XML file so it shows as "Corona SDK Lua" on all the machines here. I'll fix the build system too.

I'll take a look at the Package Control menu options.

Thanks for all the feedback.

Perry

Givemeyourgits commented 11 years ago

It showed up as ‘CoronaSDKLua’ when I tested it, the file name is what controls the display name. I think the lua isn’t required in the name, but that’s my preference.

As for the short file name, I know it varies machine to machine, if I do a dir /x (that shows 8.3 names) mine is Progra~1 as well. But for some reason it never worked if I specified that. If I do Progra~2 it works fine. It’s very weird but all because Sublime has a bug that if you add “main.lua” as an argument, you can no longer use long file names on Windows. It will fail, if you use 8.3 notation it just works, it is very silly. I asked a few times to get this fixed but I never got a response. It’s very odd and I see this across at least windows machines it was installed on. Jon (the guy who makes sublime) is notorious for not responding to support requests and bug reports directly if at all.

I will try it tonight and see how the console works for me, when I originally setup my build script around a year ago the only way to get output from Corona was to use shell = true so a command prompt will open. Otherwise it didn’t work, but on OSX it works right inline in Sublime.

I will make a video showing the behavior I see.

As for Fuzzy, when I first started the plugin, that was the biggest benefit (right after having an up to date API list which I could no way maintain on my end without Corona’s help).

I’ll remove the plugin and try it again. I removed my version as well as the github version but I will do all that again to check to see if I see the issue still. I tried it twice but I could not get completions to work. Yet when I tried it directly from Github a couple of days ago it worked fine minus the build issues and lack of fuzzy.

You can reach me at (603) 685-4154 if you want to discuss it.

From: Perry Clarke [mailto:notifications@github.com] Sent: Monday, October 7, 2013 6:10 PM To: coronalabs/CoronaSDK-SublimeText Cc: Christopher R. Spence Subject: Re: [CoronaSDK-SublimeText] Update CoronaSDK.sublime-build (#1)

On Oct 7, 2013, at 2:39 PM, Givemeyourgits notifications@github.com<mailto:notifications@github.com> wrote:

When I go without shell, I am unable to get any output from Console or Print statements on Windows. It doesn’t work like OSX where it puts the results in Sublime’s console. Did you manage to get that to work? I haven’t in ages, but I have always used shell so I get a cmd prompt that shows the output. Otherwise there is no way to get the output on Windows.

Plus in the end, the cmd prompt works better as the output console in sublime disappears quickly and you constantly find yourself resizing it larger and smaller as your testing and trying to get it away.

When you start the Simulator on Windows you should get the Welcome screen (or the last project you were working on) and the "Corona Simulator Output" window which contains all the "console" output from your app. In fact, we can't figure out how you'd run the Simulator without seeing the output window. I'd suggest removing your Corona Simulator preferences and starting over to see if that fixes the problem. When I do a build in Sublime the Simulator starts and the output window appears so I can see the console output which is why I didn't feel it was a big deal that the output didn't appear in Sublime.

As for the path, that’s possible because differences between Windows versions changed path slightly. Newer versions have an additional program folder. That’s something that will likely need to be put into a user settings configuration file. If default path doesn’t work, customize it in user.settings. The plugin should have its own default settings and user settings. Ideally available in package control menu for easy access.

Short paths are generated based on what's in a directory when the new path is created. They can, and often are different on different machines. For example, if someone had installed an application from "Corona Software" before installing the Simulator then the short name of their "Corona Labs" directory would be "\CORONA~2" not "\CORONA~1". We'll need to find a portable way of using short paths if they are necessary. Can you describe in detail what the bug is that using long paths causes?

I sent Walter a few more suggestions,

I've seen those, thanks. I'm thinking about how best to implement the fuzzy matching (possibly optionally) when there's a very large list of completions. I see your point about how you use it and it makes sense.

and the current version of the plugin doesn’t seem to be working for me on OSX/Windows. I tried directly from GitHub a few days ago and it worked but had the problems with the build file. This version from Package Control directly doesn’t seem to give me any completions. I removed the github plugin version and the version I started before sending it to Walter.

Several people have installed the plugin from Package Control today and it's working fine (version 0.8.5).

Did you get the suggestions I made to Walter as well? I think renaming the language file to be ‘Corona SDK’ instead of ‘CoronaSDKLua” would look nicer. As well as the build file changing to ‘Corona SDK’ by just adding a space to the file name.

The syntax file already has a "display name" specified in the XML file so it shows as "Corona SDK Lua" on all the machines here. I'll fix the build system too.

I'll take a look at the Package Control menu options.

Thanks for all the feedback.

Perry

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-25849753.

This email has been scanned by the MX Police managed email security.

Givemeyourgits commented 11 years ago

It looks like it works in ST2, but not in ST3 (which many of us have already switched to).

Here is a video: http://screencast.com/t/6sgiC2iAO

I installed ST2 (haven’t used it in ages) and tried the package and it works there. Are you using Python 2 or 3?

This is odd though, as I tried the plugin a few days ago right from GitHub and it worked fine in ST3 at the time.

Christopher

ph: (800) 820-6772 (Main) fx: (866) 334-2472

Follow me on Twitterhttp://www.twitter.com/crspence! (@crspence) Linked In: http://www.linkedin.com/in/christopherspence About me: http://about.me/christopherspence

From: Perry Clarke [mailto:notifications@github.com] Sent: Monday, October 7, 2013 6:10 PM To: coronalabs/CoronaSDK-SublimeText Cc: Christopher R. Spence Subject: Re: [CoronaSDK-SublimeText] Update CoronaSDK.sublime-build (#1)

On Oct 7, 2013, at 2:39 PM, Givemeyourgits notifications@github.com<mailto:notifications@github.com> wrote:

When I go without shell, I am unable to get any output from Console or Print statements on Windows. It doesn’t work like OSX where it puts the results in Sublime’s console. Did you manage to get that to work? I haven’t in ages, but I have always used shell so I get a cmd prompt that shows the output. Otherwise there is no way to get the output on Windows.

Plus in the end, the cmd prompt works better as the output console in sublime disappears quickly and you constantly find yourself resizing it larger and smaller as your testing and trying to get it away.

When you start the Simulator on Windows you should get the Welcome screen (or the last project you were working on) and the "Corona Simulator Output" window which contains all the "console" output from your app. In fact, we can't figure out how you'd run the Simulator without seeing the output window. I'd suggest removing your Corona Simulator preferences and starting over to see if that fixes the problem. When I do a build in Sublime the Simulator starts and the output window appears so I can see the console output which is why I didn't feel it was a big deal that the output didn't appear in Sublime.

As for the path, that’s possible because differences between Windows versions changed path slightly. Newer versions have an additional program folder. That’s something that will likely need to be put into a user settings configuration file. If default path doesn’t work, customize it in user.settings. The plugin should have its own default settings and user settings. Ideally available in package control menu for easy access.

Short paths are generated based on what's in a directory when the new path is created. They can, and often are different on different machines. For example, if someone had installed an application from "Corona Software" before installing the Simulator then the short name of their "Corona Labs" directory would be "\CORONA~2" not "\CORONA~1". We'll need to find a portable way of using short paths if they are necessary. Can you describe in detail what the bug is that using long paths causes?

I sent Walter a few more suggestions,

I've seen those, thanks. I'm thinking about how best to implement the fuzzy matching (possibly optionally) when there's a very large list of completions. I see your point about how you use it and it makes sense.

and the current version of the plugin doesn’t seem to be working for me on OSX/Windows. I tried directly from GitHub a few days ago and it worked but had the problems with the build file. This version from Package Control directly doesn’t seem to give me any completions. I removed the github plugin version and the version I started before sending it to Walter.

Several people have installed the plugin from Package Control today and it's working fine (version 0.8.5).

Did you get the suggestions I made to Walter as well? I think renaming the language file to be ‘Corona SDK’ instead of ‘CoronaSDKLua” would look nicer. As well as the build file changing to ‘Corona SDK’ by just adding a space to the file name.

The syntax file already has a "display name" specified in the XML file so it shows as "Corona SDK Lua" on all the machines here. I'll fix the build system too.

I'll take a look at the Package Control menu options.

Thanks for all the feedback.

Perry

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-25849753.

This email has been scanned by the MX Police managed email security.

ghost commented 10 years ago

The Corona Editor build system has been updated to support the latest Simulator options and support the "\Program Files (x86)" folder on more recent versions of Windows which I think makes this pull request moot.

Givemeyourgits commented 10 years ago

Works good here now! I love how you made it so it outputs in the build output window just like OSX. Love to see Fuzzy was added, much better!

It’s working like a champ now. Thanks!

Christopher

From: Perry Clarke [mailto:notifications@github.com] Sent: Wednesday, October 23, 2013 7:55 PM To: coronalabs/CoronaSDK-SublimeText Cc: Christopher R. Spence Subject: Re: [CoronaSDK-SublimeText] Update CoronaSDK.sublime-build (#1)

The Corona Editor build system has been updated to support the latest Simulator options and support the "\Program Files (x86)" folder on more recent versions of Windows which I think makes this pull request moot.

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-26956466.

This email has been scanned by the MX Police managed email security.

Givemeyourgits commented 10 years ago

By the way, I’m not getting updates (neither is my friend) we only get them when we uninstall the plugin and reinstall it. Are you tagging them as you update them, I believe that is how Package Control picks up the changes and pushes them out.

Christopher

From: Perry Clarke [mailto:notifications@github.com] Sent: Wednesday, October 23, 2013 7:55 PM To: coronalabs/CoronaSDK-SublimeText Cc: Christopher R. Spence Subject: Re: [CoronaSDK-SublimeText] Update CoronaSDK.sublime-build (#1)

The Corona Editor build system has been updated to support the latest Simulator options and support the "\Program Files (x86)" folder on more recent versions of Windows which I think makes this pull request moot.

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-26956466.

This email has been scanned by the MX Police managed email security.

ghost commented 10 years ago

Sorry just found this email …

Yes I'm tagging the releases but I'll take a look and see what's going on. Thanks for the heads up.

Perry

On Oct 23, 2013, at 8:22 PM, Givemeyourgits notifications@github.com wrote:

By the way, I’m not getting updates (neither is my friend) we only get them when we uninstall the plugin and reinstall it. Are you tagging them as you update them, I believe that is how Package Control picks up the changes and pushes them out.

Christopher

From: Perry Clarke [mailto:notifications@github.com] Sent: Wednesday, October 23, 2013 7:55 PM To: coronalabs/CoronaSDK-SublimeText Cc: Christopher R. Spence Subject: Re: [CoronaSDK-SublimeText] Update CoronaSDK.sublime-build (#1)

The Corona Editor build system has been updated to support the latest Simulator options and support the "\Program Files (x86)" folder on more recent versions of Windows which I think makes this pull request moot.

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-26956466.

This email has been scanned by the MX Police managed email security. — Reply to this email directly or view it on GitHub.

Givemeyourgits commented 10 years ago

I also noticed a lot of functions don't have their parameters. Or the parameters are generic like just "options" which doesn't tell what it requires.

Christopher

On Oct 29, 2013, at 8:05 PM, "Perry Clarke" notifications@github.com<mailto:notifications@github.com> wrote:

Sorry just found this email …

Yes I'm tagging the releases but I'll take a look and see what's going on. Thanks for the heads up.

Perry

On Oct 23, 2013, at 8:22 PM, Givemeyourgits notifications@github.com<mailto:notifications@github.com> wrote:

By the way, I’m not getting updates (neither is my friend) we only get them when we uninstall the plugin and reinstall it. Are you tagging them as you update them, I believe that is how Package Control picks up the changes and pushes them out.

Christopher

From: Perry Clarke [mailto:notifications@github.com] Sent: Wednesday, October 23, 2013 7:55 PM To: coronalabs/CoronaSDK-SublimeText Cc: Christopher R. Spence Subject: Re: [CoronaSDK-SublimeText] Update CoronaSDK.sublime-build (#1)

The Corona Editor build system has been updated to support the latest Simulator options and support the "\Program Files (x86)" folder on more recent versions of Windows which I think makes this pull request moot.

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-26956466.

This email has been scanned by the MX Police managed email security. — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/coronalabs/CoronaSDK-SublimeText/pull/1#issuecomment-27355151.

This email has been scanned by the MX Police managed email security.