简体   繁体   English

有没有办法为 UWP[C++/xaml] 应用程序创建可执行文件?

[英]Is there a way to create executable file for UWP[C++/xaml] application?

I am trying to find a way to provide.exe (executable) file without side-loading the application or going through microsoft app store publishing process.我正在尝试找到一种方法来提供 .exe(可执行)文件,而无需侧面加载应用程序或通过 Microsoft 应用程序商店发布过程。

Also if its not possible, which type of App platform provide this facility.此外,如果不可能,哪种类型的应用程序平台提供此功能。

It's not possible for UWP applications. 对于UWP应用程序是不可能的。 You must generate an app package and install it via side-loading (if you don't want to go through the Store). 您必须生成一个应用程序包并通过侧面加载进行安装(如果您不想通过商店)。 You could create a WPF application (or many other types of applications, for that matter) to have an executable at the end of the compilation. 您可以创建WPF应用程序(或其他许多类型的应用程序),以在编译结束时具有可执行文件。

It is possible see this Microsoft article on vcvarsall.bat可以在 vcvarsall.bat 上查看这篇 Microsoft 文章

https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170 https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170

I wondered and found it.我想知道并找到了它。 I also noticed in the App.g.hpp file of my program near the bottom the file a disabled code can be set in properties to allow for main() with args of course.我还注意到在靠近底部的程序的 App.g.hpp 文件中,可以在属性中设置禁用的代码,当然允许 main() 和 args。 This link shows vcvarsall.bat for Visual Studio 2019 but the file locations are the same for Visual Studio 2022 except use Program Files instead of Program Files (x86) for Visual Studio 2019.此链接显示 Visual Studio 2019 的 vcvarsall.bat,但文件位置与 Visual Studio 2022 相同,只是使用 Program Files 而不是 Visual Studio 2019 的 Program Files (x86)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM