Old 12-06-2017, 05:27 AM   #1
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 1,698
Default 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 ?
__________________
The control surface integration thread: https://forum.cockos.com/showthread.php?t=183143 It's open source, feel free to donate: geoffwaddington.ca
Geoff Waddington is offline   Reply With Quote
Old 12-06-2017, 09:30 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,790
Default

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
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 12-06-2017 at 10:29 AM.
Xenakios is online now   Reply With Quote
Old 12-06-2017, 11:12 AM   #3
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 1,698
Default

Quote:
Originally Posted by Xenakios View Post
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
__________________
The control surface integration thread: https://forum.cockos.com/showthread.php?t=183143 It's open source, feel free to donate: geoffwaddington.ca
Geoff Waddington is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:54 PM.


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