Compiling for Mac - outsource it?



  • On 02/06/2013 at 04:13, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R14 Std 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    I am on Windows, and have no Mac. A considerably large number of C4D users (the majority?) are on Mac, so I definitely want to compile my plugins for Mac too.
    What do people in my situation do?



  • On 02/06/2013 at 06:03, xxxxxxxx wrote:

    Two choices: Acquire a Mac computer (and Xcode) and build yourself or have another developer make the builds for you.  There are ways to install MacOSX on a PC but it requires very specific hardware support and a bit of effort.

    I have a MacBook Pro with Xcode 3.2.6 for R13 builds.  I could download/install 4.2.1 for R14 but you may get quicker responses from other developers at this time.



  • On 02/06/2013 at 06:12, xxxxxxxx wrote:

    Ok, the only viable option is to have someone else do it for me. But first I must make the plugins work ;)



  • On 02/06/2013 at 07:05, xxxxxxxx wrote:

    My records would indicate that at least 50% of Cinema users are on a Mac, so yes - it's definitely not a market to ignore.

    If/when you start selling your plugins it might be commercially viable to buy a Macbook to compile them on. That's what I did a few years ago and it was a pretty good investment. Especially since otherwise you have to hand over potentially valuable source code to someone you don't know, and have to rely on them to be able to build your plugin in a timely fashion.

    Like Robert I bought a Macbook Pro for this purpose and still use that for building for R13 or earlier. You can get refurbished Macs from the Apple store that would be more than enough just for compiling and testing Mac builds of a plugin.



  • On 02/06/2013 at 07:41, xxxxxxxx wrote:

    Ok, what do I really need?

    1. The machine
    2. What software xcode? Costs money?
    3. How can I test that it works? Can I install my R14 on  the Mac too..? Or is the distro I purchased, for Windows only?

    And while we're at it, would people buy my plugins? It is a silly question, yes, because It all depends, I know. But I am not a beginner, programming has been my living for 15 years. And I am making something that I myself need in C4D, hopefully others also do.

    I also notice that you say R13, why is that? Can't you compile for R14?



  • On 02/06/2013 at 14:09, xxxxxxxx wrote:

    I'll try to answer this, but if I get anything wrong others will correct me. It's complex unfortunately.

    1. Xcode is free and comes with OSX, or can be downloaded from Apple.

    2. To compile for R13 the official Maxon position is that you need Xcode 3. Xcode 3 will run on OSX 10.5 or later (possibly even earlier) but - and this is a problem - is not simple to install on OSX 10.7 (Lion) or later. You *cannot* use Xcode 3 to build for R14.

    3. To compile for R14 you need Xcode 4. That runs on OSX 10.6 (Snow Leopard) or later.

    4. To run C4D R14 itself, however, you need OSX 10.7 or later, but you can run R13 happily on that as well.

    So. You must have a Mac running Lion or Mountain Lion if you want to build and test for R14. Xcode 4 runs well on that and will build R14 plugins just fine.

    But what to do about R13 on such a machine? You have two choices: either install Xcode 3.2 alongside Xcode 4, or get Xcode 4 to build R13 plugins.

    Apparently it is possible to make Xcode 3.2 run on Lion, but I couldn't get it to work. Eventually after a lot of trying other methods, we (David O'Reilly and I) did get Xcode 4 to build X-Particles for R13.

    Whatever you do, you're in for an interesting time if you want to support R13 and R14 on a single Mac. That's why I said that I use a Macbook to compile for R13, I still do that for all my other plugins (though I'll be switching them to Xcode 4 eventually). To build plugins for R14 I had to buy a new iMac running Lion, that's why I don't do R14 builds on the Macbook.

    People will buy your plugins if they do something that Cinema does not, or if they do it better than Cinema. It's like anything else though, you need to build a rep for decent, stable plugins that work. So it's probably best to start with a couple of freebies and see how it goes from there.



  • On 02/06/2013 at 15:42, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    I'll try to answer this, but if I get anything wrong others will correct me. It's complex unfortunately.
    [..]
    Whatever you do, you're in for an interesting time if you want to support R13 and R14 on a single Mac. That's why I said that I use a Macbook to compile for R13, I still do that for all my other plugins (though I'll be switching them to Xcode 4 eventually). To build plugins for R14 I had to buy a new iMac running Lion, that's why I don't do R14 builds on the Macbook.

    Hi Spedler, thanks a lot for this comprehensive info!
    I see that for plugin development, one better use Windows, and when it is done, then compile for the Mac. I bet they use Windows all over in the Maxon R&D, when it is as complicated as this on the Mac. And it seems that Visual Studio also is superior, because you can edit and continue in VS.
    Two different machines just to compile - and I have to learn Mac to boot.. nope, there has to be a better way. But I am reluctant to give away my source code though.



  • On 03/06/2013 at 07:08, xxxxxxxx wrote:

    It is possible to compile plugins for R12 and higher using new Xcode 4.6.
    The only one problem is support for OS X 10.6, because Xcode 4.6 only support 10.7 and 10.8.

    IMHO Visual Studio as an IDE is a superior to Xcode.
    But the C++11 support by MSVC compiler is behind  Clang 3.2 compiler available in Xcode 4.6.
    MSVC standard library C++11 support is also behind new libc++.



  • On 03/06/2013 at 08:57, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Originally posted by xxxxxxxx

    I'll try to answer this, but if I get anything wrong others will correct me. It's complex unfortunately.

    [..]Whatever you do, you're in for an interesting time if you want to support R13 and R14 on a single Mac. That's why I said that I use a Macbook to compile for R13, I still do that for all my other plugins (though I'll be switching them to Xcode 4 eventually). To build plugins for R14 I had to buy a new iMac running Lion, that's why I don't do R14 builds on the Macbook.

    Hi Spedler, thanks a lot for this comprehensive info!
    I see that for plugin development, one better use Windows, and when it is done, then compile for the Mac. I bet they use Windows all over in the Maxon R&D;, when it is as complicated as this on the Mac. And it seems that Visual Studio also is superior, because you can edit and continue in VS.
    Two different machines just to compile - and I have to learn Mac to boot.. nope, there has to be a better way. But I am reluctant to give away my source code though.

    Macs support a lot of partitions (contrary to Windows). If the OS is running on your hardware, you can easily install one partition with 10.4, 10.5, 10.6, 10.7, 10.8, ...

    If your hardware doesn't support the OS version anymore, there 's still the possiblity of using a virtualization (you can legally do that with the server versions of OS X). Otherwise there's no big difference to Windows, where you've to use at least two different partitions too, when we're switching the Compiler (e.g. VS2012 doesn't run on XP or XP64, VS2005 doesn't work on Win8, ...).

    Regarding of what OS we use to develop @MAXON: It depends highly on personal taste and the task:

    - Want to refactor C++: Use MSVC (but not without Visual Assist)

    - Want to debug simple code: Use MSVC

    - Want to debug highly parallel code: Use XCode >= 4.2 (because debugging multiple treads in MSVC s*cks)

    - Want to work with C++11: Use Xcode 4.6 (which includes clang). Best C++11 support, much faster compile times than MSVC (and in a different league than Intel), faster code than MSVC (and Intel on Win too).

    - Want to profile and optimize time critical code: Use Xcode (with the supplied Shark or Instruments), as they provide (for free) much better time resolution than any tool (money can buy you) on the PC, while being easier to use (than MS's and Intel's solutions).

    Best regards,

    Wilfried



  • On 03/06/2013 at 11:30, xxxxxxxx wrote:

    It also might be worth pointing out that, AFAICS, clang is a much stricter compiler than VS when it comes to adhering to C++ standards. So that code which builds fine on a PC might not on a Mac. If you get someone else to compile your Mac plugin, then they might also have to correct your code so that Xcode will compile it. Which means that they need some degree of Xcode and C++ expertise and that (not unreasonably) they would expect some payment for the work done.

    Steve



  • On 03/06/2013 at 12:32, xxxxxxxx wrote:

    So that code which builds fine on a PC might not on a Mac.
    Yes this is true.
    By the way do some one know the way to force Visual Studio C++ to report more warnings that are errors for Clang ?



  • On 03/06/2013 at 13:07, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    So that code which builds fine on a PC might not on a Mac.Yes this is true.By the way do some one know the way to force Visual Studio C++ to report more warnings that are errors for Clang ?

    You might try using the Intel compiler (which integrates into MSVC); while not supporting the full C++11 standard and not giving as good error or warning messages as clang, it does support more C++11 features than MSVC, is also quite strict.

    MSVC currently delivers the weakest C++11 support of this 3 compilers, has some nasty bugs in lamdbas (when passing params) and returns not very useful error messages when having template problems.

    Best regards,

    Wilfried



  • On 03/06/2013 at 14:09, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Macs support a lot of partitions (contrary to Windows)

    This I did not understand, apart from that, a very interesting post, Wilfried! Now I learnt this! It will take some time before I switch to Mac, though..😄



  • On 04/06/2013 at 05:01, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Originally posted by xxxxxxxx

    Macs support a lot of partitions (contrary to Windows)

    This I did not understand [..]

    (I was replying on the statement that you need several Macs to support different XCode & OS X versions).

    On Windows you've four basic partition slots. You can either use them as primary partition (which is necessary to boot Windows) or you can mix primary and extened partitions (but you can't use those to boot Windows); e.g one as primary, 3 as extended partitions.

    Now try to install XP, Server 2008, Vista, Win7 & Win8 on a drive (you might need that for compatiblity tests...) - you can't as you're running out of primary partitions.

    On the Mac (assuming the hw is supported by the OS) you don't have this limitation.

    Best regards,

    Wilfried



  • On 04/06/2013 at 07:34, xxxxxxxx wrote:

    Now try to install XP, Server 2008, Vista, Win7 & Win8 on a drive (you might need that for compatiblity tests...) - you can't as you're running out of primary partitions.

    You only have this limitation if you use Master Boot Record ( MBR ).
    With GUID Partition Table ( GPT ) you do not have this limitation too.
    As far as I know Win XP do not support GPT.
    But for Win XP one could also use VirtualBox for example.



  • On 04/06/2013 at 08:13, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Now try to install XP, Server 2008, Vista, Win7 & Win8 on a drive (you might need that for compatiblity tests...) - you can't as you're running out of primary partitions.

    Here:
    http://www.terabyteunlimited.com/bootit-bare-metal.htm

    "Create over 200 primary partitions on EMBR disks"

    Yes, I have had machines where I have had 2, or maximum 3 operating systems installed. But after I started to use VMware, I do not need it. I have VMware "machines" of all Windows versions, Win 3.11, Win 95, Win 2000, Win XP, Vista, as well as some of the the server versions. I need those sometimes when testing applications  for  my customers. In VMware I have several "snapshots", so that I can test various versions of various browsers on various operating systems. And so on. I always have clean operating systems ready for testing.

    The more interesting question is why one would want to, and especially why one would need to have more than 4 primary partitions on Windows, nowadays. I now run Windows 7 64 bit, and have never had a better OS ever. I will not look back, and have no need to either, apart from the aforementioned tasks when testing software. I then fire up VMware, and am good to go.



  • On 04/06/2013 at 10:32, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    [...] The more interesting question is why one would want to, and especially why one would need to have more than 4 primary partitions on Windows, nowadays. I now run Windows 7 64 bit, and have never had a better OS ever. I will not look back, and have no need to either, apart from the aforementioned tasks when testing software. I then fire up VMware, and am good to go.

    As much as I like using Windows in a VM when working on OS X (being able to fix project files or other stuff on both systems without rebooting is a big time saver), but for some compatiblity tests VMs aren't sufficient - think of gfx card drivers, audio drivers (which changed massively between XP & Vista and had a lot of fixes in Win7 that you don't find in Vista), ...

    VMs are fine as long as their overhead, compatiblity problems of the emulation (GL...), lower network performance or inaccuracy of the timer doesn't matter. If it does, you need real hardware.

    Best regards,

    Wilfried



  • On 04/06/2013 at 15:33, xxxxxxxx wrote:

    Yes, that is right. And some software even refuse to run on VMs. If you really need physical machines,  you probably want 1) a separate PC, 2) will not have the 4 partition limit on Windows because you can use Terabyte or a similar utility, supporting EMBR. I have used Terabyte BootIt a long time, not because I needed more than 4 partitions, but because of other nice features it has.



  • On 05/06/2013 at 00:36, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Yes, that is right. And some software even refuse to run on VMs. If you really need physical machines,  you probably want 1) a separate PC, 2) will not have the 4 partition limit on Windows because you can use Terabyte or a similar utility, supporting EMBR. I have used Terabyte BootIt a long time, not because I needed more than 4 partitions, but because of other nice features it has.

    Thanks for the tip. Any experience how it deals with damaged MBRs (e.g. one you get when installing Vista when having Linux with grub installed) or when dealing with multiple OS installations (Linux & win) and their partitioning programs (e.g. parted); which repair capabilities does it have?

    From my experience with other 3rd party boot/partioning tools that often has been the archilles heel (resulting in no partitions working at all in the end).

    Best regards,

    Wilfried



  • On 05/06/2013 at 03:29, xxxxxxxx wrote:

    Hi Wilfried, for damaged MBRs, I used a piece of freeware, I do nor remember the name, it was a rather obvious name, "fix MBR" or something in that direction. I can find it, of you wish, I haven't used it in 2-3 years now.
    About TeraByte, I was recommended it by someone who works a lot with partitions, multiple OS on a machine and such. It costs money, which it is well wort, and it comes with a huge documentation, almost a book on its own, a real study.. I have used a only fraction of its features.
    But if you run multiple OS, you want a boot prompt in any case, to select the OS to boot into. And that is mostly how I have used it. It has tons of features though, wish I had time to understand more of it.
    If you do it in the right order, that is add OSs in the right order, I think you can install many different operating systems, yes. For practical use in 2013, I guess XP is the oldest Windows OS you may want. And Linux - I have only tested it in VMware, so I just do not know. Actually, these things is a profession on its own. In a job I had some years ago, we had on guy dealing only with this :)
    Installing, testing, "Ghosting" test machines etc.


Log in to reply