locked
[UWP] [Desktop Bridge] How to assign an icon to these... RRS feed

  • Question

  • Hi,

    I want to know which image asset is used for displaying the icon in the below screenshots. As you can see currently it isn't showing the converted app's icon.

    https://social.msdn.microsoft.com/Forums/getfile/934641
    https://social.msdn.microsoft.com/Forums/getfile/934642

    I also want to point out that our converted app isn't using any target based image assets I specified, even though I followed the guidelines/file naming. I have written everything regarding that issue in this post:
    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/6e6e3057-3b03-4ca4-953d-165561463b84/uwp-desktop-bridge-target-based-image-assets-issue?forum=wpdevelop

    Still waiting for a solution to that and if that's sorted then maybe this also would be working once I use the correct image assets required for the above screenshots.

    Thanks.
    P.S. can't post images or links as it says my account is not verified although i just verified it.

    • Edited by Inmatrix Monday, September 12, 2016 2:05 PM
    Monday, September 12, 2016 2:02 PM

Answers

  • You need to index the assets so the platform knows how to look them up in your package.  This is a feature we have on the backlog for future consideration for the DesktopAppConverter.  Until then, you will need to generate the resource index file (resoures.pri) manually.

    From a Visual Studio developer command prompt run the following:

          1.       Unpack the appx:

    Makeappx unpack /v /p <foo.appx> /d c:\myapp

    2.       Create a config file and resource file in the output folder

    cd /d c:\myapp

    makepri createconfig /cf c:\myapp\priconfig.xml /dq en-US        

    makepri new /pr c:\myapp /cf c:\myapp\priconfig.xml                  ‘this creates the resources.pri based on the config file

    3.       Move out of the output folder and Repackage the appx:

    cd ..

    makeappx pack /p <foo.appx> /l /d c:\myapp

    4.       Resign with the cert you used previously

    Signtool sign -f <mycert.pfx>  -fd SHA256 -v <foo.appx>

    Adam Braden [MSFT]

    • Proposed as answer by Martin Zhema Friday, September 16, 2016 8:15 AM
    • Marked as answer by Inmatrix Sunday, September 18, 2016 6:59 AM
    Thursday, September 15, 2016 6:40 PM

All replies

  • Hi Inmatrix,

    <Here> is a video(begin 9:00 minute) talk about this, you can refer to it.

    Actually in your DesktopAppConverter output file, you need to put your new image in Assets folder and you need to edit AppxMainifest.xml. Here are some screenshots:

     

     

    Then you can deploy your app package to current user acount. You can refer to the following link:

    https://msdn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter?f=255&MSPPError=-2147217396

    The following is the powershell command:

    Add-AppxPackage C:\Users\v-zhema\Desktop\output1\VLCApp\PackageFiles\AppxManifest.xml -Register

    Then you can see the converted UWP app is installed to our mechine.

    Here are some screenshot:

     

     


    Best Regards!
    Martin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Martin Zhema Tuesday, September 13, 2016 7:49 AM
    • Proposed as answer by Martin Zhema Tuesday, September 13, 2016 7:50 AM
    Tuesday, September 13, 2016 7:32 AM
  • Hi Martin,

    I've already done all that. Here's a screenshot of the images in my assets folder and appmanifest.
    https://social.msdn.microsoft.com/Forums/getfile/934969

    As you can see I have specified the following images:
    ZoomPlayer.44x44.AppList.targetsize-16.png
    ZoomPlayer.44x44.AppList.targetsize-24.png
    ZoomPlayer.44x44.AppList.targetsize-32.png

    but the app isn't using those images where it should.
    For Ex, the 24x24 icon isn't used in the task bar, it should be the green icon but instead its using 'ZoomPlayer.44x44.png'
    https://social.msdn.microsoft.com/Forums/getfile/934970

    also here it isn't using the 16x16 nor the 32x32 icon, it just shows a blank icon.
    https://social.msdn.microsoft.com/Forums/getfile/934971

    Tuesday, September 13, 2016 9:00 AM
  • Hi Inmatrix,

    If the Assets folder and the AppxManifest.xml have some changes, you need to redeploy your app package to current user account.

    Have you done this before?


    Best Regards!
    Martin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 13, 2016 9:21 AM
  • Hi Martin,

    Yes I have done that. I make the changes then recompile the package and install it by just double clicking on the .appx file. Everything gets installed fine with the updated changes but its not showing the target based icons as in the screenshots I linked above. Is this an issue related to only desktop bridge apps?

    FYI, I also tried to manually redeploy using the command you gave and it's the same, no difference.
    Tuesday, September 13, 2016 10:31 AM
  • You need to index the assets so the platform knows how to look them up in your package.  This is a feature we have on the backlog for future consideration for the DesktopAppConverter.  Until then, you will need to generate the resource index file (resoures.pri) manually.

    From a Visual Studio developer command prompt run the following:

          1.       Unpack the appx:

    Makeappx unpack /v /p <foo.appx> /d c:\myapp

    2.       Create a config file and resource file in the output folder

    cd /d c:\myapp

    makepri createconfig /cf c:\myapp\priconfig.xml /dq en-US        

    makepri new /pr c:\myapp /cf c:\myapp\priconfig.xml                  ‘this creates the resources.pri based on the config file

    3.       Move out of the output folder and Repackage the appx:

    cd ..

    makeappx pack /p <foo.appx> /l /d c:\myapp

    4.       Resign with the cert you used previously

    Signtool sign -f <mycert.pfx>  -fd SHA256 -v <foo.appx>

    Adam Braden [MSFT]

    • Proposed as answer by Martin Zhema Friday, September 16, 2016 8:15 AM
    • Marked as answer by Inmatrix Sunday, September 18, 2016 6:59 AM
    Thursday, September 15, 2016 6:40 PM
  • Thanks Adam for the solution, that worked.
    Sunday, September 18, 2016 8:16 AM