Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 Universal plateform build fixes #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Windows 10 Universal plateform build fixes #42

wants to merge 4 commits into from

Conversation

demonixis
Copy link

@demonixis demonixis commented May 14, 2017

Hi,

This PR fixes the native C# dll to be able to be built with Visual Studio on a Windows 10 Universal Project.
With Unity, we can build games for all plateforms, including Windows Store. The Windows Store C# API is limited because apps are sandboxed. So the current OSVR.ClientKit dll can't be used with Unity (Win32 calls).

We know that OSVR doesn't support Windows Store, but without those changes, it's impossible for a developer to deploy a project to this platform. The result is two DLLs, the one who already know and another who is just used by a Windows 10 project.

For the Unity SDK, I recommand you to create a new folder called windows10 in the Plugins folder and copy the new dll into it. Set its build target to Windows Store only (not editor, runtime, just Windows Store). The build target of the current dll have to be changed to exclude Windows Store.

image

  • This is the Win10 setup

image

  • And the current DLL setup

@jessemcculloch
Copy link

The common folder name for Windows store plugin folders that Microsoft uses in their open source projects is WSA. So, x86, x86_64, and WSA.

@demonixis
Copy link
Author

You're right, but the dll built for Windows 10 has issues when building it with Unity. To be able to build my project for Windows 10 Universal, I had to delete the OSVR.ClientKit dll from my project and use those sources instead.
@JeroMiya I think it's a better idea to ship the sources instead of a dll with the Unity SDK.

@jessemcculloch
Copy link

I was merely pointing out the naming convention to keep it consistent with how Microsoft names the folder within the plugins folder. Not commenting on the need for the PR.

Yannick added 2 commits May 19, 2017 12:25
@demonixis
Copy link
Author

demonixis commented May 19, 2017

Well,

My last commits fixes a once for all the validation issue with this dll. Windows Store apps will fails at the certification process you have an API which uses DLLImport and that's the case of this dll. So I patched the code with some #if WINDOWS_UWP.

I think that the better thing to do is to create a separate dll that calls native methods from the dlls.

In all cases, that's what you have to do with the Unity plugin

  • Create a folder called WSA and copy the dll for Windows 10
  • OSVR.ClientKit.dll in the root folder MUST be excluded from the Windows Store target
  • The wsa version MUST be included for Windows Store target AND you have to check placeholder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants