Files
FoFreeXit/.github/workflows/build-windows.yml
T
adminandClaude Fable 5 e66252681c
Build Windows portable / build (push) Canceled after 0s
Sửa được text nằm trong Form XObject (file Canva/Illustrator) + CI chạy test
File Canva gói toàn bộ nội dung trang vào 1 Form XObject nên chế độ sửa
không thấy gì để sửa. Engine giờ liệt kê PHẲNG đệ quy vào form
(FPDFFormObj_CountObjects/GetObject qua pdfium-render), mỗi mục có path
[i,j,...] + tích ma trận form để quy toạ độ/cỡ chữ về trang; index của
ObjectInfo/EditOp = vị trí trong danh sách phẳng (trang không form thì
trùng index trang — tương thích ngược, UI không đổi cách gửi op).

- SetText in-place/substitute + ReflowText + Delete hoạt động với run trong
  form; xoá trong form = set_text chuỗi rỗng (FPDFFormObj_RemoveObject chưa
  mở ở wrapper cho pdfium_7543), object mới vẽ ở cấp trang với matrix đã
  compose.
- Đã xác minh trước: PDFium regenerate stream form khi con bị sửa
  (ProcessForm / HasDirtyStreams) — canary test round-trip kèm theo.
- ObjectInfo thêm nested/expanded; UI bỏ khung form phủ trang + chặn kéo
  run trong form (Transform chưa hỗ trợ).
- 4 test integration mới với fixture Form XObject tự dựng bằng lopdf
  (dev-dependency mới); CI thêm bước cargo test -p ff-engine trước build
  (máy dev không có Rust — CI là nơi duy nhất chạy test), cache thêm target/.
Chi tiết: docs/12-phase4-summary.md (Iteration 4).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 01:41:21 +07:00

85 lines
2.6 KiB
YAML

name: Build Windows portable
on:
workflow_dispatch: {}
push:
branches: [main]
paths:
- "app/**"
- "crates/**"
- "Cargo.lock"
- "scripts/fetch-pdfium.ps1"
- "scripts/fetch-qpdf.ps1"
- ".github/workflows/build-windows.yml"
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
app/src-tauri/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Fetch PDFium (Windows x64)
shell: pwsh
run: powershell -ExecutionPolicy Bypass -File scripts/fetch-pdfium.ps1
- name: Fetch QPDF (Windows x64)
shell: pwsh
run: powershell -ExecutionPolicy Bypass -File scripts/fetch-qpdf.ps1
# Máy dev không có Rust — CI là nơi duy nhất chạy test engine.
# Fail test = fail build, không publish bản hỏng.
- name: Run engine tests
run: cargo test -p ff-engine
- name: Build release
working-directory: app/src-tauri
run: cargo build --release
- name: Assemble portable folder
shell: pwsh
run: |
$dist = "dist/FoFreeXit"
New-Item -ItemType Directory -Force -Path $dist | Out-Null
Copy-Item "app/src-tauri/target/release/fofreexit-app.exe" "$dist/FoFreeXit.exe"
Copy-Item "pdfium.dll" "$dist/pdfium.dll"
Copy-Item "qpdf/bin/*.exe" "$dist/"
Copy-Item "qpdf/bin/*.dll" "$dist/"
Copy-Item "scripts/portable-readme.txt" "$dist/DOC-doc-truoc-khi-chay.txt"
Compress-Archive -Path "$dist/*" -DestinationPath "FoFreeXit-portable-win64.zip" -Force
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: FoFreeXit-portable-win64
path: FoFreeXit-portable-win64.zip
retention-days: 30
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: win-build-${{ github.run_number }}
name: "FoFreeXit Windows portable (build ${{ github.run_number }})"
body: |
Ban build Windows portable tu dong (khong can cai Rust/Visual Studio).
Giai nen `FoFreeXit-portable-win64.zip` roi chay `FoFreeXit.exe`.
Commit: ${{ github.sha }}
files: FoFreeXit-portable-win64.zip
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}