mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
Fix bug 64472, fix bug 64509 (#991)
- Include visual elements in zip update file - Exclude vlc-cache-gen from zip update file
This commit is contained in:
@ -993,10 +993,9 @@ Source: {#sBrandingFolder}\win-linux\package\windows\data\VisualElementsManifest
|
||||
Source: {#sBrandingFolder}\win-linux\package\windows\data\visual_elements_icon_150x150.png; DestDir: {app}\browser; MinVersion: 6.3;
|
||||
Source: {#sBrandingFolder}\win-linux\package\windows\data\visual_elements_icon_71x71.png; DestDir: {app}\browser; MinVersion: 6.3;
|
||||
|
||||
#if defined(_WIN_XP) + defined(EMBED_HELP)
|
||||
Source: {#DEPLOY_PATH}\*; DestDir: {app}; Flags: recursesubdirs;
|
||||
#else
|
||||
Source: {#DEPLOY_PATH}\*; DestDir: {app}; Excludes: "editors\web-apps\apps\*\main\resources\help"; Flags: recursesubdirs;
|
||||
#if defined(_WIN_XP) | defined(EMBED_HELP)
|
||||
Source: "{#DEPLOY_PATH}-Help\*"; DestDir: {app}; Flags: recursesubdirs;
|
||||
#endif
|
||||
Source: {#DEPLOY_PATH}\*.exe; DestDir: {app}; Flags: signonce;
|
||||
Source: {#DEPLOY_PATH}\*.dll; DestDir: {app}; Flags: signonce;
|
||||
|
||||
@ -3,6 +3,7 @@ param (
|
||||
[string]$BuildDir = "build",
|
||||
[string]$DesktopDir = "DesktopEditors",
|
||||
[string]$MultimediaDir,
|
||||
[string]$BrandingDir = ".",
|
||||
[switch]$ExcludeHelp,
|
||||
[switch]$Sign,
|
||||
[string]$CertName = "Ascensio System SIA",
|
||||
@ -19,16 +20,36 @@ $Suffix = switch ( $Target )
|
||||
"windows_x64_xp" { "x64-xp" }
|
||||
"windows_x86_xp" { "x86-xp" }
|
||||
}
|
||||
$DesktopHelpDir = "$DesktopDir-Help"
|
||||
|
||||
# Check directory
|
||||
if ( -Not (Test-Path -Path $BuildDir) ) {
|
||||
if ( -Not (Test-Path $BuildDir) ) {
|
||||
Write-Error "Path $BuildDir does not exist"
|
||||
}
|
||||
|
||||
if ( $Sign ) {
|
||||
if ( $DesktopDir ) {
|
||||
Set-Location "$BuildDir\$DesktopDir"
|
||||
# Copy VisualElements
|
||||
Write-Host "Copy: $BrandingDir\data\VisualElementsManifest.xml > $BuildDir\$DesktopDir\DesktopEditors.VisualElementsManifest.xml" -ForegroundColor Yellow
|
||||
Copy-Item -Path "$BrandingDir\data\VisualElementsManifest.xml" `
|
||||
-Destination "$BuildDir\$DesktopDir\DesktopEditors.VisualElementsManifest.xml" `
|
||||
-Force
|
||||
Write-Host "Copy: $BrandingDir\data\visual_elements_icon_* > $BuildDir\$DesktopDir\browser" -ForegroundColor Yellow
|
||||
New-Item "$BuildDir\$DesktopDir\browser" -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path "$BrandingDir\data\visual_elements_icon_*" `
|
||||
-Destination "$BuildDir\$DesktopDir\browser" -Force
|
||||
|
||||
# Move Help
|
||||
Get-ChildItem "$BuildDir\$DesktopDir\editors\web-apps\apps\*\main\resources\help" -Directory `
|
||||
| ForEach-Object {
|
||||
$src = Resolve-Path -Relative $_.FullName
|
||||
$dst = $src -replace "$DesktopDir", "$DesktopHelpDir"
|
||||
Write-Host "Move: $src > $dst" -ForegroundColor Yellow
|
||||
New-Item $dst -ItemType Directory -Force | Out-Null
|
||||
Move-Item -Path $src -Destination $dst -Force
|
||||
}
|
||||
|
||||
if ( $DesktopDir ) {
|
||||
Set-Location "$BuildDir\$DesktopDir"
|
||||
if ( $Sign ) {
|
||||
$SignFiles = Get-ChildItem `
|
||||
*.exe, *.dll, converter\*.exe, converter\*.dll, plugins\*\*.dll `
|
||||
| Resolve-Path -Relative
|
||||
@ -40,13 +61,21 @@ if ( $Sign ) {
|
||||
Write-Host "signtool verify /pa /all $SignFiles" -ForegroundColor Yellow
|
||||
& signtool verify /pa /all $SignFiles
|
||||
if ( $LastExitCode -ne 0 ) { throw }
|
||||
|
||||
Set-Location $PSScriptRoot
|
||||
# VLC plugin cache
|
||||
Write-Host ".\vlc-cache-gen $PWD\plugins" -ForegroundColor Yellow
|
||||
& .\vlc-cache-gen "$PWD\plugins"
|
||||
if ( $LastExitCode -ne 0 ) { throw }
|
||||
}
|
||||
if ( Test-Path "vlc-cache-gen.exe" ) {
|
||||
Write-Host "Delete: vlc-cache-gen.exe" -ForegroundColor Yellow
|
||||
Remove-Item "vlc-cache-gen.exe" -Force
|
||||
}
|
||||
Set-Location $PSScriptRoot
|
||||
}
|
||||
|
||||
if ( $MultimediaDir ) {
|
||||
Set-Location "$BuildDir\$MultimediaDir"
|
||||
|
||||
if ( $MultimediaDir ) {
|
||||
Set-Location "$BuildDir\$MultimediaDir"
|
||||
if ( $Sign ) {
|
||||
$SignFiles = Get-ChildItem *.exe, *.dll, plugins\*\*.dll `
|
||||
| Resolve-Path -Relative
|
||||
# Sign
|
||||
@ -57,23 +86,28 @@ if ( $Sign ) {
|
||||
Write-Host "signtool verify /pa /all $SignFiles" -ForegroundColor Yellow
|
||||
& signtool verify /pa /all $SignFiles
|
||||
if ( $LastExitCode -ne 0 ) { throw }
|
||||
|
||||
Set-Location $PSScriptRoot
|
||||
# VLC plugin cache
|
||||
Write-Host ".\vlc-cache-gen $PWD\plugins" -ForegroundColor Yellow
|
||||
& .\vlc-cache-gen "$PWD\plugins"
|
||||
if ( $LastExitCode -ne 0 ) { throw }
|
||||
}
|
||||
if ( Test-Path "vlc-cache-gen.exe" ) {
|
||||
Write-Host "Delete: vlc-cache-gen.exe" -ForegroundColor Yellow
|
||||
Remove-Item "vlc-cache-gen.exe" -Force
|
||||
}
|
||||
Set-Location $PSScriptRoot
|
||||
}
|
||||
|
||||
# Create archive
|
||||
|
||||
# Create archives
|
||||
$OutFile = "$Env:COMPANY_NAME-$DesktopDir-$Env:PRODUCT_VERSION.$Env:BUILD_NUMBER-$Suffix.zip"
|
||||
if ( !$ExcludeHelp ) {
|
||||
Write-Host "7z a -y $OutFile .\$BuildDir\$DesktopDir\* -xr!vlc-cache-gen.exe" -ForegroundColor Yellow
|
||||
& 7z a -y $OutFile .\$BuildDir\$DesktopDir\* -xr!"vlc-cache-gen.exe"
|
||||
} else {
|
||||
Write-Host "7z a -y $OutFile .\$BuildDir\$DesktopDir\* -xr!editors\web-apps\apps\*\main\resources\help -xr!vlc-cache-gen.exe" -ForegroundColor Yellow
|
||||
& 7z a -y $OutFile .\$BuildDir\$DesktopDir\* -xr!editors\web-apps\apps\*\main\resources\help -xr!"vlc-cache-gen.exe"
|
||||
}
|
||||
Write-Host "7z a -y $OutFile .\$BuildDir\$DesktopDir\*" -ForegroundColor Yellow
|
||||
& 7z a -y $OutFile .\$BuildDir\$DesktopDir\*
|
||||
if ( $LastExitCode -ne 0 ) { throw }
|
||||
|
||||
if ( !$ExcludeHelp ) {
|
||||
Write-Host "7z a -y $OutFile .\$BuildDir\$DesktopHelpDir\*" -ForegroundColor Yellow
|
||||
& 7z a -y $OutFile .\$BuildDir\$DesktopHelpDir\*
|
||||
if ( $LastExitCode -ne 0 ) { throw }
|
||||
}
|
||||
if ( $MultimediaDir ) {
|
||||
$OutFile = "$Env:COMPANY_NAME-$MultimediaDir-$Env:PRODUCT_VERSION.$Env:BUILD_NUMBER-$Suffix.zip"
|
||||
Write-Host "7z a -y $OutFile .\$BuildDir\$MultimediaDir\*" -ForegroundColor Yellow
|
||||
|
||||
Reference in New Issue
Block a user