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

[Linux] Default install to /usr/local/bin #131

Open
dromer opened this issue Feb 17, 2022 · 16 comments
Open

[Linux] Default install to /usr/local/bin #131

dromer opened this issue Feb 17, 2022 · 16 comments

Comments

@dromer
Copy link

dromer commented Feb 17, 2022

When one runs the install-script it should default to /usr/local/bin

Currently /usr/bin is used which is really bad practice. This is reserved for distro package manager installs and should never be used by third parties.
Also if one chooses to install to an alternate directory a lot of functionality fails because paths have been hard-coded internally to /usr/bin.

There is also a file opcodes.txt installed to the bin dir, which doesn't make any sense.

Please correct these issues.

@rorywalsh
Copy link
Owner

These are all good points. I typically run Cabbage out of the build directory myself so never have to worry about this. Do you feel like making a PR for a better install script? I'd be happy to merge. How about the other resources (examples/documentation.etc), are they going into an acceptable location?

@dromer
Copy link
Author

dromer commented Feb 17, 2022

No everything is currently going to reserved locations where they should be going to /usr/local as well.

Simply changing the install script won't work, because the applications have their internal locations hardcoded to /usr/bin path.
For instance if one wants to export a project, it will fail because it is expecting /usr/bin/CabbagePlugin. Maybe instead of the full path just the application-name should be used. Because these should already be in the $PATH of the user.

@rorywalsh
Copy link
Owner

So I can just use the location of the current binary to set the path for the plugins, like I do on other platforms. So basically scrap the if !def...

        String pluginFilename, fileExtension;
        File thisFile = File::getSpecialLocation (File::currentApplicationFile);
#if !defined(WIN32) && !defined(MACOSX)
        String currentApplicationDirectory = "/usr/bin";
#else
        String currentApplicationDirectory = thisFile.getParentDirectory().getFullPathName();
#endif

After that we only need to ensure that the plugins are in the same folder as the main application binary.

@dromer
Copy link
Author

dromer commented Feb 17, 2022

You shouldn't even need to think about the location of the binaries. If the user installed Cabbage, then all the Cabbage binaries are in the $PATH already.

You should only have to call the binary name. The full path is irrelevant.

(but maybe someone else needs to chime in on this :) )

@rorywalsh
Copy link
Owner

It should be simple enough to test. I won't be at my Linux machine for a few days, but if you wish to go ahead and test this I'd be more than happy to hear how it goes 👍

@dromer
Copy link
Author

dromer commented Feb 17, 2022

I don't have time today to try and build Cabbage, but thanks for looking in to this :)

@forrcaho
Copy link
Contributor

I just ran into this issue on my Debian sid machine. I had edited the install script to put everything under /usr/local but as soon as I tried to export a VST I get the error message "/usr/bin/CabbagePluginSynth.so cannot be found? It should be in the Cabbage root folder".

Personally I'd prefer an installation where all Cabbage-related files were under /usr/local/share/Cabbage, with symlinks from /usr/local/bin and /usr/local/lib as needed. It's hard to keep track of where all the locally-managed files on my system came from, and keeping all the files from one application in its own /usr/local/share folder really helps.

@rorywalsh
Copy link
Owner

Thanks @forrcaho Cabbage2 is EOL now. I'm happy to accept PR's for these changes. I'll be sure not to make the same mistake with Cabbage 3 ;)

@forrcaho
Copy link
Contributor

Unfortunately, I can't get this to build from source :-(

@rorywalsh
Copy link
Owner

What are the errors? The CI build for Linux seems to be passing without any issues. The steps it takes are outlined here:
https://github.com/rorywalsh/cabbage/blob/develop/azure-pipelines.yml#L63-L66

@forrcaho
Copy link
Contributor

I'm on Debian sid. I had to change references to webkit2gtk-4.0 to webkit2gtk-4.1, but I'm pretty sure I did that correctly and that's not related to this issue.

Here's a log of my build attempt.

cabbage_build.log.zip

@rorywalsh
Copy link
Owner

Are you sure you're building against the Csound6 branch?

@dromer
Copy link
Author

dromer commented Jan 26, 2025

Seems like a different issue that should get a separate ticket?

@forrcaho
Copy link
Contributor

This should be fixed with the PR I just submitted #156

@dromer
Copy link
Author

dromer commented Jan 27, 2025

@forrcaho thank you!

Hope to give this a try soon and will then close the ticket.

@dromer
Copy link
Author

dromer commented Jan 28, 2025

Ok I'm now very confused to how I do a build or test anything /o\

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

No branches or pull requests

3 participants