Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use code from sbl/scvim #11

Merged
merged 127 commits into from
Jan 29, 2017
Merged

Use code from sbl/scvim #11

merged 127 commits into from
Jan 29, 2017

Conversation

gusano
Copy link
Member

@gusano gusano commented Jan 17, 2017

Fix supercollider/supercollider#2550
Fix #7
Re supercollider/supercollider#2652

This replaces (via merging + cleanup) the current master with sbl/scvim master branch and adds a couple of improvements:

  • it allows users to install scvim via vim-plug
  • building sc with -DSC_VIM only installs SCVim.sc so users will need to install the vim plugin separately

cc @sbl @carlocapocasa the last 4 commits below are relevant

@eirikblekesaune
Copy link
Member

eirikblekesaune commented Jan 17, 2017

Testing it on OS X now, installing it on a clean install of OS X 10.12.2.
Installing with Pathogen works, tags works, cmake installing script works.
There are some small things with the OS X install process but I think I'll make separate issues for those as this PR mostly concerns merging from sbl/scvim.

Will test on RPi tomorrow.

Edit: I added the small install issues in a review below instead.

Copy link
Member

@eirikblekesaune eirikblekesaune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small nicks with OS X installing.

DESTINATION /Library/Application\ Support/SuperCollider/Extensions/scvim
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
install(FILES sc/SCVim.sc
DESTINATION /Library/Application\ Support/SuperCollider/Extensions/scvim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This installs to system wide Library folder. Should rather be ~/Library/Application\ Support/SuperCollider/Extensions/scvim .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blacksound Didn't know that MacOS libraries go into user directory. Will change that.


def self.sclang_path
if @@sclang_path.empty?
if File.exists?("/Applications/SuperCollider.app/Contents/Resources/sclang")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually when installing SuperCollider from a .dmg people end up with the path: /Applications/SuperCollider/SuperCollider.app/Contents/Resources/sclang.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also goes for installing with cmake flag -DINSTALL_PREFIX_PATH=/Applications when building SuperCollider.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In >= 3.7.2 the location of sclang within the .app file changed. It is now at
/SuperCollider.app/Contents/MacOS/sclang

Copy link
Member Author

@gusano gusano Jan 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blacksound @brianlheim I have no idea about MacOS... Should it be changed to /Applications/Supercollider.app/Contents/MacOS/sclang? Or maybe check for both paths? (before and after 3.7.2)

ps: this is not related to this PR :) so I'd rather change that later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are still some people on 3.6.6, so it might be a good idea to check for both paths! I don't have a strong opinion one way or the other, but it should at the very least check the newer path.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianlheim Yeah that seems safer. Do you mind confirming the path for < 3.7.2 and I'll change it right away?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure, the path for sclang is exactly what @blacksound gave above -- SuperCollider.app/Contents/Resources/sclang

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianlheim you mean /Applications/SuperCollider/SuperCollider.app/Contents/Resources/sclang right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prefix could be either /Applications/SuperCollider/SuperCollider.app or /Applications/SuperCollider.app depending on how the user performs the installation.

If your SuperCollider version wasn't build with vim support (i.e. if the class
`SCVim` does not exist), you'll need to symlink `sc/SCVim.sc` somewhere where
SuperCollider can find it. Typically that would be in `Platform.userExtensionDir`
(from within SuperCollider).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also note that you could add ~/.vim/bundle/scvim/sc to includePaths: in sclang_conf.yaml. Might be easier than making a symlink maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blacksound Yeah I will add that, although scvim users probably already know this :)

@gusano
Copy link
Member Author

gusano commented Jan 18, 2017

@blacksound @brianlheim pushed your suggested changes

@eirikblekesaune eirikblekesaune merged commit cdb6fb9 into supercollider:master Jan 29, 2017
@mossheim
Copy link
Contributor

woooooooooo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants