Domanda

I'm using Inno Setup to create an installer for my app. Creating shortcuts on the windows 8 start screen works fine using [Icons]. But now I'd like to customize the tiles using a VisualElementsManifest.

I believe I followed all of the steps here: "How to customize Start screen tiles for desktop apps" http://msdn.microsoft.com/en-us/library/windows/apps/dn393983.aspx#create_the_customization_xml_file

However, when I compile my installer and run it, the VisualElementsManifest is ignored. The tile shows up on the start screen with a regular icon as defined in the Inno Setup iss-file (IconFilename).

Following steps were taken to create custom tile for MyApp.exe:

<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <VisualElements
        BackgroundColor="#E82C2A"
        ShowNameOnSquare150x150Logo="off"
        ForegroundText="light"
        Square150x150Logo="logo.MyApp.150x150.png"
        Square70x70Logo="logo.MyApp.70x70.png"/>
</Application>

File saved as MyApp.visualelementsmanifest.xml in the same directory as MyApp.exe.

Configure Inno Setup:

[Setup]
AppName=MyApp
AppVersion=0.1
DefaultDirName={pf}\MyApp
SetupIconFile=MyApp.ico

[Files]
Source: "MyApp.exe"; DestDir: "{app}"
Source: "MyApp.exe.manifest"; DestDir: "{app}"
Source: "MyApp.ico"; DestDir: "{app}"
Source: "logo.MyApp.150x150.png"; DestDir: "{app}"
Source: "logo.MyApp.70x70.png"; DestDir: "{app}"
Source: "MyApp.visualelementsmanifest.xml"; DestDir: "{app}"

[Icons]
Name: "{group}\appfolder\MyApp"; Filename: "{app}\MyApp.exe";
Name: "{commonprograms}\MyApp"; Filename: "{app}\MyApp.exe";
Name: "{commondesktop}\MyApp"; Filename: "{app}\MyApp.exe";

Compile installer and run it.. no luck.

È stato utile?

Soluzione

I've used a customization XML file with the following content (it's the necessary minimum shown in the linked article):

<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <VisualElements
        BackgroundColor="#FF0000"
        ShowNameOnSquare150x150Logo="on"
        ForegroundText="light"/>
</Application>

and saved it as MyProg.visualelementsmanifest.xml since the program I'll install is MyProg.exe (I've used the one from the Inno Setup's Examples subfolder but it should not matter; important here is naming of the XML file according to that executable). My script looked like this (again, just the necessary minimum):

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[Files]
Source: "MyProg.exe"; DestDir: "{app}"
Source: "MyProg.visualelementsmanifest.xml"; DestDir: "{app}"

[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"

I've tested on Windows 8.1 Enterprise 64-bit (running on virtual machine) and it worked as expected. I've checked the Apps screen as well as the Start one (if you select Pin to Start option in Apps screen). Even updating worked as expected, so try to build your setup from this minimum (check if the XML file has the minimum attributes I've used here and check if the name of the XML file equals to the expected pattern).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top