Unity 3D Web Player...It works on Linux now!

Questions about Wine on Linux
Locked
rboxeur
Level 2
Level 2
Posts: 29
Joined: Sun Jul 15, 2012 3:23 pm

Unity 3D Web Player...It works on Linux now!

Post by rboxeur »

Hi there,

I finaly found a solution to use the Unity 3D Web Player (http://unity3d.com/webplayer) :D . Please find below instructions.



Here is a Youtube video I did to test a few games BGO (Battlestar Galactica Online), Ratz Instagib, Downtown Drift: http://www.youtube.com/watch?v=MpHJY5Sw ... r_embedded

Unfortunately I just have ATI card at home -- not NVIDIA .I wanted to know if someone will be interested to do a few tests with a NVIDIA card. So we can have an idea for performance.

Tested with winte 1.7.0

1. Download http://www.mediafire.com/?g6ndj2dviujtync
2. Choose a cleaned/fresh WINEPREFIX

export WINEPREFIX=/where/you/want/to/install/everything

3. Decomrpess the tarball

tar xvjf all_tools.tar.bz2

4. Install firefox

wine firefox_set_up_23.0.1.exe

5. Install Flash player

wine install_flash_player_11_plugin.exe

6. Install Unity Web Player

wine UnityWebPlayerFull.exe

7. Decompress the file Unity_WebPlayer_Lastest_Updates.tar.bz2 into $WINEPREFIX/drive_c/users/yourusername/Local\ Settings/Application\ Data/

tar xvjf Unity_WebPlayer_Lastest_Updates.tar.bz2 -C $WINEPREFIX/drive_c/users/yourusername/Local\ Settings/Application\ Data/

Replace 'yourusername' by yours

Notice: If you want to play BGO then you have to patch wine-1.7.0//dlls/user32/winstation.c Replace

HDESK WINAPI OpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access )
{
FIXME( "(%x,%i,%x): stub\n", flags, inherit, access );
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
return 0;
}

by

HDESK WINAPI OpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access )
{
return CreateDesktopA("Desktop", 0, 0, flags, access, 0);
}
Imatux
Newbie
Newbie
Posts: 1
Joined: Sun Sep 29, 2013 10:37 am

Re: Unity 3D Web Player...It works on Linux now!

Post by Imatux »

ok how do we patch wine?
Zydu
Newbie
Newbie
Posts: 3
Joined: Mon Oct 21, 2013 11:08 am

Re: Unity 3D Web Player...It works on Linux now!

Post by Zydu »

Imatux

Code: Select all

Get wine source code from git:
git clone git://source.winehq.org/git/wine.git ~/wine-git

Edit the file dlls/user32/winstation.c
rboxeur, I have kinda followed your way. I've setup win xp on virtual box, and launched unty web player there, after it was launched I've copied the files to wineprefix and it worked.

I have some problems with launching BGO, I got "Unable to update" error. I will try to use modded wine and post results here.
Zydu
Newbie
Newbie
Posts: 3
Joined: Mon Oct 21, 2013 11:08 am

Re: Unity 3D Web Player...It works on Linux now!

Post by Zydu »

Unfortunately I am not able to compile modded wine on 64bit Ubuntu 13.10. Anyway I have managed to get some unity games to work. No luck with BGO.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Unity 3D Web Player...It works on Linux now!

Post by oiaohm »

rboxeur instructins to make a particular appliction work should be entered into the Appdb.

That patch should be connected to a bug report. That way one day it might get mainline.

http://bugs.winehq.org/show_bug.cgi?id=12067 In fact is the bug and the patch that is lined up for mainline is in fact different.

Its a 4 part more complex and more correct patch. The patch you have risk breaking other programs as it not infact operating as spec. The 4 part is to what we believe is spec(yes with MSDN documentation there could be a bug or two).

Would you mind rerunning test this time using the 4 part patch from bug 12067.

http://appdb.winehq.org/viewbugs.php?bug_id=12067 yes Unity 3D Web Player and all those other programs you have listed are not listed as effected programs by bug 12067 rboxeur. They should be listed.

building from soruce is covered in the wiki even for 64 bit ubuntu.
Zydu
Newbie
Newbie
Posts: 3
Joined: Mon Oct 21, 2013 11:08 am

Re: Unity 3D Web Player...It works on Linux now!

Post by Zydu »

Got some compiling errors after applying patch on wine 1.7.4

Code: Select all

In file included from winstation.c:36:0:
winstation.c:559:15: warning: ‘struct open_input_desktop_reply’ declared inside parameter list [enabled by default]
  DECL_HANDLER(open_input_desktop)
               ^
request.h:34:63: note: in definition of macro ‘DECL_HANDLER’
     void req_##name( const struct name##_request *req, struct name##_reply *reply )
                                                               ^
winstation.c:559:15: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
  DECL_HANDLER(open_input_desktop)
               ^
request.h:34:63: note: in definition of macro ‘DECL_HANDLER’
     void req_##name( const struct name##_request *req, struct name##_reply *reply )
                                                               ^
winstation.c:559:15: warning: ‘struct open_input_desktop_request’ declared inside parameter list [enabled by default]
  DECL_HANDLER(open_input_desktop)
               ^
request.h:34:63: note: in definition of macro ‘DECL_HANDLER’
     void req_##name( const struct name##_request *req, struct name##_reply *reply )
                                                               ^
winstation.c: In function ‘req_open_input_desktop’:
winstation.c:571:13: warning: the address of ‘desktop_ops’ will always evaluate as ‘true’ [-Waddress]
         if (&desktop_ops && obj->ops != &desktop_ops)
             ^
winstation.c:574:18: error: dereferencing pointer to incomplete type
             reply->handle = alloc_handle( current->process, obj, req->access, req->attributes );
                  ^
winstation.c:574:69: error: dereferencing pointer to incomplete type
             reply->handle = alloc_handle( current->process, obj, req->access, req->attributes );
                                                                     ^
winstation.c:574:82: error: dereferencing pointer to incomplete type
             reply->handle = alloc_handle( current->process, obj, req->access, req->attributes );
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Unity 3D Web Player...It works on Linux now!

Post by oiaohm »

Zydu please note that is a 4 part patch. 4 patches have to be applied before attempting to build.
And if the patches don't work any more they need to be reported on the bug as bust.
The fact the bug has been left alone since 2012 means the patches could be now bust.
Also someone has to push those patchs in working state upstream. Bartosz dropped off patches and disappeared.
See the problem everyone that happens when you go third party solutions all the time. The main bug gets neglected.

Still no one has added Unity 3D player in the appdb as being effected by this bug. Developers take not doing this as the fault is not critical enough to be fixed. Its not my job or any of the other support peoples job to setup bug assocations as well. Bug assocations the job of the users of programs to prove their intent in wishing the fault fixed.

FOSS projects have processes. Not doing the processes lead to items not getting fixed. Bugs with more applications assocated are more likely to get developer time.

Even the hack patch that rboxeur used should have been placed in the bugzilla.

This this the big thing. Forum, Appdb, Some random site is not the location for patches to be. Bugzilla connected to a bug number is where patches should be before being sent upstream. The patch should be refered to by the bug number. So newer version of patch can be found and used.

Not following these processes just is causing mess. In fact if a patch is causing some leathal effect it can be deleted from the bugzilla by lead developers.

Basically we have had a few people recently not following correct processes. If you wish something fixed correct processes have to be followed.

Zydu basically each section of wine has its responsablity.
Application install instructions that do work including possibly links to videos of instructions. Those own to appdb.winehq.org
Debuging and asking questions before submitting to bug reports or entries to appdb this is what the forum.winehq.org and irc freenode #winehq are for.
bugzilla.winehq.org bugs and prototype patches and hack patches to those bugs.
Finally http://wiki.winehq.org/SubmittingPatches patches ready for upstream.

These seperations are in fact critical. rboxeur instructions placed here will disappear under everyone elses repsonses never to be seen again. Where if placed correctly in the appdb and bugzilla they will only disappear when better instructions are made.
MarcusTCicero
Newbie
Newbie
Posts: 4
Joined: Sun Jun 09, 2013 1:08 pm

Re: Unity 3D Web Player...It works on Linux now!

Post by MarcusTCicero »

Does rboxeur's method still work? I attempted with 1.7.8, assuming that the 4 part patch was already applied. I check the OpenInputDesktop function in winstation.c, it's now implemented in a similar matter as suggested by rboxeur, only without that tiny runtime stack. I tried the steps listed, first installing firefox 26, then the newest adobe flash, and the current version of Unity. I tried letting Battlestar Galactica Online update Unity on Virtual Box, then use the Unity folder on the Virtual Machine to replace the one in my wineprefix. Still end up with the same unable to update message when trying to run Battlestar Galactica Online. However, at least the Settings manager on Unity's website works now, though it's quite useless unless I can get something else to run on it.
chris7
Level 1
Level 1
Posts: 6
Joined: Sun Jan 19, 2014 8:16 am

Re: Unity 3D Web Player...It works on Linux now!

Post by chris7 »

Got it working! Described the details in the AppDB (Unity Web Player 4.3.3f).

Battlestar Galactica Online works too now!
chris7
Level 1
Level 1
Posts: 6
Joined: Sun Jan 19, 2014 8:16 am

Re: Unity 3D Web Player...It works on Linux now!

Post by chris7 »

Alternatively, you may try the Pipelight Firefox plugin. This plugin runs in your native Linux browser and establishs a connection to the Unity3d plugin running under Wine. So, only the Unity3d plugin runs under Wine, the rest is native Linux. This approach needs less ressources than running the browser under Wine too :-)

Although the examples on the Unity3d refuse to run, Battlestar Galactica works.
exercise9
Newbie
Newbie
Posts: 1
Joined: Mon Oct 26, 2015 7:25 am

Re: Unity 3D Web Player...It works on Linux now!

Post by exercise9 »

I found an easy way using PlayonLinux. Download the Unity3D editor then start PlayonLinux. Select install a non-listed program. When it asks if you'd like to do anything before installation, select use a different version of Wine. I used Wine 1.7.53 Steam Crossoverhack. Next, browse for the Unity3D setup.exe file. Let it install the file. When finished, select the Unity3D shortcut in PlayonLinux and select configure on the left side of the screen. Now select install components and select Microsoft Core Fonts. That's all I had to do. I'm running SparkyGameover 32 bit OS.
Locked