Search Unity

Test Your Unity Linux Builds on a Mac...

Discussion in 'General Discussion' started by SevenBits, Dec 7, 2012.

?

How good is this tool?

  1. Very nice, thank you! I'll be sure to use it.

    3 vote(s)
    37.5%
  2. Good, but there were some issues (post in thread).

    2 vote(s)
    25.0%
  3. It's a worthless piece of crap that ought to be eradicated.

    3 vote(s)
    37.5%
  1. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Ahem.

    As a Mac Unity user I of course am of course considering porting my games to desktop Linux with Unity 4. My only concern was testing them, as the only machine I have with a good video card is my MacBook Pro, which cannot easily run Linux. Or I could test my game on my Linux compatible but crappy Intel graphics Dell laptop.

    I think I've found a solution. I recently wrote a program which takes an ISO of a Linux distro (like, say, Ubuntu) and lets you boot it natively on Macs using EFI from a USB device. rEFIt and similiar are not required - just boot with the USB in a port and hold down the Option key. I have successfully used this tool to boot Ubuntu on my MBP and test out my Linux build with no issues whatsoever.

    Now I'd like to open this tool to the community. Anyone who is in the same boat as me I would like to try my tool and see if you can use it to boot Linux. It's open source and on GitHub. So if you have a Mac running the latest OS X and Xcode, please try this. It should take, like, 5 seconds to compile, or you download a very buggy older build from the Downloads page on the GitHub repo.

    For the link to the GitHub page, go here and for information read my blog post here. If you want to make my holiday season, you can also fork my code and add features. Push them back and if they're good I'll add them.

    Please try this and let me know how everything goes.

    https://github.com/SevenBits/Mac-Linux-USB-Loader
     
  2. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
  3. Broken-Toy

    Broken-Toy

    Joined:
    Jan 16, 2010
    Posts:
    455
    Sounds interesting! I'm on a PC though, where booting Linux from a USB key is commonplace. So it's very different on a Mac?
     
  4. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Yes. Macs boot via EFI, which is a new method to replace the BIOS. Linux can boot with EFI, but it is not not very good in terms of support and is buggy. Because regular tools to put Linux on a USB drive happen to use boot loaders that rely on BIOS, booting them in Mac is not possible.

    What my tool does is copies a 64-bit Linux distribution ISO to the USB along with some special EFI firmware. This firmware is based on GRUB and basically is invoked by the Mac upon boot. Once invoked, it then boots Linux normally from the ISO as if BIOS was being used. It's very effective and it is a saving grace for me as I can now play Linux games on the only computer I have with decent hardware.

    I also noticed someone said this tool was a worthless piece of crap. Mac hater, perhaps? ;)
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I'd recommend VirtualBox instead; that way you don't have to reboot. This is a much faster and less annoying way to test Linux builds, especially if you do multiple iterations of the build. (The only annoyingly unclear part is getting a shared folder accessible in Linux, so here's how: after getting everything set up, open a shell in Linux and enter "sudo usermod -aG vboxsf [username]", and replace [username] with your actual username, then restart Linux.)

    --Eric
     
  6. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Or maybe you created survey options that really gave little option other than saying its great, good or terrible. :p

    Although this might be a nice technical achievement it doesn't seem very practical. I'm with Eric, I don't really know many developers who use a Mac and don't run something like Parallels or virtual box.
     
  7. Nanity

    Nanity

    Joined:
    Jul 6, 2012
    Posts:
    148
    What happens if you install GRUB2 over the current EFI? Will it break booting OS X?
     
  8. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    I use Parallels for all my multi OS needs. :)
     
  9. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    Depending on how big your files are you can just use somthing like Google drive to share the files with your self , or use a usb stick and let the VM access host USB devices , AFTER you copy your files their
     
  10. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I don't quite understand what you're saying. Are you asking about installing GRUB2 over the EFI on a Mac? If so, yes, not only will that break OS X, it will make it immensely difficult to reinstall.

    If you are referring to the USB key, you can install GRUB on that because the tool I created does not modify any files on the USB drive. And, no, that method will not break OS X.
    While I do agree with you to an extent, everyone knows that virtual machines cause a performance decrease, especially when it comes to high-graphic video games. You lose a lot of performance. I don't know what your experiences have been, but when I couldn't run Linux games on my PC I tried a VM and was not happy with performance even with a solid state drive and a respectable amount of memory, which let me to seek alternatives and create this tool.

    Yeah, maybe my survey options were biased, but maybe I just wasn't expecting that response. ;)
     
  11. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It's much simpler just to use a shared folder.

    There's certainly a performance hit (about 40%), but it's still perfectly usable for testing and a lot more convenient than rebooting. Also, It's A Feature Not A Bug™...think of it as testing on a slower machine without actually needing to buy a slower machine. ;)

    --Eric
     
  12. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I suppose, but that doesn't help you test out machines that have different graphics card models.
     
  13. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I just want to say I've updated the tool, and it now has a basic website that I've linked in my signature.

    FYI, I'll soon be recording a video of this tool to put on YouTube and give a demonstration of how the tool is used, etc. Be on the lookout!
     
  14. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    A major update to the tool will be coming soon! Video coming in next week or so...
     
  15. MarigoldFleur

    MarigoldFleur

    Joined:
    May 12, 2012
    Posts:
    1,353
    Oh, thanks for this. I was looking for this thread a while ago since I'm going to be testing linux deployment in a couple weeks.