Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: Process to generate .bundle for mac
I"m learning to use xcode to make my plugins compatible for mac.
I get some .dylibs.
What is the process for generating .bundle?
 

Mensajes Sat 10 Oct 20 @ 11:18 am
djcelPRO InfinityModeratorMember since 2004




Add the framework : CoreFoundation.framework by clicking on the +



By default the bundle is created in this folder /Users/xxxx/Library/Developer/XCode/DerivedData/xxxxxxx
(see in red below)



Personnaly I prefer a relative path. Click on "File" then "Project settings..."



You can also define this relative path approach to be activated by default for each new project by clicking on "XCode" then "Preferences".
Please also not the "Archives" path that you can also customize.



The idea behind the type of build (debug or release) is available by clicking on "Product" then "Scheme" then "Edit Scheme"
"Archives" is when you want to deploy your build on AppStore



For release build, you can change the "Run" to select "Release" instead of "Debug" in this window



Then click on "Product" then "Destination" then "Choose Destination", select "Any Mac (Intel)" instead of "My Mac"

After that, you can start to add your files (.h and .cpp) in the "MyPlugin" yellow folder.

Add your resources if you have some (in order to be included in the bundle) in "Copy Bundle Resources" section.
Add your .cpp files (no need to add .h files) in "Compile Sources" section



Finally you click on "Product" then "Build"
 

Mensajes Mon 02 Nov 20 @ 10:51 pm
Thank you DJCEL.
I will try the week-end ;-)
 

Mensajes Sat 07 Nov 20 @ 10:24 am
I have just successfully compiled in .bundle on mac :-)

Is there also a release mode on xcode?
Because apparently the compilation is in debug mode.
 

Mensajes Sat 07 Nov 20 @ 3:12 pm
djcelPRO InfinityModeratorMember since 2004
I answered with additional screenshots above.

"Archives" is when you want to deploy your build on AppStore
 

Mensajes Sat 07 Nov 20 @ 10:50 pm
Perfect DJCEL !

Thank you
 

Mensajes Sun 15 Nov 20 @ 12:53 pm
djcelPRO InfinityModeratorMember since 2004
You are welcome. You can share with me one test of bundle file (release build) (zip it before sending it) and i check on my system that everything works ok.
Then you can upload everything on the website ;-)

Use the variable VDJ_MAC in your code (with #if defined(VDJ_MAC) on the parts of your code that are differents between both version) to keep one source file. Easier for updates

one_example wrote :
#if (defined(VDJ_WIN))
rcXML.id = IDR_SKINXML; // as defined in resource.h
rcPNG.id = IDR_SKINPNG; // as defined in resource.h
rcXML.type = "XML";
rcPNG.type = "PNG";
#elif (defined(VDJ_MAC))
rcXML.name = "FX_GUI.xml";
rcPNG.name = "FX_GUI.png";
#endif
 

Mensajes Sun 15 Nov 20 @ 1:11 pm
djcelPRO InfinityModeratorMember since 2004
Please use "arm64" for M1 chip or "x86_64" for intel chip

But you can compile with both to get an universal binary (ie compatibility of the program with both chips)

https://developer.apple.com/documentation/apple-silicon/porting-your-macos-apps-to-apple-silicon

Quote :
i386 : 32-bit intel
x86_64 : 64-bit intel
x86_64h : 64-bit intel (haswell)
arm64 : 64-bit arm
arm64e : 64-bit arm (Apple Silicon)
arm64_32 : 32-bit code on 64-bit arm
armv6 : 32-bit arm
armv7 : 32-bit arm
armv7s : 32-bit arm
armv7k : 32-bit arm
 

Mensajes Sat 29 Jan 22 @ 1:47 pm
grhex1PRO InfinityMember since 2019
I followed this process to create a Max OS (M1) bundle for the OnlineSource example Plugins_SDKv8_Example7.html and copied it to Documents/VirtualDJ/PluginsMacArm/OnlineSources/
The files compile, and the bundle looks good, but the Online Source never shows up when VirtualDJ is opened. Also, my included logging indicates that the DllGetClassObject() function in the bundle is never called. How do I debug this?
 

Mensajes Thu 27 Oct 22 @ 10:18 pm
AdionPRO InfinityCTOMember since 2006
Online Source plugins are currently only available for Pro users
 

Mensajes Fri 28 Oct 22 @ 6:33 am
grhex1PRO InfinityMember since 2019
Thank you. I just upgraded to VirtualDJ PRO Infinity. After logout/login, VDJ setup shows the license, but the plugin still isn't loading.
~/Documents/VirtualDJ/PluginsMacArm/OnlineSources/VdjConnect.bundle

#include "TestProvider.hpp"
HRESULT VDJ_API DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{
Log log;
log.info("DllGetClassObject called..."); // This logs to /tmp/vdj.log
...
*ppObject=new TestProvider();
return NO_ERROR;
}
 

Mensajes Fri 28 Oct 22 @ 3:47 pm
AdionPRO InfinityCTOMember since 2006
Could you send it to me? I'll have a look, but it should be loaded on startup
 

Mensajes Fri 28 Oct 22 @ 4:01 pm
grhex1PRO InfinityMember since 2019
Sure. Do I post the bundle file here or email it?
 

Mensajes Fri 28 Oct 22 @ 4:07 pm
AdionPRO InfinityCTOMember since 2006
Sent you a PM with my email address
 

Mensajes Fri 28 Oct 22 @ 4:11 pm
AdionPRO InfinityCTOMember since 2006
Got it, looks like it was a bug in VirtualDJ not loading OnlineSources plugins correctly.
Will be fixed in next update.
 

Mensajes Sun 30 Oct 22 @ 9:36 am