Unity3D-Wine-Support / Unity3D-on-Wine

Scripts for making Unity3D run on Wine.
GNU General Public License v2.0
102 stars 59 forks source link

MonoDevelop scripts #40

Closed Radivarig closed 9 years ago

Radivarig commented 9 years ago

Scripts and readme for using MonoDevelop

Radivarig commented 9 years ago

Good to go

jurf commented 9 years ago

Niiice dude. Sorry for responding so late, was away from home all week. I'm gonna test it hopefully on the morrow (though I'm terrible at these kinds of promises), and if all's gonna go well, I'll merge. Thanks for all your work!

jurf commented 9 years ago

@Radivarig I cannot get this to work. Yes, the script does open MonoDevelop, however, it doesn't open neither the project nor the file. Just a window with the MonoDevelop homepage.

Radivarig commented 9 years ago

Are you missing the required additional $(Line) parameter to send to the external editor? I get the same behavior when I exclude it.

jurf commented 9 years ago

Nope, the line parameter is definitely set to be sent. Although for some reason Unity thinks that it should pass the same arguments as to the built-in MonoDevelop. I'll try experimenting a bit more.

Also, line number 18 is unneeded. It only produces errors since shell doesn't allow spaces before and after the equals sign.

Radivarig commented 9 years ago

I'm on GNU bash, version 4.3.33(1) and Unity 4.6.1f1 Strangely it works for me with spaces when I run it, so I missed to notice. I pushed the correction. But I have no idea why would Unity not send the specified args

Radivarig commented 9 years ago

Under what name did you save the script?

jurf commented 9 years ago

I just went Raw -> Save As, so it's under the original.

jurf commented 9 years ago

GNU bash 4.3.33(1) here.

Radivarig commented 9 years ago

Try now :)

jurf commented 9 years ago

OK, great, works now!

I think there are two (edit: three) things to be done before I can merge this:

  1. Why do you symlink root to the project folder? Shouldn't you symlink the virtual C: drive, where Unity is installed?
  2. We should somehow work around opening JS files, for example in the built-in editor or in a system specified editor.
  3. MonoDevelop should be launched with --no-logo in the end.

Otherwise, perfect!

Radivarig commented 9 years ago

1) #39 Wine already symlinks C: in ~/.local/share/wineprefixes/unity3d/dosdevices along with other drives where also is Z: symlink to root! So inside monodevelop solution>Assembly-CSharp-vs>References if you rightclick>Properties on UnityEditor (or any other with error mark) all win paths to references start with Z: because Unity saves those references in Assembly-CSharp-vs.csproj like this:

<Reference Include="UnityEngine">
    <HintPath>Z:/home/radivarig/.local/share/wineprefixes/unity3d/drive_c/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll</HintPath>
</Reference>

You can ignore the invalid path mark as it is symlinked correctly. My guess is that monodevelop thinks there's error because of space in "Program Files" but path is in win layer environment so it isn't invalid.

2) #42 is still opened, but I'll adapt and push the suggested workaround from there.

3) If you man monodevelop you'll see that native MD has no option --nologo and it also don't show any. edit: built-in seems to ignore --nologo completely

Radivarig commented 9 years ago

Ideally we should use only:

  1. native => #42
  2. built-in => #37, outdated, --nologo is ignored
  3. custom editor => no proper auto-completion

37 is a big deal for me as I need AltGr for {}[]<> (tho this is wine problem)

Radivarig commented 9 years ago

Note, opening .js in built-in depends on wineprefix, mine is called unity3d. Also, if you replaced MonoDevelop.exe with some script revert it to original.

Radivarig commented 9 years ago

Yo, did you test this?

jurf commented 9 years ago

Nope, hopefully I'll get to it tomorrow.

jurf commented 9 years ago

Tried it (in Unity 5), and bad news.

I had to delete all the *sln files to get it working and, it opens a new window every time I open a new file. "Sync MonoDevelop project" opens MonoDevelop, but without the project.

Radivarig commented 9 years ago

Ok, I know what's happening. I'll fix it soon-ish.

Radivarig commented 9 years ago

Fixed

jurf commented 9 years ago

Seems good! If you don't experience any more problems I think we can merge. Also, do think the Editor attaching option does anything?

Radivarig commented 9 years ago

No problems here. For attaching I can't find any technical info on how it's allowed, based on parameters there is no difference in how Unity communicates with builtin and external editor so my guess is it happens in project files.

jurf commented 9 years ago

OK, merging. I'll update the wiki too.

jurf commented 9 years ago

Thanks for the great work.

Radivarig commented 9 years ago

Glad I could contribute :)