jatinchowdhury18 / vscode-supercollider

A VS Code extension for the SuperCollider language
MIT License
9 stars 5 forks source link

Problem in OSX #1

Open IpadDilectio opened 5 years ago

IpadDilectio commented 5 years ago

Hello,

In osx I can't launch the command from Ctrl + Shift + b, because of this error message 👎

imac:~ lyann$ & "/Applications/SuperCollider⁩/\sclang.exe" /Users/lyann/Music/SC/SC-2019/Mai/Médolie-ajam.scd bash: syntax error near unexpected token `&' imac:~ lyann$

Can You help me, please ?

sclang.exe is for windows not for osx and I think path is different in osx than in windows.

Any Idea ?

Sincerely yours.

Dilectio

jatinchowdhury18 commented 5 years ago

Hi Dilectio,

Thanks for the note. I believe I mentioned this in the README, but since I've only been able to test on Windows, I figured there would be some problems on OSX.

You're right that .exe shouldn't be the correct program to run on OSX, but the error message seems to imply that the terminal is also be having trouble with the "&" at the beginning of the command (which I needed for the command to work on Windows).

I can start fiddling with the extension logic so that different commands can run on different OS's. In the meantime, if you might be able to figure out a command that works correctly on your machine that would super helpful for me. As a first go, I would try: imac:~ lyann$ "/Applications/SuperCollider⁩/sclang.app" /Users/lyann/Music/SC/SC-2019/Mai/Médolie-ajam.scd

Though you may need to dig a little bit more to find the sclang executable.

Thanks, Jatin

IpadDilectio commented 5 years ago

Hello Jatin,

Thanks for your fast answer ! Yes you mentioned this in your README, but I tried...

If you need sclang on OSX, I think it's better to try imac:~ lyann$ "/Applications/SuperCollider/SuperCollider.app/Contents/MacOS/sclang" /Users/lyann/Music/SC/SC-2019/Mai/Médolie-ajam.scd

sclang seems to be the program in bash prompt and Supercollider the graphic way of it.

Is this help you ?

Sincerely yours.

Dilectio

jatinchowdhury18 commented 5 years ago

Hi Dilectio,

Yes, this is definitely helpful. Turns out there were two parallel problems. One of them is fixed by replacing sclang.exe with the path you mentioned for OSX. The other issue is that Powershell (the default shell for Windows) requires the command to begin with &, which causes an error in bash shells such as the OSX default. For the moment I've pushed an update that allows you to specify the entire command (aside from the file name). I feel like there should be a better solution, but hopefully this does the job for now. Let me know if this works for you.

Thanks, Jatin

DSastre commented 4 years ago

Hi Jatin,

I just tested it on OSX. Your workaround works, thank you! If I find some free time, I'd like to contribute to automatize this step depending on the underlying OS.

All the best, Matthias

jatinchowdhury18 commented 4 years ago

@DSastre, this would be great! I know the Python extension is able to automatically find any installations of Python availanle on your system (probably other extensions do this as well?). Unfortunately, I haven't had much time to continue working on this lately (or to program much in SuperCollider at all, which is even more unfortunate).

Any contributions would be welcome, I can do my best to help with testing. If you would like to take further ownership of this project, that would be okay as well. Unfortunately, I don't have enough free time to keep maintaining this project regularly, but hopefully it can live on!

Thanks, Jatin

DSastre commented 4 years ago

@jatinchowdhury18 Sound good! If it is fine for you I can take the ownership and work more regularly on this extension. Right now I have some spare time and I was looking for ways to contribute to the SC-Community. Since I really like VS Code this extension seems perfect for this matter. :)

Another feature for the extension would be the execution of specific code blocks to enable the possibility of live coding, or to automate the s.waitForBoot-block so that regular SuperCollider-files don't need any modification to run in VS Code. But these are just ideas right now...

Greetings from Germany, Matthias