mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
PDF.R1: integrate shared reader with bounded nesting checks
This commit is contained in:
1 parent
a699a26221
commit
e01a65d8a9
44 files changed
+1695
-201
No files matched your search
+5
-1
@@ -47,9 +47,13 @@ warn() {
|
||||
# Copy licence and readme files that exist into a package directory.
|
||||
copy_docs() {
|
||||
local dest="$1" f
|
||||
for f in README.md LICENSE LICENSE-MIT LICENSE-APACHE COPYRIGHT; do
|
||||
for f in README.md LICENSE LICENSE-MIT LICENSE-APACHE COPYRIGHT NOTICE ASSETS.md; do
|
||||
if [ -f "$ROOT/$f" ]; then cp "$ROOT/$f" "$dest/"; fi
|
||||
done
|
||||
if [ -d "$ROOT/licenses" ]; then
|
||||
mkdir -p "$dest/licenses"
|
||||
cp -R "$ROOT/licenses/." "$dest/licenses/"
|
||||
fi
|
||||
copy_font_licences "$dest"
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ sed -e "s/@VERSION@/$VERSION/g" -e "s/@SHORT_VERSION@/$SHORT_VERSION/g" \
|
||||
plutil -lint "$APP/Contents/Info.plist"
|
||||
printf 'APPL????' >"$APP/Contents/PkgInfo"
|
||||
# The licences of the craft-fonts fonts embedded in the binary (release builds).
|
||||
copy_font_licences "$APP/Contents/Resources"
|
||||
copy_docs "$APP/Contents/Resources"
|
||||
|
||||
# Sign inside-out: nested code first, then the bundle itself (no --deep on the final signature).
|
||||
# Today the only nested code is the main executable; frameworks/helpers would be signed here too.
|
||||
|
||||
@@ -91,6 +91,23 @@ Copy-Item (Join-Path $Bin 'vectorcraft.exe'), (Join-Path $Bin 'vectorcraft-cli.e
|
||||
|
||||
& (Join-Path $PSScriptRoot 'sign.ps1') (Join-Path $Stage 'vectorcraft.exe') (Join-Path $Stage 'vectorcraft-cli.exe')
|
||||
|
||||
# Documentation and dependency licences shared by the MSI and portable ZIP.
|
||||
$Docs = Join-Path $Stage 'docs'
|
||||
New-Item -ItemType Directory -Force -Path $Docs | Out-Null
|
||||
foreach ($f in 'README.md', 'LICENSE', 'LICENSE-MIT', 'LICENSE-APACHE', 'NOTICE', 'ASSETS.md') {
|
||||
$p = Join-Path $Root $f
|
||||
if (Test-Path $p) { Copy-Item $p $Docs }
|
||||
}
|
||||
# Built with craft-fonts (CRAFT_FONTS_DIR, release builds): the embedded fonts' licences.
|
||||
if ($env:CRAFT_FONTS_DIR) {
|
||||
foreach ($ofl in Get-ChildItem -Path (Join-Path $env:CRAFT_FONTS_DIR 'fonts\*\OFL.txt') -ErrorAction SilentlyContinue) {
|
||||
Copy-Item $ofl.FullName (Join-Path $Docs "OFL-$($ofl.Directory.Name).txt")
|
||||
}
|
||||
}
|
||||
if (Test-Path (Join-Path $Root 'licenses')) {
|
||||
Copy-Item -Recurse (Join-Path $Root 'licenses') $Docs
|
||||
}
|
||||
|
||||
# ---- MSI ---------------------------------------------------------------------------------------
|
||||
# The setup wizard's art, drawn here from the app icon so the MSI shows VectorCraft rather than
|
||||
# WiX's stock bitmaps: a 493x58 banner across the top of the inner pages (the page title is drawn
|
||||
@@ -135,7 +152,7 @@ Invoke-Native 'wix build' {
|
||||
-ext WixToolset.UI.wixext -ext WixToolset.Util.wixext `
|
||||
-culture en-US -loc (Join-Path $PSScriptRoot 'vectorcraft.en-us.wxl') `
|
||||
-d "Version=$MsiVersion" -d "DisplayVersion=$Version" -d "BinDir=$Stage" -d "IconPath=$(Join-Path $Root 'assets\app-icon\vectorcraft.ico')" `
|
||||
-d "BannerBmp=$Banner" -d "DialogBmp=$Dialog" `
|
||||
-d "DocsDir=$Docs" -d "BannerBmp=$Banner" -d "DialogBmp=$Dialog" `
|
||||
-o $Msi
|
||||
}
|
||||
# wix writes its debug symbols (.wixpdb) next to the MSI; keep them out of the release assets.
|
||||
@@ -147,16 +164,7 @@ $Portable = Join-Path $TargetDir "windows-package\vectorcraft-$Version-windows-$
|
||||
Remove-Item -Recurse -Force $Portable -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Force -Path $Portable | Out-Null
|
||||
Copy-Item (Join-Path $Stage '*.exe') $Portable
|
||||
foreach ($f in 'README.md', 'LICENSE', 'LICENSE-MIT', 'LICENSE-APACHE') {
|
||||
$p = Join-Path $Root $f
|
||||
if (Test-Path $p) { Copy-Item $p $Portable }
|
||||
}
|
||||
# Built with craft-fonts (CRAFT_FONTS_DIR, release builds): the embedded fonts' licences.
|
||||
if ($env:CRAFT_FONTS_DIR) {
|
||||
foreach ($ofl in Get-ChildItem -Path (Join-Path $env:CRAFT_FONTS_DIR 'fonts\*\OFL.txt') -ErrorAction SilentlyContinue) {
|
||||
Copy-Item $ofl.FullName (Join-Path $Portable "OFL-$($ofl.Directory.Name).txt")
|
||||
}
|
||||
}
|
||||
Copy-Item -Recurse (Join-Path $Docs '*') $Portable
|
||||
$Zip = Join-Path $Dist "vectorcraft-$Version-windows-$Arch-portable.zip"
|
||||
Remove-Item -Force $Zip -ErrorAction SilentlyContinue
|
||||
Compress-Archive -Path $Portable -DestinationPath $Zip
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
<Feature Id="Main" Title="VectorCraft" Level="1">
|
||||
<ComponentGroupRef Id="VectorcraftFiles" />
|
||||
<ComponentGroupRef Id="PdfDocumentation" />
|
||||
<ComponentRef Id="DesktopShortcut" />
|
||||
</Feature>
|
||||
|
||||
@@ -108,6 +109,9 @@
|
||||
</Package>
|
||||
|
||||
<Fragment>
|
||||
<ComponentGroup Id="PdfDocumentation" Directory="INSTALLFOLDER">
|
||||
<Files Include="$(var.DocsDir)\**" />
|
||||
</ComponentGroup>
|
||||
<ComponentGroup Id="VectorcraftFiles" Directory="INSTALLFOLDER">
|
||||
<Component Id="VectorcraftApp" Guid="0E8C6C5E-DE4A-4E1D-9DB0-44E8E38C2103">
|
||||
<File Id="VectorcraftExe" Source="$(var.BinDir)\vectorcraft.exe" KeyPath="yes">
|
||||
|
||||
@@ -65,7 +65,8 @@ try {
|
||||
$Stage = Join-Path $TargetDir ('windows7-portable-' + [Guid]::NewGuid().ToString('N'))
|
||||
New-Item -ItemType Directory -Force $Stage | Out-Null
|
||||
Copy-Item (Join-Path $Bin 'vectorcraft.exe'), (Join-Path $Bin 'vectorcraft-cli.exe') $Stage
|
||||
Copy-Item LICENSE-MIT, LICENSE-APACHE, NOTICE $Stage
|
||||
Copy-Item LICENSE-MIT, LICENSE-APACHE, NOTICE, ASSETS.md $Stage
|
||||
Copy-Item -Recurse licenses $Stage
|
||||
Copy-Item vendor/windows-link/license-mit (Join-Path $Stage 'LICENSE-windows-link-MIT')
|
||||
Copy-Item vendor/windows-link/license-apache-2.0 (Join-Path $Stage 'LICENSE-windows-link-Apache-2.0')
|
||||
Copy-Item docs/windows7.md (Join-Path $Stage 'WINDOWS7.md')
|
||||
|
||||
Reference in new issue
Block a user