Compiling for Universal Windows Platform
See also Exporting for Universal Windows Platform.
Requirements
- Compiling for Windows for more details).
- Compiling for Windows about the caveats of installing it and the various prompts.
- Windows 10 SDK (can be selected in Visual Studio installation).
- ANGLE source. Use the
ms_master(default) branch. Keep it in a path without spaces to avoid problems. Notems_masterbranch has been cleared out. c61d048. This page will eventually be updated in the future to reflect the new build instructions. See also Getting the source. Introduction to the buildsystem.Compiling
Compiling for Windows to see how these prompts work.vcvarsall.batwithx86_armoramd64_armas argument to set the environment.ANGLE_SRC_PATHto the directory where you downloaded the ANGLE source code. The build process will also build ANGLE to produce the required DLLs for the selected architecture. Once you’re set, run the SCons command similarly to the other platforms:C:\godot>scons platform=uwp
Creating UWP export templates
debugandreleasetemplates to be able to export. Open the command prompt for one architecture and run SCons twice (once for each target):
Repeat for the other architectures.C:\godot>scons platform=uwp target=release_debugC:\godot>scons platform=uwp target=release
binfolder will have the.exebinaries with a name likegodot.uwp.opt.debug.32.x86.exe(with variations for each target/arch).misc/dist/uwp_templateinside the Godot source folder and rename the binary togodot.uwp.exe. From the ANGLE source, underwinrt/10/src/Release_%arch%(where%arch%can beWin32,x64orARM), get thelibEGL.dlland thelibGLESv2.dll, putting them along with the executable.uwp_templatefolder to a ZIP. Rename the resulting Zip according to the target/architecture of the template:uwp_x86_debug.zipuwp_x86_release.zipuwp_x64_debug.zipuwp_x64_release.zipuwp_arm_debug.zipuwp_arm_release.zip
[versionstring]\templatesfolder in Godot settings path, where versionstring is the version of Godot you have compiled the export templates for - e.g. 3.0.alpha for the alpha version of Godot 3. If you don’t want to replace the templates, you can set the “Custom Package” property in the export window.Running UWP apps with Visual Studio
If you want to debug the UWP port or simply run your apps without packaging and signing, you can deploy and launch them using Visual Studio. It might be the easiest way if you are testing on a device such as a Windows Phone or an Xbox One.templatesand double-click theinstall.batscript file. This will install the Visual Studio project templates for ANGLE apps.winrt/10/src/angle.slnsolution from the ANGLE source and build it to Release/Win32 target. You may also need to build it for ARM if you plan to run on a device. You can also use MSBuild if you’re comfortable with the command line.Visual C++/Windows/Universalcategory.Debug_Win32toRelease_Win32(orRelease_ARMfor devices).Trueso it’s included in the project.Package.appxmanifestfile and select “Open With… > XML (Text) Editor”. In thePackage/Applications/Applicationelement, replace theExecutableattribute from$targetnametoken$.exetogodot.uwp.exe(or whatever your Godot executable is called). Also change theEntryPointattribute toGodotUWP.App. This will ensure that the Godot executable is correctly called when the app starts. not a filter) calledgamein your Visual Studio project folder and there you can put either adata.pckfile or your Godot project files. After that, make sure to include it all with the “Add > Existing Item” command and set their “Content” property toTrueso they’re copied to the app. not the solution) in the “Solution Explorer” and selecting “Build”. Now you can just run the project and your app should open. You can also use the “Start Without Debugging” option from the “Debug” menu (or press Ctrl + F5) to make it launch faster.
