Cockos Incorporated Forums

Cockos Incorporated Forums (https://forum.cockos.com/index.php)
-   ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum (https://forum.cockos.com/forumdisplay.php?f=3)
-   -   Real dumb question re mac resources (https://forum.cockos.com/showthread.php?t=200410)

Geoff Waddington 12-06-2017 05:27 AM

Real dumb question re mac resources
 
Thought I remembered how this was done but alas...

How do you include the res.rc_mac_dlg in the Xcode build process, is it an include like directive, or some other mac magic ?

Xenakios 12-06-2017 09:30 AM

You have to run the PHP script somewhere in the WDL sources to turn the Windows resource files into source code for building on Mac Os. That should produce a header file you must include when building for Mac Os. There was something else that needed to be done too in the #ifdef block but I don't remember exactly. The Reaper extension SDK example should have the correct way to write that...

edit : code, which maybe has to be put after the plugin entry point function.
Code:

#ifndef _WIN32 // MAC resources
#include "../../WDL/swell/swell-dlggen.h"
#include "res.rc_mac_dlg"
#undef BEGIN
#undef END
#include "../../WDL/swell/swell-menugen.h"
#include "res.rc_mac_menu"
#endif


Geoff Waddington 12-06-2017 11:12 AM

Quote:

Originally Posted by Xenakios (Post 1921901)
You have to run the PHP script somewhere in the WDL sources to turn the Windows resource files into source code for building on Mac Os. That should produce a header file you must include when building for Mac Os. There was something else that needed to be done too in the #ifdef block but I don't remember exactly. The Reaper extension SDK example should have the correct way to write that...

edit : code, which maybe has to be put after the plugin entry point function.
Code:

#ifndef _WIN32 // MAC resources
#include "../../WDL/swell/swell-dlggen.h"
#include "res.rc_mac_dlg"
#undef BEGIN
#undef END
#include "../../WDL/swell/swell-menugen.h"
#include "res.rc_mac_menu"
#endif


Thanks Xen, all works fine now, old fart memory was the problem, don't know if there's a code fix for that :)


All times are GMT -7. The time now is 05:22 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.