3.17.1 Win10 / WinRT / UWP / Xbox templates

3.17.1 Win10 / WinRT / UWP / Xbox templates
0
#1

Going off the work that @CrazyHappyGame and @itchy72 (Windows10 and cocos2dx-3.16) have already done adding the Win10 templates back into v3.16 and 3.17, I have now got v3.17.1 building with Win10 templates, on Xbox and UWP apps.

If anyone is curious, I uploaded the modified files here: https://github.com/chadwyk/cocos2d-x_v3.17.1_UWP_Templates

Just copy these files over your current cocos2d-x 3.17.1 installation and generate a new game project and it should create the Win10 templates. Check out the readme for a few more steps, like which version to retarget the project as, etc.

There were some bugs in overridden function definitions in CCFileUtilsWinRT.cpp and .h, that were not updated when changes were made to CCFileUtils.cpp and .h (const was missing after function definitions), as well as added win10 missing dll and lib files, and I edited project files to include new libs (uv.dll, uv.lib).

I’m not good at git / pull requests, but if someone else could test and would like to merge this in and update the changes to the main git repo, I think that would be great! I saw that some of the original changes @CrazyHappyGame made for getting win10 on v3.16 were eventually merged in, and think this would be a great addition.

The tests project currently does not compile properly.

3 Likes

#2

@chadwyk Thank you!
I think that in next release only CMake will be supported (no XCode, no VS projects, solutions) so I think that it will be hard to push this change… Could you update CMakeLists.txt for win10?

Did you try build/publish win32 app on XBox, WindowsStore?
https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-root

C++/CX ( implementation in cocos2d-x e.g.: CCFileUtilsWinRT.cpp ) is deprecated:
https://docs.microsoft.com/en-us/cpp/cppcx/visual-c-language-reference-c-cx?view=vs-2019

C++/WinRT - looks very nice but who will rewrite it? :frowning:

0 Likes

#3

I agree I think once the Metal version is released I’m afraid I won’t be able to get templates working again. Unfortunately I’m very unfamiliar with Cmake. I too wish the team would officially support WinRT.

I made some progress bundling a win32 app as a bundled UWP app. It’s really easy to convert a win32 application into a package. Figuring out how to run it on the Xbox I’m stumped on.

I was able to build it. Internally the preprocessor still detects as win32, not winRT - but there are calls you can still make to run win10 functions for Xbox controllers etc. However I was never able to get it to run on Xbox, only on Windows. I couldn’t get the settings to remotely debug it to work. The settings are a little different in Win32 vs WinRT project. I tried side loading the package on my Xbox but the app would just crash. I’m guessing maybe because the win32 app isn’t 64bit? I gave up at that point. Keep me updated if you make any progress.

0 Likes