Support for the UWP platform for devices like Xbox One, Hololens, Windows Phone

I was wondering if JUCE will be supporting the Universal Windows Platform (aka UWP, aka WinRT) any time soon? This would allow us to run JUCE apps on devices like Xbox One, Hololens and Windows Phone which only run UWP apps. The Windows Store now supports Win32 apps in addition to UWP apps so that isn’t really a benefit anymore.

The majority of work seems to be in replacing the existing Win32 Windowing/Messaging code with WinRT code. While Direct2D support would be nice, it is not required at as you can just use the existing JUCE software renderer like you are already doing for Win32. Since WinRT uses the WASAPI API it shouldn’t take much to get Audio I/O working since that code is already in JUCE. The MIDI I/O code would have to be rewritten since you can only access MIDI devices using their new WinRT MIDI API: https://msdn.microsoft.com/library/windows/apps/windows.devices.midi.aspx

There is now a third way to access the WinRT API from ISO C++ called C++/WinRT that is probably much easier to use than WRL or Microsoft’s Non-Standard C++/CX. There was a talk about it at CppCon: Embracing Standard C++ for the Windows Runtime.

3 Likes

We have this on our backlog. This would be quite involved though…

2 Likes

Having done both XboxOne’s XDK/ADK and UWP support for a game engine, I can confirm that this is a massive undertaking!

The application has to work atop the DX pipeline for rendering, and none of the standard Windows file i/o functionality is available. For the latter, you are effectively forced to use the async buffer functionality, which you can imagine what that means for JUCE’s File and stream classes.

Don’t they have this new emulation layer now where you can use most of the Win32 functions? Can’t remember where I read about this. Maybe I was dreaming…

Can’t say that rings a bell, but doesn’t sound surprising! From what I’ve experienced so far, the XboxOne is effectively a Windows machine with a different UI and control system.

If anything, you can play around with it if you have VS2015 installed with the UWP components, and if you have an XboxOne retail kit on the same network.

I really no nothing about UWP, but what does this thing do?

https://msdn.microsoft.com/en-gb/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter

It claims it can convert Win32 apps. Is that true? Has anyone tried this on JUCE?

Microsoft uses the UWP term all over the place which makes it confusing but it boils down to this:

The Desktop App Converter which you linked to lets you put pure Win32 apps in the Windows Store.

You cannot run pure Win32 apps on certain devices like Xbox One, Hololens, Windows Phone.

You can run pure WinRT apps on these devices.
You can also run apps that use the WinRT API and some whitelisted Win32 APIs on these devices.

A JUCE port would be done in the latter category since it would allow you to reuse things like the existing WASAPI code since that is one of the whitelisted Win32 APIs.

The list of whitelisted Win32 APIs can be found here:
https://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx

4 Likes

Is this still being considered? Being able to release Xbox Apps would be great, my employer is switching from JUCE to Unity because JUCE doesn’t support UWP apps.

You may have missed this other thread in which someone already shipped a UWP app using Juce.

1 Like

Yep! Got it working myself as well.

1 Like