Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Unity3D on Linux with Wine: Support thread

Discussion in 'Editor & General Support' started by wnk, Nov 15, 2013.

  1. NightWarrior

    NightWarrior

    Joined:
    Apr 28, 2014
    Posts:
    2
    A friend of mine is trying to install unity on Ubuntu 14.04 and he is getting the "Failed to initialize 3D graphics" error. Does anyone know how to fix the problem.
     
  2. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @NightWarrior,

    Hopefully he/she followed instructions from either Tomza blog post or the page on Unity Wiki(summary of this thread).

    One prerequisite is having "Newest stable drivers for your graphics card".

    Does that Ubuntu have graphics drivers with 3D acceleration? The default Nouveau might not have them, making Unity crash.
     
  3. z33zaza

    z33zaza

    Joined:
    Apr 28, 2014
    Posts:
    5
    hello, I installed Unity3D on Ubuntu, but nothing appears!
    Only the top menu.
    How can I fix this

    wine: cannot find L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorsvw.exe"
     
    Last edited: Apr 29, 2014
  4. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    z33zaza,

    Please state what steps did you look at for installing Unity. If you simply installed with the initial version of Wine, then you have multiple Windows libraries missing for Unity to work properly and should use "winetricks" to install them(required libraries can be seen in PlayOnLinux install scripts). If you are using PlayOnLinux, then configure the profile and install "dotnet_40" component.

    When you say "but nothing appears", it might also be about the timezone issue see "Unity dashboard is all grayed out" on the Unity Wiki on ways how to resolve it.
    http://wiki.unity3d.com/index.php/R...hrough_Wine#Unity_dashboard_is_all_grayed_out
     
  5. surfy1h

    surfy1h

    Joined:
    Nov 23, 2010
    Posts:
    16
    I got it working on Ubuntu 14.04 LTS using Unity 4.3.4 and wine 1.7.18
    I was able to open a project by opening it's scene and unity imported everything.
     
  6. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    surfy1h, then we both have the exact same setup, unless you are using the default Nouveau drivers.

    ---

    I noticed it is possible to force Unity to run in OpenGL only mode, but it crashes with unrecognizable errors. In case someone wants to try it, if PlayOnLinux is used, then in the configuration the 'Arguments' setting should be set to "-force-opengl" (without quotes), the default is "-force-d3d9".
     
  7. surfy1h

    surfy1h

    Joined:
    Nov 23, 2010
    Posts:
    16
    Yeah, I am using [AMD/ATI] RS780 HDMI Audio [Radeon (HD) 3000 Series] proprietary Gallium 0.4 on AMD RS780
    only thing I found a bit buggy is mesh renderers with cast shadows on.
     
  8. blurymind

    blurymind

    Joined:
    Sep 16, 2012
    Posts:
    13
    works like a charm!!! Thank you for the script!

    Btw I was able to create a new project, but it crashed unity.

    After a relaunch I was able to open it, but it was empty and unity complained about needing to update it.

    Heres hoping that they will one day make a native editor. UDK has a head start atm!!
     
  9. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    blurymind,

    Please state what is your Linux distribution. Also are you able to use Unity after these complaints thrown by it?

    Launching Unity in PlayOnLinux's Debug mode might reveal the reason for the crash.

    BTW let me correct you that "UDK" refers to the development kit of Unreal Engine 3, which does not have a native port. Unreal Engine 4 has no such kit and probably won't ever have one.
     
  10. Garrison

    Garrison

    Joined:
    May 7, 2014
    Posts:
    4
    Hello,

    I got it working the 4.3.4 version on Lubuntu 14.04 x64, as winach=32, using PlayOnLinux 4.2.2 and the last script in this thread. With the ie8 mod and wine version 1.7.18.

    Im using a i5 laptop with Nvidia 610M, driver installed from repository, nvidia-319. The only thing that dont work is the asset store. At the moment im only playing with it and testing its stability.

    You do a nice work :)
     
  11. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Sad to hear you had to browse through all these pages of the thread. I haven't gotten a response from the maker of the first post to add a link to the Unity Wiki page, which is a summary for contents of this thread. Even a Google search doesn't return that Wiki page. I'll try contacting a forum moderator.

    BTW since you have an NVIDIA card and run a proprietary graphics driver, do you experience the bug of windows not refreshing often enough. I have listed the bug and ways to reproduce it on the wiki page.
     
  12. Garrison

    Garrison

    Joined:
    May 7, 2014
    Posts:
    4
    About the Nvidia, its true.
    I thought that was only lag. With the play/stop button sometimes happens that when i click, it takes a time to act, or directly doesnt act the 1st time.

    Other weird thing i have is that in MonoDevelop some keys doesnt work, like "{", "}", "[" or "]". I must investigate, but probably have to something to be with the keyboard configuration in linux and how its recognised in POL.
     
  13. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
    Hi all,

    Some words about me : I'm a freelance web developper. I'm starting to learn Unity. All my environment is on Linux and I don't want to switch on Windows (I need to have all my mails and dev environment in parallel).

    First, I've tested the script on my main PC : a Mac Mini 2010 (Core 2 Duo Nvidia GT320M) with LMDE (Linux Mint Debian Edition) 64 bits. Works great except asset store. I have the Nvidia bug with refresh and I enabled "Strict Draw Ordering" (Thanks for that).
    I imported Bootcamp project, built it on linux and test it. No problem. I started to do some tutorials on it.

    Secondly, I've tested on a Dell Vostro 3700 (core i5 / HD Graphics + Nvidia GT330M). I use it for some tests, so I've a Windows 7 32 bits and a linux partition.

    From scratch, with a LMDE 32 bits, no problems. I've also installed bumblebee (https://wiki.debian.org/fr/Bumblebee) to switch between Intel and Nvidia graphic cards (Nvidia optimus technology). On bootcamp, with nvidia card, I've 30 FPS on Unity and looks good. To launch unity with nvidia, you need to launch playonlinux from terminal with (only for notebook with graphics chipset + nvidia card and optimus technology) :

    From scratch, with a LMDE 64 bits, more problems. Need to add i386 architecture :

    and some libs : libldap-2.4-2:i386, libgl1-nvidia-glx:i386 for nvidia card, libgl1-mesa-glx:i386 for intel chipset. If you use another, don't forget to add libgl1-[whatyouwant]-glx:i386.

    After that, Unity3d start, but all windows except scenes were grey. Trying to change tzdata doesn't work. So, I've installed all the i386 lib I have on my first computer (I don't have the time to test all, but I think one or two only are required, perhaps Qt) :

    After that, Unity start and works good.

    Tested with Wine 1.7.6 and 1.7.16 : Ok
    Lot of bugs on windows / buttons with Wine 1.7.18.

    Any news for the "webkit patching for wine" / Asset store ? Or workaround ?

    Thanks ;)

    PS : Sorry for my english ... ;)
     
    Last edited: May 15, 2014
  14. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Thanks for your work. It's precious for many people who will read this thread to run Unity3D on Linux.

    Asset Store still doesn't work :(. I asked a few times Unity Team to make direct links as an alternative for downloading assets, but no reaction. They are still not interested in helping Linux users. They pretend not to see thousands people who run Unity3D on Linux. I understand that they have the reasons no to make the native Linux editor, but why are not they interested in helping Linux users with downloading assets?

    Now, I have no time to deal with this topic, but I follow this thread. I wish to know what people think. I'm glad that our idea have more and more supporters. Some people say that it makes no sense to run Unity3D on Linux since there's the version for Windows and Mac, but I see many people interested in that. So it's worth
     
    Last edited: May 15, 2014
  15. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
    It makes no sense for me to switch on linux or buy a second PC just for run Unity 3D ;)

    I hope we can find a solution for asset store a day ;)
     
  16. Sisso

    Sisso

    Joined:
    Sep 29, 2009
    Posts:
    196
  17. stoomm

    stoomm

    Joined:
    Apr 7, 2013
    Posts:
    15
    Yes, it's for that I work on a Mac mini ;)
    Dual boot, with my Linux LMDE + Mac OSX if needed. But finally, I don't use Mac OSX and all my environment is on Linux ;)
     
  18. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    We have a Mac Mini here as well. I use it as a support machine for things like the Asset Store (edit: and mobile builds), but since it's a Mac Mini it's extremely sluggish. Also, I took my Pro license off of my Windows Partition and use it under Wine, which has proven to work fairly well with just a few minor hiccups :)

    Still, obviously hoping they will make a Linux editor, especially since it's now over 10,000 votes on the Feedback site. Plus, both Unreal and Crytek are working on Linux editors for their engines.

    Linux Unity Editor Feedback link:
    http://feedback.unity3d.com/suggestions/platforms-unity-editor-for-linu
     
    Last edited: May 15, 2014
  19. __marco__

    __marco__

    Joined:
    May 15, 2014
    Posts:
    4
    find yourPathToUnity3Dwineprefix | grep AngryBots ;)

    this should solve your problem :)

    for my install it is in /opt/.PlayOnLinux/wineprefix/Untity3D/drive_c/users/Public/Documents/Unity Projects

    a++
     
    Last edited: May 16, 2014
  20. Bryce-Henley

    Bryce-Henley

    Joined:
    Jan 2, 2014
    Posts:
    1
    Thank you very much for the script. My development environments are all in Linux
    for both programming and art. I would really like to see it run native in the future,
    and i'm happy to see all the support its getting on the Feedback page.

    It runs on Ubuntu 14.04 x86_64, with Nvidia proprietary drivers.
    There window refresh bug, the asset store tab does not open along with mono.

    I'm about to test it on my laptop running Sabayon Linux and hd4000 graphics
    with wine 1.7.18

    I'm excited to see Unity finally run in Linux, and will be happy to debug any issues
    I find.
     
  21. zak-reynolds

    zak-reynolds

    Joined:
    May 8, 2013
    Posts:
    6
    I'd also like to confirm working on Ubuntu 14.04 with a Nvidia GTX 760 w/ proprietary drivers (60 FPS!), thank you guys so much for the work!

    I'm currently working on getting .blend imports working... so far I'm able to open up files in (native) Blender through Unity (by using an intermediate script that converts the Windows path to a Linux path, and setting the .blend open command in the registry to that script), but I haven't been able to figure out how Unity hooks into Blender when it imports. Unity uses Blender's FBX exporter to convert the .blend to .fbx, and I found a Python file that Unity uses (Program Files/Unity/Editor/Data/Tools/Unity-BlenderToFBX.py). I think that Unity somehow calls Blender with that file, but I'm not sure exactly how. If anyone knows, or at least knows how I could trace the call, that would be supremely helpful!
     
  22. Nooke

    Nooke

    Joined:
    May 22, 2014
    Posts:
    5
    I've been trying to install Unity 3D on Debian 7 but when I launch the Unity 3D icon nothing happens and when I launch the Unity icon it only says launching Unity but then doesn't. When I tried to launched it through playonlinux it tells: "Unity 3D has crashed" and this is what the debug file says :

    [05/22/14 19:54:39] - Running wine-1.7.7
    wine: cannot find ''

    Can anyone help me?
     
  23. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Nooke,

    How did you proceed with your installation? Did you use certain steps?

    Code (csharp):
    1. [05/22/14 19:54:39] - Running wine-1.7.7
    2. wine: cannot find ''
    Sounds like wine is opening nothing. Is there anything else in the log?
     
  24. Nooke

    Nooke

    Joined:
    May 22, 2014
    Posts:
    5
    I did the the steps written at the beginning and no there is nothing else written.
     
    Last edited: May 23, 2014
  25. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Steps at the first post of this thread? Those are very old steps and as expected people don't have the time to look through all these pages of this thread. You should follow the steps written in the Wiki Page - Running Unity on Linux through Wine, which sums up contents of this thread.

    [edit] Some upcoming support from Unity Technologies community manager "Aurore". She will add a link to the Wiki on the first post when able, as some forum bug disallows her to edit the first post. Hurray for at least this much Linux support. ;)
     
    Last edited: May 23, 2014
  26. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Any support from Unity Technologies? Really? We need to use Asset Store, Unity Technologies. Do something with that. We can't solve the problem with using Unity assets.
     
  27. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Lets not press our luck, Tomza. Also that wouldn't have been that much of a problem, if the asset direct links were not removed from the Asset Store. Though I bet that was probably done to avoid someone else from distributing packages.

    Though I wonder about the inactivity of Linux users like Waneck and Damian. Do they not work with Unity anymore? Then again it my just be the exam season.
     
  28. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Waneck has another job to do. He won't be dealing with Unity any more. Maybe later, much later. I don't know what is with Damian. He's my compatriot. I talked to him using Skype. He told me he would be working over installing Unity3D on Linux. As he told me he was very near to solve some problems with running Unity3D on Linux, including using Asset Store. I know he has another job too. Maybe, he has no free time. Or the problem with Asset Store can't be solved.

    Damian, czekamy na ciebie. Odezwij się!

    I have no idea how to solve the problem with Asset Store. Unfortunately, I have no free time now. And I use Windows 7 :).
     
  29. Nooke

    Nooke

    Joined:
    May 22, 2014
    Posts:
    5
    I don't know what I did but it works but now when I launch a project this is what it says : Fatal error ! Failed to initialize unity graphics.

    Any ideas?
     
  30. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    I will repeat what I stated earlier, which steps did you take to install Unity? You did not state which. Start over/Reinstall using the steps written in the Wiki page.

    @Tomza, traitor. :p
     
  31. Nooke

    Nooke

    Joined:
    May 22, 2014
    Posts:
    5
    The ones on the wiki, I redid the installation.
     
  32. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Nooke, I think your graphics drivers might lack 3D acceleration. What video card do you have?
     
  33. Nooke

    Nooke

    Joined:
    May 22, 2014
    Posts:
    5
    Advanced Micro Devices, Inc. [AMD/ATI] RS480 [Radeon Xpress 200 Series]
     
  34. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
  35. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Not traitor. I just outside my home; I'm in Asia now. That's why, I don't have my OpenSuse, only Windows 7. However, I am going to have another computer with OpenSuse 13.1 soon, because Windows 7 is unstable and again I worry about my security online. I burnt DVD with the system. if I have money enough and free time, I'll run a computer with OpenSuse again. I'll be testing our solution further.
     
  36. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    No 3D acceleration I think. You can't probably even start Unity3D. if so, you have no 3D acceleration. If you can start Unity3D, but you can't run a project only, there's something different.

    yes, it can be the fault of your driver.
     
    Last edited: May 26, 2014
  37. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Hullo.

    I stumbled on this thread once, and then a stumbled on @Tomza's blog, which led me back to this thread, so here I am.

    First thing first: I am trying to create a winetricks script for installing Unity. So far so good. I followed the Wine App Database for tips, what to install. Right now the script succesfully downloads the Unity installer, checks it for errors, installs Unity, installs dependencies, creates the /AppData/LocalLow directory to make the play mode in Unity usable, and fixes the registry, so that the license works.

    Okay, big load of text.

    I found out a lot of things while making the script, but I do have a lot of questions.

    1: The dependencies: I am now succesfully running Unity 4.3.4 on Ubuntu 14.04 32 bit, and the only things I need to install were tahoma, corefonts, d3dx9 dotnet20. (The command is winetricks tahoma corefonts d3dx9 dotnet20 forcemono, notice forcemono).
    And it works OK, only creating a project is buggy (but I can just open an empty folder and import the packages afterwards). I just don't see WHY all those things need to be installed.

    2: The reg fix:
    -it's a Wine bug, I checked a Win7 install and it has it's ProductId in /Windows NT, not /Windows, and
    -it's same every time, so isn't it just easier to run wine reg.exe add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v ProductId /t REG_SZ /d 12345-oem-0000001-54321 ?, and
    -shouldn't it be submitted as a bug to Wine?

    3: The Asset Store:
    When you open the Asset Store, Unity actually downloads the data, it just doesn't display it (I checked, about 0.5 - 1MB is downloaded when you open it). Maybe it's missing rendering, html, website thing package thing dll stuff installed?

    4: Isn't it just easier to add -force-opengl to the desktop (or whatever your distro has) file (launcher/shortcut). This should be faster faster a lot, since Wine doesn't need to "emulate" DirectX.

    5 Just if you want to fix the ugly text, run winetricks fontsmooth=rgb

    6: Wine Is Not an Emulator - so please refrain from using "emulating Windows" (which is illegal BTW)

    7: Forgot - why use the Wine MonoDevelop when you can easily compile your own Linux MonoDevelop - with the latest version?

    Oh, just one thing: I have no idea why you all do this with this POL nonsense (no offence though). I mean, isn't it easier to just run winetricks unity3d (which comes by default with wine), which installs it into a new prefix, fixes every existing bugs, etc. You can even run it in a unattended mode, and just come back to the computer in 20 minutes with Unity succesfully installed (it doesn't work yet, but working on it).

    Just MHO

    BTW - I'll post the script once it's done here if you don't mind, to keep everything in one place

    OK, done for now, will post a screen of my beautiful desktop with Unity as a proof that it's working once I get my Wine to be beautiful too
     
    Last edited: Jun 29, 2014
  38. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Doctor Jellyface,

    I don't have that much experience with Wine, from what I understood about PlayOnLinux is that it is for managing multiple prefixes and multiple Wine versions just in case the Windows program gets corrupted by installing or running something else. Also more user friendly as it has a GUI.

    1. Well let's go through the extra winetricks packages/components, here is what I know:

    physx
    Unity uses PhysX for its physics engine. This should improve performance in running the Unity editor.

    dotnet35
    dotnet40
    Wouldn't hurt having these updates to .NET, even if the Mono that Unity uses is based on .NET 3.5.

    ie8
    It was reported that opening and creation of new projects in Unity was impossible without Internet Explorer 8. Unless Unity specific commands in the command line are used.

    vcrun2008
    vcrun2010
    Probably if someone wants to use Visual Studio as an IDE.
    Edit: Actually 'Visual C++ 2008 libraries' libraries concern any Windows applications written in C++.

    mono210
    Unity installs its own Mono, so I don't know the reasoning in having this.

    dxdiag
    No idea why anyone would need DirectX Diagnostics. It is just an information window.

    corefonts
    To use other Fonts in Unity other than Tahoma?

    msxml6
    wininet
    d3dcompiler_43
    dxfullsetup
    I don't know what these are and what for.

    3. Some say it is a WebKit issue and have some patch for it that we haven't gotten.

    4. It works for you? Because "-force-opengl" crashes Unity for me. If it would work, I would always use it.
     
    Last edited: May 28, 2014
  39. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    I won't reply you in detail because I have no time. However, I will tell you one thing - this script works for most people. Some crashes are only caused by bugs in graphics drivers or in Wine. And if you have better solution, just show us here. yes, post the script. And remember - it should be easy enough for beginners. Not all people are Linux specialists. POL just make things easy. It has some drawbacks, but thousands people use our solution successfully.

    We are here to run Unity3D on Linux. All ideas are welcomed.
     
  40. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    @Pendrokar - thanks, just what I needed.

    physx - great, will add this, performance is great.

    dotnet35, dotnet40 - ya, makes sense.

    ie8 - heard about it, didn't try it though

    vcrun2008, vcrun2010, oh, VS as Visual Studio. I keep forgetting that. Don't know whether it should default, since most people use MD.

    mono210 - winetricks doesn't even have this package :p

    dxdiag - yeah, well, probably useless then. Maybe a precaution.

    corefonts - yeah, steam crashes without this, it's definitely recommended

    And what winetricks has to say about these:
    msxml6 - MS XML Core Services 6.0 sp1
    wininet - MS Windows Internet API
    d3dcompiler_43 - winetricks doesn't even have this
    dxfullsetup - or this

    But thanks a lot. Apart from those last ones, it definitely cleared up a lot of questions I had - thanks.
    But I still don't know why there's the whole directx9. Hm.

    3 - Ah. That sucks.

    4 - It crashes for me too xD
    I think it needs to be combined with -force-gfx-direct or something?

    @Tomza - well, don't know if it is a better solution. Let's say different. Or ported. It has it's good and bad sides.
    Don't worry, winetricks has a GUI too, and I think even beginners can write winetricks unity3d into the terminal, if they don't like the GUI.
    Of course. I just want to help. I will post the script when I think it's good enough. The good thing about winetricks is that you can submit the verbs (scripts) you made to the maintainer, who will add them to winetricks itself if it works well.

    The thing we all love about Linux is the option to choose. We should keep that here too. I would say the winetricks method is quicker, but the POL more user known and friendly, but first you need POL installed.

    Anyway, I'm subscribed to this thread. If you don't have anything against, consider me as part of the team :)
     
    Last edited: May 27, 2014
  41. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    You are in the team :). We will be waiting for your script impatiently to test it. Linux users should have more options because - believe me or not - there are some people who don't like our solution. Maybe your idea will be just for them.

    I'm working now in a company that fix computers. I have never seen Linux. Windows Vista, Windows 7, Windows 8 and Mac. All Windows have problems with viruses. Hundreds, thousands ones. I'm really surprised. the new versions of Windows are the same S*** as for example XP. Always the same problem - malware. Using my OpenSuse, I don't worry of being online; I feel safe; I control all. That's why, it's important more and more people use Linux. And we can do that making Linux more friendly for game industry. Go Linux!
     
  42. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Well Jellyface, I am trying it your way without as much success. Could be because I am trying it on the new version of Unity. Right now I am stopping at an issue where Unity is unable to open a project, even an empty one.

    I am attaching two logs to this post, one with installed Winetricks components.
    View attachment $wine_unity3d.txt
    View attachment $winetricks.txt

    I guess the amount of components described in the PlayOnLinux script was simply a precaution. When facing a crash you install multiple possible missing components, which make it work, but you not sure if because of just the last component or with another combined. Only way it to do multiple reinstalls, and has time to check for multiple combinations. :?

    IMO the winetricks GUI really isn't as user friendly as the one PlayOnLinux has. PlayOnLinux doesn't change that much to call it 'nonsense'. But I am trying to run Unity 4.5 so I could post results on AppDB and submit bugs, since the Wine developers are not too fond of PlayOnLinux for kinda understandable reason.

    If you can, register on the Unity wiki and post the current winetricks script that you have, so we can collaborate on it, also join the #unity3d-wine IRC channel(I'm the only active on that though).

    @Tomza
    Don't praise Linux that much, feels the same as praising Macs for not having viruses, when in reality all that means is other operating systems are simply not popular enough for virus/malware makers to focus on. Also seems you haven't heard the term 'rootkit', which is used against Linux/Unix servers.

    I would only understand praising Linux for its open-source nature.
     
  43. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    I know rootkits, of course. I have been trying to find any malware on my OpenSuse for a long time. I use many methods and software. Nothing. It's much harder to write malware for Linux. if you don't let the malware run, it's not dangerous. Control is in your hands only. That's why, Linux is safe for me.
     
    Bojidar likes this.
  44. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Hiya.

    @Pendrokar - you forgot the registry fix (those few lines in the POL script containing "reg"), that's the cause of the crash. BTW you don't need to install every singe sp for dotnet, winetricks installs the service packs it needs by itself.

    Yeah, winetricks prob isn't as good in GUI as POL, but you must remember it was built for the console.

    BTW, by nonsense I meant "why fiddle with POL installation when winetricks is one text file and it is sufficient". Nothing against POL though. With nonsense, I didn't mean it actually is nonsense, I meant that sometimes it might be unnecessary ;)

    Oh, here's the script. I didn't post it on the wiki yet, because 1: I don't think it's quite wiki ready, 2: I'm quite in a hurry.

    The script installs a fully functional Unity install. License, creating a new project and play mode all work. Except the Asset Store :/

    Installs Unity 4.5.0 in a seperate wineprefix (though it doesn't make the wp 32 bit, I didn't figure out how to do it yet (I'm on 32 bit)), installs dependancies and does the usual fixes.

    Oh, BTW, yes, winetricks can't download dotnet30 by itself yet. M$ deleted it from thier website, and the current website wt uses doesn't provide a direct link. The script warns you about this at the start. You don't know from where POL downloads dotnet30, do you?

    To run the script type winetricks /path/to/your/verb/unity3d.verb (you have to name the script unity3d.verb). To try out the silent install option, run winetricks -q /path/to/your/verb/unity3d.verb

    It should be fully functional.

    Code (csharp):
    1.  
    2. w_metadata unity3d apps \
    3.     title="Unity 3D" \
    4.     publisher="Unity Technologies" \
    5.     year="2014" \
    6.     media="download" \
    7.     file1="UnitySetup-4.5.0.exe" \
    8.     installed_exe1="$W_PROGRAMS_X86_WIN/Unity/Editor/Unity.exe"
    9.  
    10. load_unity3d () {
    11.  
    12.     #    Warn about dotnet30
    13.     w_warn "In order to succesfully run this script you must first download netframework3.exe from http://www.oldversion.com/windows/net-framework-3-0 to /home/<username>/.cache/winetricks/dotnet30/"
    14.  
    15.     #    First check if winetricks actually can install some components
    16.     #    by downloading fonts - this will also fix any problems with text in the installer.
    17.     w_call tahoma
    18.     w_call corefonts
    19.  
    20.     #    Download and run the installer (this runs after the fonts because it's enourmous)
    21.     #    4.3.4: http://netstorage.unity3d.com/unity/UnitySetup-4.3.4.exe 0ef66c5ddded85c801d86951d89f73a8968d0798
    22.     w_download http://netstorage.unity3d.com/unity/UnitySetup-4.5.0.exe 82819f7946d2e2f4188b24e20dc2dc83b6f6f675
    23.     cd "$W_CACHE/$W_PACKAGE"
    24.    
    25.     w_warn "The installation of Unity may take 20 or more minutes. Please be patient, Unity is very big."
    26.     #    Run the installer, in unattended mode if requested
    27.     "$WINE" UnitySetup-4.5.0.exe $W_UNATTENDED_SLASH_S
    28.    
    29.     #    Install windows components
    30.     w_call d3dx9_36 #    If it doesn't work, use d3dx9
    31.    
    32.     #    .Net 2.0, 3.5  4.0
    33.     w_call dotnet20
    34.     w_call dotnet35
    35.     w_call dotnet40
    36.    
    37.     # Install NVidia PhysX - increases performance
    38.     w_call physx
    39.    
    40.     # Install IE 8 to fix the creating project bug
    41.     w_call ie8
    42.    
    43.     # Force mono so that MonoDevelop works
    44.     w_call forcemono
    45.    
    46.     #    Not sure whether these are needed, seems to work fine without them
    47.     #    w_call directx9 - as winetricks states: "Usually overkill."
    48.     #    w_call vcrun2008 - ↓
    49.     #    w_call vcrun2010 - if you want to use VS (BTW it's for C++)
    50.     #    w_call dxdiag - DirectX Diagnostic Tool
    51.     #    w_call msxml6 - MS XML Core Services 6.0 sp1
    52.     #    w_call wininet - MS Windows Internet API
    53.    
    54.     #    Fix license bug (if it doesn't work, replace "reg" with "reg.exe")
    55.     "$WINE" reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v ProductId /t REG_SZ /d 12345-oem-0000001-54321
    56.    
    57.     #    Old registry fix:
    58.     #    regfile=$(mktemp --suffix=.REG)
    59.     #    echo "REGEDIT4" > $regfile
    60.     #    echo "" >> $regfile
    61.     #    echo "[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion]" >> $regfile
    62.     #    echo '"ProductId"="12345-oem-0000001-54321"' >> $regfile
    63.     #    $WINE regedit $regfile
    64.    
    65.     #    Fix bug after pressing the play button
    66.     mkdir -p $WINEPREFIX/drive_c/users/$USER/AppData/LocalLow
    67.    
    68.     #    End
    69.     w_declare_exe "$W_PROGRAMS_X86_WIN/Unity/Editor" "Unity.exe"
    70. }
    71.  
    Oh, and Linux is awesome. I would never go back to windows :)
     
    Last edited: May 28, 2014
  45. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    @Jellyface

    I am unable to run the script, all winetricks says is that "Unknown arg <filename without extension>". It could be a formating issue with the CODE tag. Also I don't see where you point the new prefix.

    I know one way of pointing the prefix is having 'env WINEPREFIX="~/.wine-unity3d"' before "wine" or "winetricks" commands. "WINEARCH=win32" for 32bit architecture. Though winetricks also has a command for setting the wineprefix.

    Nope but it mentioned something about it.
     
  46. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    OK, so I browsed the PoL and Winetricks sourc code quite a lot, and I found out where dotnet30 is downloaded from in PoL. You won't belive it, but it is downloaded from a russian university. Also, looks like when installing dotnet msxml3 is also called, which is also for manual download, this time from CNET. PoL downloads this from it's own repository. I Updated the script to automaticaly download this components, so that the user deosn't need to install anything manually. It also now attemps to change the prefix to 32 bit.

    Note: I moved the Unity installation to the end of the script. It's explained in it.
    Note 2: I will keep the file updated on dropbox for the mo.

    Here it is:

    Code (csharp):
    1.  
    2. #    Filename: unity3d.verb
    3. #    Please don't change the filename otherwise the script won't work
    4. #    Source: https://www.dropbox.com/s/ur37z796fefr3c5/unity3d.verb
    5.  
    6. w_metadata unity3d apps \
    7.     title="Unity 3D" \
    8.     publisher="Unity Technologies" \
    9.     year="2014" \
    10.     media="download" \
    11.     file1="UnitySetup-4.5.0.exe" \
    12.     installed_exe1="$W_PROGRAMS_X86_WIN/Unity/Editor/Unity.exe"
    13.  
    14. load_unity3d () {
    15.  
    16.     #    Warn about dotnet30
    17.     #    w_warn "In order to succesfully run this script you must first download netframework3.exe from http://www.oldversion.com/windows/net-framework-3-0 to /home/<username>/.cache/winetricks/dotnet30/"
    18.    
    19.     #    Set the prefix to 32bit
    20.     export WINEARCH=win32
    21.  
    22.     #    First check if winetricks actually can install some components
    23.     #    by downloading fonts - this will also fix any problems with text in the installer.
    24.     w_call tahoma
    25.     w_call corefonts
    26.    
    27.     #    Install windows components
    28.     w_call d3dx9_36 #    If it doesn't work, use d3dx9
    29.    
    30.     #    Install MS .Net 2.0, 3.5  4.0
    31.     w_warn "Brace yourself. It is known that the installation of dotnet30 can be troublesome."
    32.    
    33.     #    Downloading files from external sources for winetricks
    34.     if [ ! -f "$W_CACHE/dotnet30/netframework3.exe" ]
    35.     then
    36.         w_download http://uni-smr.ac.ru/archive/win/MS%20.NET%20Framework/3.0/dotnetfx3.exe f3d2c3c7e4c0c35450cf6dab1f9f2e9e7ff50039 netframework3.exe
    37.         mkdir "$W_CACHE/dotnet30/"
    38.         mv "$W_CACHE/$W_PACKAGE/netframework3.exe" "$W_CACHE/dotnet30/netframework3.exe"
    39.     fi
    40.    
    41.     if [ ! -f "$W_CACHE/msxml3/msxml3.msi" ]
    42.     then
    43.         w_download http://repository.playonlinux.com/divers/msxml3.msi d4c2178dfb807e1a0267fce0fd06b8d51106d913
    44.         mkdir "$W_CACHE/msxml3/"
    45.         mv "$W_CACHE/$W_PACKAGE/msxml3.msi" "$W_CACHE/msxml3/msxml3.msi"
    46.     fi
    47.    
    48.     #    Not need to call dotnet20, it's called by dotnet30 which is called by dotnet30sp1 which is called by dotnet35
    49.     #    w_call dotnet20
    50.     w_call dotnet35
    51.     w_call dotnet40
    52.    
    53.     # Install NVidia PhysX - increases performance
    54.     w_call physx
    55.    
    56.     # Install IE 8 to fix the creating project bug
    57.     w_call ie8
    58.    
    59.     # Force mono so that MonoDevelop works
    60.     w_call forcemono
    61.    
    62.     #    Not sure whether these are needed, seems to work fine without them
    63.     #    w_call directx9 - as winetricks states: "Usually overkill."
    64.     #    w_call vcrun2008 - ↓
    65.     #    w_call vcrun2010 - if you want to use VS (BTW it's for C++)
    66.     #    w_call dxdiag - DirectX Diagnostic Tool
    67.     #    w_call msxml6 - MS XML Core Services 6.0 sp1 (3.0 is already installed)
    68.     #    w_call wininet - MS Windows Internet API
    69.    
    70.     #    (moved this to the end because if some of the components fail the user doesn't need to reinstall Unity)
    71.     #    Download and run the installer (this runs after the fonts because it's enourmous)
    72.     #    4.3.4: http://netstorage.unity3d.com/unity/UnitySetup-4.3.4.exe 0ef66c5ddded85c801d86951d89f73a8968d0798
    73.     w_download http://netstorage.unity3d.com/unity/UnitySetup-4.5.0.exe 82819f7946d2e2f4188b24e20dc2dc83b6f6f675
    74.     cd "$W_CACHE/$W_PACKAGE"
    75.    
    76.     w_warn "Now running the Unity installation. As Unity is very big, this can take more than 20 minutes. Please be patient."
    77.     #    Run the installer, in unattended mode if requested
    78.     "$WINE" UnitySetup-4.5.0.exe $W_UNATTENDED_SLASH_S
    79.    
    80.     #    Fix license bug (if it doesn't work, replace "reg" with "reg.exe")
    81.     "$WINE" reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v ProductId /t REG_SZ /d 12345-oem-0000001-54321
    82.    
    83.     #    Old registry fix:
    84.     #    regfile=$(mktemp --suffix=.REG)
    85.     #    echo "REGEDIT4" > $regfile
    86.     #    echo "" >> $regfile
    87.     #    echo "[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion]" >> $regfile
    88.     #    echo '"ProductId"="12345-oem-0000001-54321"' >> $regfile
    89.     #    $WINE regedit $regfile
    90.    
    91.     #    Fix bug after pressing the play button
    92.     mkdir -p $WINEPREFIX/drive_c/users/$USER/AppData/LocalLow
    93.    
    94.     #    End
    95.     w_declare_exe "$W_PROGRAMS_X86_WIN/Unity/Editor" "Unity.exe"
    96. }
    97.  
     
    _karm likes this.
  47. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Update: succesfully tested the script, so far everything works (except the asset store). Log attached. Log file too big for attaching, here's the dropbox link.
     
  48. Pendrokar

    Pendrokar

    Joined:
    Mar 26, 2011
    Posts:
    95
    Must have been the reason for the previous script also not working.

    Well I tested this script too, everything installed. But opening a project crashes Unity.

    We have only two main differences. I have a 64bit Ubuntu and run the script like this:
    env WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/unity3d winetricks -q unity3d.verb

    If I don't add winearch, Wine first creates a 64bit prefix and then gives another warning for winetricks using the 64bit prefix.

    By the way I asked in the Unity IRC chat about "-force-opengl" and it is still supported by Unity Technologies. But the hardest thing seems to be in getting any comprehension about the Wine log.
     
    Last edited: Jun 1, 2014
  49. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    Yeah, had a feeling it would be that.

    Darn, I forgot to tell you. Winetricks automatically creates a seperate wineprefix for all apps. Try simply winetricks -q /path/to/unity3d.verb. Anyway, I'll look at the source code again, I'll see if any other app creates a 32bit prefix and how.

    Just an idea. If installing ie8 fixed the create project bug, why not install Java into wine? I remember minecraft had something to do with OpenGL xD
     
  50. Deleted User

    Deleted User

    Guest

    Oh man, works great for me, in ubuntu 14.04. My dreams come true. Thanks to all dudes.