sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Detect OSX on Intel and pre-Intel systems?

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 2 Posters 556 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thomthomT Offline
      thomthom
      last edited by

      How can one detect if the Ruby version running OSX is on an Intel system or pre-Intel system?

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • tbdT Offline
        tbd
        last edited by

        
        Snow Leopard Ruby code (1.8.7);
        > puts RUBY_PLATFORM
        universal-darwin10.0
        
        Sketchup Ruby (1.8.5);
        > RUBY_PLATFORM
        i686-darwin8.10.1
        
        Terminal code;
        > file /usr/bin/ruby
        /usr/bin/ruby; Mach-O universal binary with 3 architectures
        /usr/bin/ruby (for architecture x86_64);	Mach-O 64-bit executable x86_64
        /usr/bin/ruby (for architecture i386);	Mach-O executable i386
        /usr/bin/ruby (for architecture ppc7400);	Mach-O executable ppc
        
        

        SketchUp Ruby Consultant | Podium 1.x developer
        http://plugins.ro

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Thanks! πŸ‘

          hmmm... universal binaries....
          Can one compile a Ruby C Extension that runs on both PowerPC and Intel macs?

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • tbdT Offline
            tbd
            last edited by

            if you look at the Makefile generated via extconf.rb you have

            CFLAGS   =  -fno-common -arch i386 -arch x86_64 -g -Os ...
            

            so you can add/modify for PPC to suit your needs. didn't tried it, so I dont know if it works ok. btw, are there a lot of PPC users to worth the effort ?

            SketchUp Ruby Consultant | Podium 1.x developer
            http://plugins.ro

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              I have no idea. Just a thought in case it was easy.
              Atm - the only mac I have is a PPC... it's mad how expensive second hand macs are. Even really old PPC variants. Nuts!

              Thomas Thomassen β€” SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                I just checked on an older PPC mac. So to sum up this thread:

                ` # Sketchup Ruby OSX 10.4 PPC

                * RUBY_PLATFORM: fat-darwin8.8.0

                * RUBY_VERSION: 1.8.5

                Sketchup Ruby OSX 10.5 Intel

                * RUBY_PLATFORM: i686-darwin8.10.1

                * RUBY_VERSION: 1.8.5`

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement