set plugin extension to .scx on all platforms#428
Conversation
in SC 3.15 the .so extension will be deprecated.
|
One question... What happens if the user has the old installed, updates, then rebuilds. What happens to the old files after installing the new ones? |
If installed manually: nothing, the user has to manually remove the old files. With the official sc3-plugins packages the package manager should be responsible for removing the old files. At least that's what I would think. |
I don't really know anything about this, but if you don't uninstall but instead just update, and the file changes, might you still be left with the old file? What would happen in that case? Would both be loaded? |
Debian packages have remove scripts that are responsible for removing files before a new version gets installed. If the package maintainer did a good job, the old
Both would be loaded, but the user still gets the deprecation warning. |
|
Uh oh... we haven't gotten around to releasing sc3-plugins version 3.14 and I have just thought to get around to it so that we have version partity and include some minor updates. Also pinging @capital-G so that we have this on our radar. |
|
Also... shouldn't we check for SC_VERSION here so that the plugins can still be built against older SC source? that way the change won't even be active in CI builds until we merge supercollider's future EDIT: maybe that is not needed; building against older SC can be done from older tags/source files. But we should make a 3.14 version that uses the old extension. |
Oh, I wasn't aware of that!
What is I assumed that sc3-plugins 3.15 and supercollider 3.15 would be released together. But actually you are right that the two projects don't necessarily have to be in sync. For example, the user might intentionally stay on an older SC version, but still want a newer sc3-plugins version. So yes, it would be nice if we could get the SC version at runtime and set the plugin extension accordingly. But how do we do that? The only thing we have is One possibility would be to parse the git tag of the SC repo, but this means that the user must clone SC from git. Another idea: compile a simple program that includes Anything else? |
|
We can access sc version at build time, that's what I'd suggest. It's in SC's CMakeLists.txt and is included in sc3-plugins cmake: https://github.com/supercollider/sc3-plugins/blob/main/CMakeLists.txt#L56-L57 I think something like this should work? if(${PROJECT_VERSION} VERSION_LESS 3.15 AND NOT WIN32 AND NOT APPLE)
set(CMAKE_SHARED_MODULE_PREFIX "")
set(PLUGIN_EXTENSION ".so")
endif() |
|
Ah, so the variable name is Actually, I think that Side note: it would be great if sc3-plugins could set a good example and also add a I have started adapting my own plugin CMakeLists.txt files in this regard: https://git.iem.at/aoo/aoo/-/blob/develop/sc/CMakeLists.txt?ref_type=heads#L7-28 The basic idea is that
Yes, that looks fine to me. |
We are also currently using here
Yeah, I think we currently don't really differentiate between the version of the plugins and sc - I'm guessing the assumption is that they should match. Since we don't have a separate numbering for sc3-plugins, I think introducing the differentiation would get confising - "these are plugins v 3.15 built against SC v. 3.14"...? Or do you think this is what we should have?
Oh, when building against system-installed SC headers? Yeah, that makes sense. It would be even better if we could get the version from the headers but that's not feasible, right?
Yeah, that's fair. And that script could probably be updated to search system directories, right? EDIT: I realize that we don't bundle the |
Just to be clear, the project(SuperCollider VERSION ${SC_VERSION_MAJOR}.${SC_VERSION_MINOR}.${SC_VERSION_PATCH})See also https://cmake.org/cmake/help/latest/variable/PROJECT_VERSION.html#variable:PROJECT_VERSION
Great, will do!
Theoretically, it's doable: you only need to compile a tiny test program that prints out the version number. The problem is that the version header Having a public version header would be great, though. Currently, I think using Side note: instead of / in addition to shipping find_package(SuperCollider3)
add_library(myPlugin MODULE)
target_link_library(myPlugin PRIVATE SuperCollider3::SuperCollider3)
Yes, that would be great!
Yes, that would be great! Actually, Pd does this, exactly for this very reason. I have always wondered by SC doesn't do this, I just always forgot to bring it up... |
What I meant was that they were removed from SCVersion.txt, so they won't show up after running
That's great, I didn't know. BTW who decides what's part of public headers? Do we have a way of ensuring everybody includes I'll take a look into adding the include folder to SC binaries. BUT again, where do we decide what to include? |
Ah, I see what you mean now!
Anything that's in
It is installed to I package maintainer would have to intentionally remove it and there is no good reason for doing so. |
|
Should I make a PR to use the old extension on Linux based on |
|
Sounds fine to me! |
in SC 3.15 the .so extension will be deprecated.