Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11516

Preparing fails on icons with a target

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.4.0
    • None
    • cordova-windows
    • None

    Description

      Putting the following line in the config will will cause an error: "Source directory does not exist: Square44x44Logo_100.scale"

      <icon src="res/Windows/Square44x44Logo_100.png" target="SmallIcon"/>

      In prepare.js, `copyImages` calls `mapImageResources` but subdirectory information was lost. `copyMrtImage` in an earlier commit preserved this information (shown in the link below), but it was lost in a refactoring.

      https://github.com/apache/cordova-windows/blob/c1b80be51cdbd90160b6cb8162350bced8e1c44b/template/cordova/lib/prepare.js#L316

      This was missed by a defect in the `copyIcons` test in Prepare.Win10.spec.js:

      `readdirSync` was spied on to return an array of file paths when it actually only returns an array of the filenames. This caused the `copyIcons` spec to pass but the code failed when used.

      I have a fix ready for github.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hoovercj Cody Hoover
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: