@@ -223,14 +223,14 @@ fn cfg_alias(alias: &str, has_feature: bool) {
223223
224224/// Attributes used on Windows.
225225#[ allow( dead_code) ]
226- #[ derive( Debug , Default ) ]
226+ #[ derive( Debug ) ]
227227pub struct WindowsAttributes {
228228 window_icon_path : Option < PathBuf > ,
229229 /// A string containing an [application manifest] to be included with the application on Windows.
230230 ///
231231 /// Defaults to:
232232 /// ```text
233- #[ doc = include_str ! ( "window -app-manifest.xml" ) ]
233+ #[ doc = include_str ! ( "windows -app-manifest.xml" ) ]
234234 /// ```
235235 ///
236236 /// ## Warning
@@ -255,10 +255,28 @@ pub struct WindowsAttributes {
255255 app_manifest : Option < String > ,
256256}
257257
258+ impl Default for WindowsAttributes {
259+ fn default ( ) -> Self {
260+ Self :: new ( )
261+ }
262+ }
263+
258264impl WindowsAttributes {
259265 /// Creates the default attribute set.
260266 pub fn new ( ) -> Self {
261- Self :: default ( )
267+ Self {
268+ window_icon_path : Default :: default ( ) ,
269+ app_manifest : Some ( include_str ! ( "windows-app-manifest.xml" ) . into ( ) ) ,
270+ }
271+ }
272+
273+ /// Creates the default attriute set wihtou the default app manifest.
274+ #[ must_use]
275+ pub fn new_without_app_manifest ( ) -> Self {
276+ Self {
277+ app_manifest : None ,
278+ window_icon_path : Default :: default ( ) ,
279+ }
262280 }
263281
264282 /// Sets the icon to use on the window. Currently only used on Windows.
@@ -275,7 +293,7 @@ impl WindowsAttributes {
275293 ///
276294 /// Defaults to:
277295 /// ```text
278- #[ doc = include_str ! ( "window -app-manifest.xml" ) ]
296+ #[ doc = include_str ! ( "windows -app-manifest.xml" ) ]
279297 /// ```
280298 ///
281299 /// ## Warning
@@ -641,8 +659,6 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
641659
642660 if let Some ( manifest) = attributes. windows_attributes . app_manifest {
643661 res. set_manifest ( & manifest) ;
644- } else {
645- res. set_manifest ( include_str ! ( "window-app-manifest.xml" ) ) ;
646662 }
647663
648664 if let Some ( version_str) = & config. version {
0 commit comments