add files for packing .appx

This commit is contained in:
Paddy Xu
2017-07-17 00:45:01 +03:00
parent 61fc320b8f
commit 4cc98c59fd
13 changed files with 110 additions and 1 deletions

4
.gitignore vendored
View File

@@ -290,4 +290,6 @@ __pycache__/
/QuickLook.Plugin.PDFViewer/MoonPdfLib
/GitVersion.cs
/QuickLook.Installer/C_QuickLookComponents.wxs
/Build/
/Build/*
!/Build/Assets
!/Build/AppxManifest.*

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10">
<Identity Name="21090PaddyXu.QuickLook" Version="0.0.0.0"
Publisher='E=xupaddy@gmail.com, CN="Open Source Developer, Pengfei Xu", O=Open Source Developer, C=FI' />
<Properties>
<DisplayName>QuickLook</DisplayName>
<PublisherDisplayName>Paddy Xu</PublisherDisplayName>
<Description>Bring macOS “Quick Look” feature to Windows</Description>
<Logo>Assets/StoreLogo.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
<Resource uap:Scale="100" />
<Resource uap:Scale="200" />
<Resource uap:Scale="400" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.15063.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Applications>
<Application Id="Main" Executable="Package\QuickLook.exe" EntryPoint="Windows.FullTrustApplication">
<Extensions>
<desktop:Extension Category="windows.startupTask" Executable="Package\QuickLook.exe"
EntryPoint="Windows.FullTrustApplication">
<desktop:StartupTask TaskId="QuickLookTask" Enabled="true" DisplayName="QuickLook" />
</desktop:Extension>
</Extensions>
<uap:VisualElements BackgroundColor="transparent"
DisplayName="QuickLook"
Square150x150Logo="Assets/Square150x150Logo.png"
Square44x44Logo="Assets/Square44x44Logo.png"
Description="Bring macOS “Quick Look” feature to Windows" />
</Application>
</Applications>
</Package>

40
Build/AppxManifest.xml Normal file
View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10">
<Identity Name="21090PaddyXu.QuickLook" Version="0.0.0.0" Publisher="CN=CE36AF3D-FF94-43EB-9908-7EC8FD1D29FB" />
<Properties>
<DisplayName>QuickLook</DisplayName>
<PublisherDisplayName>Paddy Xu</PublisherDisplayName>
<Description>Bring macOS “Quick Look” feature to Windows</Description>
<Logo>Assets/StoreLogo.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
<Resource uap:Scale="100" />
<Resource uap:Scale="200" />
<Resource uap:Scale="400" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.15063.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Applications>
<Application Id="Main" Executable="Package\QuickLook.exe" EntryPoint="Windows.FullTrustApplication">
<Extensions>
<desktop:Extension Category="windows.startupTask" Executable="Package\QuickLook.exe"
EntryPoint="Windows.FullTrustApplication">
<desktop:StartupTask TaskId="QuickLookTask" Enabled="true" DisplayName="QuickLook" />
</desktop:Extension>
</Extensions>
<uap:VisualElements BackgroundColor="transparent"
DisplayName="QuickLook"
Square150x150Logo="Assets/Square150x150Logo.png"
Square44x44Logo="Assets/Square44x44Logo.png"
Description="Bring macOS “Quick Look” feature to Windows" />
</Application>
</Applications>
</Package>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
Build/Assets/storelogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

26
Scripts/pack-appx.ps1 Normal file
View File

@@ -0,0 +1,26 @@
$version = git describe --always --tags "--abbrev=0"
function Update-Version($path)
{
$xml = [xml](Get-Content $path)
$xml.Package.Identity.Version="$version"
$xml.Save("$path")
}
if(-not (Test-Path env:CI))
{
# prapare folders
Remove-Item -Recurse ..\Build\Appx -ErrorAction SilentlyContinue
Copy-Item -Recurse ..\Build\Package ..\Build\Appx\Package
Copy-Item -Recurse ..\Build\Assets ..\Build\Appx\Assets
Copy-item ..\Build\AppxManifest.xml ..\Build\Appx
# set version to git version
Update-Version("..\Build\Appx\AppxManifest.xml")
# packing
$packExe = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\makeappx.exe'
$folder = '..\Build\Appx\'
.$packExe pack /o /d ..\Build\Appx /p ..\Build\QuickLook-$version.appx
}