csound / csound

Main repository for Csound
https://csound.com
GNU Lesser General Public License v2.1
1.2k stars 189 forks source link

Distribute Csound for MacOS as a .bundle #1598

Open giovannibedetti opened 2 years ago

giovannibedetti commented 2 years ago

Hi,

To be able to import Csound in Unity correctly for the MacOS platform, I need it in the form of a ".bundle", instead of a ".framework".

Could it be added to the build pipeline maybe?

Here is a bash script with the steps to convert a ".framework" into a ".bundle":

convert_Csound_Framework_To_Bundle.sh.zip

Thanks!

vlazzarini commented 2 years ago

Can't you just rename the framework as a .bundle, create a MacOS dir inside it and put a symlink to CsoundLib64 there?

Then put in the info.plist and nothing else.

@rorywalsh do you know anything about this? I thought you used Csound in unity before.

giovannibedetti commented 2 years ago

Yes sure that is what the bash script is doing ;) The issue with Unity is that when building from Unity the .framework is not copied in the exported build, instead the .bundle is, so with the .bundle we have working MacOS builds.

vlazzarini commented 2 years ago

The script does a lot of copying and changing links. You may not need all that, just a symlink.

giovannibedetti commented 2 years ago

Thanks, I will try to use a symlink! Btw the script is from the Unity support team, I asked them for help for the build issues we had on MacOs with the .framework.

rorywalsh commented 2 years ago

@giovannibedetti and I have been doing it in a more brute force fashion. If having it as a .bundle means better integration into Unity, that's the way to go. @giovannibedetti , let me know how you get on. I will try to test the iOS stuff this week 👍

giovannibedetti commented 2 years ago

Have a look here, this is the whole conversation about the issue:

https://fogbugz.unity3d.com/default.asp?1311509_ukb6c3vemh2mq1d4

I can easily create the .bundle from the dmg, reinstalling Csound and grabbing the installed .framework from "Library/Frameworks". But it could be useful to have it distributed also without the installer maybe?

kunstmusik commented 8 months ago

Scheduling this for 7.0.0. It seems like it should not take too much work to add this to our build scripts as well as to github actions so that we're deriving a second artifact from our standard build.

vlazzarini commented 1 month ago

@giovannibedetti I am incorporating your script into our release building scripts. Just a question about this line:

cp CsoundLib64.framework.meta CsoundLib64.bundle.meta

what is CsoundLib64.framework.meta?

vlazzarini commented 1 month ago

A PR has been created to address this request.

giovannibedetti commented 1 month ago

Thanks for this Victor!

The meta files should be generated by Unity (a .meta file exists for every file and folder in the Unity project), so I think that line can be removed from the script

Il Mar 11 Giu 2024, 19:36 vlazzarini @.***> ha scritto:

A PR has been created to address this request.

— Reply to this email directly, view it on GitHub https://github.com/csound/csound/issues/1598#issuecomment-2161286689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTBF4JEVTHRY4JWTO5YXLZG4YQDAVCNFSM6AAAAABJEYUKN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGI4DMNRYHE . You are receiving this because you were mentioned.Message ID: @.***>

vlazzarini commented 1 month ago

ok this is done now. The bundle is created alongside the installer and packaged into the dmg.