mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 01:39:08 +00:00
update scripts
This commit is contained in:
35
Scripts/pack-appx-dev.ps1
Normal file
35
Scripts/pack-appx-dev.ps1
Normal file
@@ -0,0 +1,35 @@
|
||||
$version = git describe --always --tags "--abbrev=0"
|
||||
|
||||
if($version.Split('.').Length.Equals(3))
|
||||
{
|
||||
$version += ".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.dev.xml ..\Build\Appx\AppxManifest.xml
|
||||
|
||||
# set version to git version
|
||||
Update-Version("..\Build\Appx\AppxManifest.xml")
|
||||
|
||||
# generate resources
|
||||
$priExe = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\makepri.exe'
|
||||
.$priExe new /pr ..\Build\Appx /cf ..\Build\priconfig.xml /of ..\Build\Appx\resources.pri
|
||||
|
||||
# packing
|
||||
$packExe = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\makeappx.exe'
|
||||
$folder = '..\Build\Appx\'
|
||||
|
||||
.$packExe pack /l /o /d ..\Build\Appx /p ..\Build\QuickLook-$version.appx
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
if(-not (Test-Path env:CI))
|
||||
{
|
||||
$signExe = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\signtool.exe'
|
||||
$files = gci '..\Build\Package\*' -Recurse -Include *.exe,*.dll | %{('"{0}"' -f $_.FullName)}
|
||||
$files = gci '..\Build\Package\*' -Recurse -Include QuickLook*.exe,QuickLook*.dll | %{('"{0}"' -f $_.FullName)}
|
||||
$timestampUrl = 'http://time.certum.pl/'
|
||||
|
||||
.$signExe sign /a /v /fd sha256 /t $timestampUrl $files
|
||||
|
Reference in New Issue
Block a user