[TIMOB-19487] Windows: Generate missing app icons based on DefaultIcon.png
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-11-18T01:17:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Gary Mathews |
Created | 2015-09-09T21:45:35.000+0000 |
Updated | 2017-03-31T22:06:59.000+0000 |
Description
If any of the app icons are missing, then search for -
<project-dir>/platforms/windows/DefaultIcon.png
- and <project-dir>/DefaultIcon.png
and us it to generate missing app icons.
You simply need to the base Builder object's generateAppIcons()
method:
var missingIcons = [
{
description: 'Resources/<platform>/appicon.png - Used for iPhone', // some meaningful description... iOS build dynamically generates this
file: '/path/to/dest.png', // MUST be a png and MUST have an extension
width: 100, // whatever is required
height: 100, // should match width
required: true // when DefaultIcon.png isn't big enough, true will trigger an error and false will skip the icon
}
];
this.generateAppIcons(missingIcons, function (err) {
// err is either true if there was an error or undefined if it was successful
});
Here's a good article on MSDN about the assets for Windows apps: https://msdn.microsoft.com/en-us/library/windows/apps/mt412102.aspx
https://github.com/appcelerator/titanium_mobile_windows/pull/442
Reopening as it is not implemented for Windows Store applications Applying the generated assets to the appxmanifest was implemented by TIMOB-19628. Every time the build runs, if the below assets do not exist then it will generate them, as implemented by this ticket: * Square44x44Logo.png * Square71x71Logo.png * Square150x150Logo.png However [based off our documentation](http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens) these are only the Windows Phone Store icons, for Windows Store icons we also need Logo.png and SmallLogo.png. *Because of this I am going to reopen the ticket as it is not implemented for Windows Store* Here are my observations for when the above are used: * When building to a Windows Phone emulator it will use Square44x44Logo as the apps logo. * When building to a Windows Phone device it will use Square44x44Logo.scale-100 as the apps logo, which is copied across at build time. Removing this will make the app use Square44x44Logo * When building to Windows Local it will use SmallLogo.png for the taskbar icon and start menu in Win10 and Logo.png for the tile, both of which are copied across at build time and not generated based off the DefaultIcon provided One further note is that based off the other platforms it seems we should not be copying across the assets from the SDK every build. The assets provided by the SDK should be copied into the Windows specific resources on project creation, although this may be a design decision as pre-existing projects would be unable to be built for Windows if this was the case.
https://github.com/appcelerator/titanium_mobile_windows/pull/463
Reopening ticket: OS: Microsoft Windows 10 Pro 10.0.10240 Appc core: 5.1.0-43 Appc NPM: 4.2.1 Ti SDK: 5.1.0.v20151104190037 When using the above, even if all the correct assets exist then the build will always generate the below assets
Bumping to 5.1.1 as this is less urgent than other tickets.
PR: https://github.com/appcelerator/titanium_mobile_windows/pull/475
[~eharris] Let me clarify, did you place icons directly under your project root, or place them into
<project-dir>/platforms/windows/
? I noticed we didn't implement<project-dir>/platforms/windows/
support.It looks like
<project-dir>/platforms/PLATFORM/DefaultIcon.png
support is not implemented in the titanium CLI yet. I think we want to skip<project-dir>/platforms/windows/
support for 5.1.1...should be done in the different ticket & next release. Do you agree, [~eharris] [~gmathews] ?[~kota] [~gmathews] The DefaultIcon.png should go in the root of the project (i.e.
<project-dir>/DefaultIcon.png
), not in a platform specific directory.ok thanks for confirm, updated ticket description.
Closing ticket as fixed, if there are any problems, please file a new ticket.