diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 2377d044a..8eb591f9a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -32,7 +32,7 @@ body: attributes: label: Filee version description: Settings → About - placeholder: "2.4.0" + placeholder: "2.5.0" validations: required: true - type: input diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..719d02826 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,188 @@ +# The Windows builds and tests of CI: x64 and ARM64. ci.yml calls this file as the `windows` job (like portable.yml), so +# GitHub shows both jobs under `windows`. Whether it runs at all is decided in ci.yml (the changes job). +name: Build + +on: + workflow_call: + inputs: + # False for a pull request into builtin-engines without the `full-ci` label (ci.yml, the changes job). + arm64: + type: boolean + default: true + +permissions: + contents: read + +jobs: + # Windows x64: format check, build, the Explorer menu DLL, all tests and the installer check. + build-x64: + name: build (win-x64) + runs-on: windows-latest + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-dotnet@v6 + with: + global-json-file: global.json + + - name: Restore + run: dotnet restore Filee.slnx + + - name: Check formatting + run: dotnet format Filee.slnx --verify-no-changes --no-restore --severity warn + + # The release embeds the Noto fonts, so the tests run with them here too: the headless UI tests load them. + - name: Fonts + shell: pwsh + run: ./build/fetch-fonts.ps1 + + - name: Build + run: dotnet build Filee.slnx --no-restore -c Release + + # Windows 11 Explorer menu (native DLL + unsigned sparse package); its tests load the DLL in-process. + # The toolchain (~100 MB) is saved right after it is downloaded, even if a later step fails, so it is + # downloaded once and not on every run. Release builds restore the same cache. + - name: Restore Zig toolchain + id: zig + uses: actions/cache/restore@v5 + with: + path: build/.cache/zig-x86_64-windows-0.16.0 + key: zig-0.16.0-x86_64-windows + + - name: Build Explorer menu extension + timeout-minutes: 30 + shell: pwsh + run: ./build/build-explorer-menu.ps1 + + - name: Save Zig toolchain + if: steps.zig.outputs.cache-hit != 'true' + uses: actions/cache/save@v5 + with: + path: build/.cache/zig-x86_64-windows-0.16.0 + key: zig-0.16.0-x86_64-windows + + # rhwp, Pandoc, 7-Zip, ExifTool and WeasyPrint are small; with them the HWP/HWPX, archive, metadata and WeasyPrint + # engine tests run too, WeasyPrint's against the pinned Windows build (LibreOffice is skipped to save time). + - name: Fetch rhwp, Pandoc, 7-Zip, ExifTool and WeasyPrint for engine tests + shell: pwsh + run: ./build/fetch-engines.ps1 -Only rhwp,pandoc,7zip,exiftool,weasyprint + + # The UI tests on their own first, as the release runs them (there they crashed with 0xC0000005): a crash + # names the test that was running and leaves a dump in TestResults. + - name: Test UI on its own + run: dotnet test tests/Filee.App.Tests --no-build -c Release --blame-crash --blame-hang-timeout 5m --logger "console;verbosity=normal" --results-directory TestResults/app + + # FILEE_TEST_EXIFTOOL: the metadata tests write real files, and fail rather than skip if it isn't there. + - name: Test + env: + FILEE_TEST_EXIFTOOL: ${{ github.workspace }}\engines\exiftool\exiftool.exe + run: dotnet test Filee.slnx --no-build -c Release --filter "FullyQualifiedName!~Filee.App.Tests" --logger "trx" --results-directory TestResults + + # Builds Setup (src/Filee.Setup) around a stub app and runs it in a sandbox: install, update and uninstall into a + # scratch folder with a registry file of its own, without administrator rights. + - name: Check the installer + shell: pwsh + run: ./build/build-installer.ps1 -CheckOnly + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v7 + with: + name: test-results-windows + path: TestResults/ + if-no-files-found: ignore + + - name: Upload UI screenshots + if: always() + uses: actions/upload-artifact@v7 + with: + name: ui-screenshots + path: | + tests/Filee.App.Tests/bin/Release/net10.0/screenshots/ + tests/Filee.Setup.Tests/bin/Release/net10.0/screenshots/ + if-no-files-found: ignore + + # Windows on ARM64 (#236), built and tested natively: the Explorer menu DLL, Setup and rhwp are ARM64 builds (7-Zip + # too, for the archive tests; the app downloads the x64 one), the downloaded engines (Pandoc here) x64 ones under + # emulation. rhwp comes from a pinned build of + # .github/workflows/windows-arm64-native.yml (build/fetch-engines.ps1). Until it is pinned, its tests skip and no + # package is built; once it is, the job also builds the win-arm64 Setup and portable zip to try out. + build-arm64: + name: build (win-arm64) + if: ${{ inputs.arm64 }} + runs-on: windows-11-arm + timeout-minutes: 120 + defaults: + run: + shell: pwsh + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-dotnet@v6 + with: + global-json-file: global.json + + - name: ARM64 pins + id: pins + run: | + $missing = @(./build/fetch-engines.ps1 -Runtime win-arm64 -MissingPins) + if ($missing) { + Write-Host "::warning::Not pinned yet for win-arm64: $($missing -join ', '). Their tests skip and no package is built (build/fetch-engines.ps1)." + } + "ready=$(([string](-not $missing)).ToLowerInvariant())" >> $env:GITHUB_OUTPUT + + - name: Restore + run: dotnet restore Filee.slnx + + - name: Fonts + run: ./build/fetch-fonts.ps1 + + # The pinned rhwp build when there is one, as for the package. + - name: Fetch engines for engine tests + run: | + $only = @('pandoc', '7zip') + if ('${{ steps.pins.outputs.ready }}' -eq 'true') { $only += @('rhwp') } + ./build/fetch-engines.ps1 -Runtime win-arm64 -Only $only + + - name: Build + run: dotnet build Filee.slnx --no-restore -c Release + + # The x64 Zig toolchain the build (win-x64) job saves; it cross-compiles the ARM64 DLL under x64 emulation. + - name: Restore Zig toolchain + uses: actions/cache/restore@v5 + with: + path: build/.cache/zig-x86_64-windows-0.16.0 + key: zig-0.16.0-x86_64-windows + + - name: Build Explorer menu extension + timeout-minutes: 30 + run: ./build/build-explorer-menu.ps1 -Architecture arm64 + + - name: Test UI on its own + run: dotnet test tests/Filee.App.Tests --no-build -c Release --blame-crash --blame-hang-timeout 5m --logger "console;verbosity=normal" --results-directory TestResults/app + + - name: Test + run: dotnet test Filee.slnx --no-build -c Release --filter "FullyQualifiedName!~Filee.App.Tests" --logger "trx" --results-directory TestResults + + - name: Check the installer + run: ./build/build-installer.ps1 -CheckOnly -Runtime win-arm64 + + - name: Build package + if: steps.pins.outputs.ready == 'true' + run: ./build/build-installer.ps1 -Runtime win-arm64 -Portable + + - name: Upload package + if: steps.pins.outputs.ready == 'true' + uses: actions/upload-artifact@v7 + with: + name: windows-arm64-package + path: Releases/*-win-arm64-* + if-no-files-found: error + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v7 + with: + name: test-results-windows-arm64 + path: TestResults/ + if-no-files-found: ignore \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5864e0104..c8c3847a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,8 +20,8 @@ concurrency: cancel-in-progress: true jobs: - # Decides what the change needs. The workflow always runs, so the required build check always reports: a job - # skipped by its condition counts as passed for the branch rules. + # Decides what the change needs. The workflow always runs, so the required `build` check (the gate job below) + # always reports: a job skipped by its condition counts as passed for the branch rules. # - code: anything besides documentation and repository metadata. When the file list can't be read, everything runs. # - macos: the macOS packages and tests. macOS runners are few and queue, so a pull request runs them only when it # touches macOS files, code that branches on macOS, the projects, packages or build scripts, or carries the @@ -64,7 +64,7 @@ jobs: while read -r id sha; do [ -z "$id" ] && continue built=$(gh api "repos/$REPO/actions/runs/$id/jobs" \ - --jq '[.jobs[] | select(.name == "build" and .conclusion == "success")] | length') || built=0 + --jq '[.jobs[] | select(.name == "windows / build (win-x64)" and .conclusion == "success")] | length') || built=0 if [ "$built" != 0 ]; then base=$sha; break; fi done <<< "$runs" if [ -z "$base" ]; then everything "No earlier main run that built"; fi @@ -124,95 +124,32 @@ jobs: with: macos: ${{ needs.changes.outputs.macos != 'false' }} - build: + # Both Windows builds (x64 and ARM64) are in build.yml, so they show up under this one job. ARM64 is left out of + # pull requests into builtin-engines unless they carry `full-ci` (see `full` above). + windows: needs: changes if: ${{ !cancelled() && needs.changes.outputs.code != 'false' }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v7 - - - uses: actions/setup-dotnet@v6 - with: - global-json-file: global.json - - - name: Restore - run: dotnet restore Filee.slnx - - - name: Check formatting - run: dotnet format Filee.slnx --verify-no-changes --no-restore --severity warn - - # The release embeds the Noto fonts, so the tests run with them here too: the headless UI tests load them. - - name: Fonts - shell: pwsh - run: ./build/fetch-fonts.ps1 - - - name: Build - run: dotnet build Filee.slnx --no-restore -c Release - - # Windows 11 Explorer menu (native DLL + unsigned sparse package); its tests load the DLL in-process. - # The toolchain (~100 MB) is saved right after it is downloaded, even if a later step fails, so it is - # downloaded once and not on every run. Release builds restore the same cache. - - name: Restore Zig toolchain - id: zig - uses: actions/cache/restore@v5 - with: - path: build/.cache/zig-x86_64-windows-0.16.0 - key: zig-0.16.0-x86_64-windows - - - name: Build Explorer menu extension - timeout-minutes: 30 - shell: pwsh - run: ./build/build-explorer-menu.ps1 - - - name: Save Zig toolchain - if: steps.zig.outputs.cache-hit != 'true' - uses: actions/cache/save@v5 - with: - path: build/.cache/zig-x86_64-windows-0.16.0 - key: zig-0.16.0-x86_64-windows - - # rhwp, Pandoc, 7-Zip, ExifTool and WeasyPrint are small; with them the HWP/HWPX, archive, metadata and WeasyPrint - # engine tests run too, WeasyPrint's against the pinned Windows build (LibreOffice is skipped to save time). - - name: Fetch rhwp, Pandoc, 7-Zip, ExifTool and WeasyPrint for engine tests - shell: pwsh - run: ./build/fetch-engines.ps1 -Only rhwp,pandoc,7zip,exiftool,weasyprint - - # The UI tests on their own first, as the release runs them (there they crashed with 0xC0000005): a crash - # names the test that was running and leaves a dump in TestResults. - - name: Test UI on its own - run: dotnet test tests/Filee.App.Tests --no-build -c Release --blame-crash --blame-hang-timeout 5m --logger "console;verbosity=normal" --results-directory TestResults/app - - # FILEE_TEST_EXIFTOOL: the metadata tests write real files, and fail rather than skip if it isn't there. - - name: Test - env: - FILEE_TEST_EXIFTOOL: ${{ github.workspace }}\engines\exiftool\exiftool.exe - run: dotnet test Filee.slnx --no-build -c Release --filter "FullyQualifiedName!~Filee.App.Tests" --logger "trx" --results-directory TestResults - - # Builds Setup (src/Filee.Setup) around a stub app and runs it in a sandbox: install, update and uninstall into a - # scratch folder with a registry file of its own, without administrator rights. - - name: Check the installer - shell: pwsh - run: ./build/build-installer.ps1 -CheckOnly - - - name: Upload test results - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-results-windows - path: TestResults/ - if-no-files-found: ignore + uses: ./.github/workflows/build.yml + with: + arm64: ${{ needs.changes.outputs.full != 'false' }} - - name: Upload UI screenshots - if: always() - uses: actions/upload-artifact@v7 - with: - name: ui-screenshots - path: | - tests/Filee.App.Tests/bin/Release/net10.0/screenshots/ - tests/Filee.Setup.Tests/bin/Release/net10.0/screenshots/ - if-no-files-found: ignore + # The required check. It always runs, so a docs-only change (windows skipped) passes and a failed or + # cancelled Windows build fails it. + build: + needs: [changes, windows] + if: ${{ !cancelled() }} + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Windows builds passed or were not needed + run: | + case "${{ needs.windows.result }}" in + success|skipped) ;; + *) echo "Windows builds: ${{ needs.windows.result }}"; exit 1 ;; + esac - # The metadata writer on Linux, with the Perl ExifTool pinned in engines.json (the build above is its Windows side). + # The metadata writer on Linux, with the Perl ExifTool pinned in engines.json (the Windows builds above are its Windows side), + # and the exact seeks of the video tools with Ubuntu's FFmpeg (no other job has FFmpeg, so they skip there). metadata-linux: name: metadata (linux-x64) needs: changes @@ -246,88 +183,26 @@ jobs: - name: Test run: dotnet test tests/Filee.Engines.Tests -c Release --filter "FullyQualifiedName~MetadataTests" - # Windows on ARM64 (#236), built and tested natively: the Explorer menu DLL, Setup and rhwp are ARM64 builds (7-Zip - # too, for the archive tests; the app downloads the x64 one), the downloaded engines (Pandoc here) x64 ones under - # emulation. rhwp comes from a pinned build of - # .github/workflows/windows-arm64-native.yml (build/fetch-engines.ps1). Until it is pinned, its tests skip and no - # package is built; once it is, the job also builds the win-arm64 Setup and portable zip to try out. - build-arm64: - name: build (win-arm64) - needs: changes - if: ${{ !cancelled() && needs.changes.outputs.code != 'false' && needs.changes.outputs.full != 'false' }} - runs-on: windows-11-arm - timeout-minutes: 120 - defaults: - run: - shell: pwsh - steps: - - uses: actions/checkout@v7 - - - uses: actions/setup-dotnet@v6 - with: - global-json-file: global.json - - - name: ARM64 pins - id: pins - run: | - $missing = @(./build/fetch-engines.ps1 -Runtime win-arm64 -MissingPins) - if ($missing) { - Write-Host "::warning::Not pinned yet for win-arm64: $($missing -join ', '). Their tests skip and no package is built (build/fetch-engines.ps1)." - } - "ready=$(([string](-not $missing)).ToLowerInvariant())" >> $env:GITHUB_OUTPUT - - - name: Restore - run: dotnet restore Filee.slnx - - - name: Fonts - run: ./build/fetch-fonts.ps1 + # Exact seeks (#1205): every frame of numbered MP4, MPEG-TS, MPEG-PS and open-GOP HEVC videos, and clips, playback + # and Live Photos from MPEG-TS. FILEE_TEST_FFMPEG=required makes a missing FFmpeg fail them instead of skipping. + - name: Test exact seeks + env: + FILEE_TEST_FFMPEG: required + run: dotnet test tests/Filee.Engines.Tests -c Release --no-build --filter "FullyQualifiedName~ExactSeekTests" - # The pinned rhwp build when there is one, as for the package. - - name: Fetch engines for engine tests + # Again with the FFmpeg Filee installs (engines.json), which it finds in engines/ before the system's: FFmpeg's + # seeking and timing differ between versions, and Ubuntu's is 6.1. FILEE_TEST_FFMPEG_FOLDER fails the tests if + # they find another FFmpeg. + - name: Test exact seeks with Filee's FFmpeg + env: + FILEE_TEST_FFMPEG: required + FILEE_TEST_FFMPEG_FOLDER: ${{ github.workspace }}/engines/ffmpeg run: | - $only = @('pandoc', '7zip') - if ('${{ steps.pins.outputs.ready }}' -eq 'true') { $only += @('rhwp') } - ./build/fetch-engines.ps1 -Runtime win-arm64 -Only $only - - - name: Build - run: dotnet build Filee.slnx --no-restore -c Release - - # The x64 Zig toolchain the build job saves; it cross-compiles the ARM64 DLL under x64 emulation. - - name: Restore Zig toolchain - uses: actions/cache/restore@v5 - with: - path: build/.cache/zig-x86_64-windows-0.16.0 - key: zig-0.16.0-x86_64-windows - - - name: Build Explorer menu extension - timeout-minutes: 30 - run: ./build/build-explorer-menu.ps1 -Architecture arm64 - - - name: Test UI on its own - run: dotnet test tests/Filee.App.Tests --no-build -c Release --blame-crash --blame-hang-timeout 5m --logger "console;verbosity=normal" --results-directory TestResults/app - - - name: Test - run: dotnet test Filee.slnx --no-build -c Release --filter "FullyQualifiedName!~Filee.App.Tests" --logger "trx" --results-directory TestResults - - - name: Check the installer - run: ./build/build-installer.ps1 -CheckOnly -Runtime win-arm64 - - - name: Build package - if: steps.pins.outputs.ready == 'true' - run: ./build/build-installer.ps1 -Runtime win-arm64 -Portable - - - name: Upload package - if: steps.pins.outputs.ready == 'true' - uses: actions/upload-artifact@v7 - with: - name: windows-arm64-package - path: Releases/*-win-arm64-* - if-no-files-found: error - - - name: Upload test results - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-results-windows-arm64 - path: TestResults/ - if-no-files-found: ignore + set -euo pipefail + read -r url sha256 < <(jq -r '.platforms."linux-x64".components.ffmpeg | "\(.url) \(.sha256)"' src/Filee.Engines/Infrastructure/engines.json) + curl -fsSL --retry 3 -o "$RUNNER_TEMP/ffmpeg.tar.xz" "$url" + echo "$sha256 $RUNNER_TEMP/ffmpeg.tar.xz" | sha256sum --check + mkdir -p engines/ffmpeg + tar -xJf "$RUNNER_TEMP/ffmpeg.tar.xz" -C engines/ffmpeg --strip-components=1 + engines/ffmpeg/bin/ffmpeg -hide_banner -version | sed -n 1p + dotnet test tests/Filee.Engines.Tests -c Release --no-build --filter "FullyQualifiedName~ExactSeekTests" diff --git a/.github/workflows/portable.yml b/.github/workflows/portable.yml index a71284f09..713ac57d9 100644 --- a/.github/workflows/portable.yml +++ b/.github/workflows/portable.yml @@ -199,7 +199,7 @@ jobs: run: | dotnet test tests/Filee.Engines.Tests/Filee.Engines.Tests.csproj --no-build -c Release --logger trx ` --results-directory TestResults/linux-x64-without-7zip ` - --filter 'FullyQualifiedName~Filee.Engines.Tests.Archive|FullyQualifiedName~SevenZip|FullyQualifiedName~DiskImage|FullyQualifiedName~LzmaTests|FullyQualifiedName~Bzip2Writer|FullyQualifiedName~FolderArchives|FullyQualifiedName~FolderIso|FullyQualifiedName~GamePack' + --filter 'FullyQualifiedName~Filee.Engines.Tests.Archive|FullyQualifiedName~SevenZip|FullyQualifiedName~DiskImage|FullyQualifiedName~LzmaTests|FullyQualifiedName~Bzip2Writer|FullyQualifiedName~FolderArchives|FullyQualifiedName~FolderIso|FullyQualifiedName~GamePack|FullyQualifiedName~GmaTests|FullyQualifiedName~GmaPackTests|FullyQualifiedName~VpkTests|FullyQualifiedName~BspTests' if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # Linux: rhwp from linux-native instead of the download (see the top). diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7455baff3..ab7ae924b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,10 +2,14 @@ # Trigger: push a tag like v1.0.0 (git tag v1.0.0 && git push origin v1.0.0) # # Output (build/build-installer.ps1): Filee--win-Setup.exe (Filee's own installer, src/Filee.Setup), -# Filee--win-Portable.zip and Filee--SHA256SUMS.txt. +# Filee--win-Portable.zip and Filee--SHA256SUMS.txt for x64, and for Windows on ARM64 (#236), built +# and tested on an ARM64 runner, Filee--win-arm64-Setup.exe and -win-arm64-Portable.zip. Their hashes go into +# the same Filee--SHA256SUMS.txt (sign-release.ps1): Filee 2.4.0 and older take the last Windows-looking +# SHA256SUMS file of a release, so a separate ARM64 one would break their updates. # The release is a draft with the Linux and macOS packages: the Windows files are signed on a PC signed in to Certum's -# SimplySign cloud (its key needs a phone token), so this run keeps the tested, unsigned build as the artifact -# windows-unsigned, and build/sign-release.ps1 signs it, packs Setup again, uploads the Windows files and publishes. +# SimplySign cloud (its key needs a phone token), so this run keeps the tested, unsigned builds as the artifacts +# windows-unsigned and windows-arm64-unsigned, and build/sign-release.ps1 signs them, packs both Setups again, uploads +# the Windows files and publishes. The draft waits for both Windows builds, so a release never lacks one of them. # The SHA256SUMS files are signed there too, with the update key that never leaves that PC: it uploads a .sig next to # every SHA256SUMS file of the release (the Linux and macOS ones drafted here as well), and official builds refuse an # update without one. @@ -109,6 +113,103 @@ jobs: if-no-files-found: error retention-days: 30 + # Windows on ARM64, built and tested natively like CI's build (win-arm64) job: the app, Setup, the Explorer menu DLL + # and rhwp are ARM64 builds (rhwp from the pin in build/fetch-engines.ps1; 7-Zip too, for the archive tests). + windows-arm64: + needs: portable + runs-on: windows-11-arm + timeout-minutes: 120 + defaults: + run: + shell: pwsh + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-dotnet@v6 + with: + global-json-file: global.json + + - name: Version from tag + id: version + run: | + $version = '${{ github.ref_name }}'.TrimStart('v') + "value=$version" >> $env:GITHUB_OUTPUT + + # CI builds without them (and skips their tests); a release doesn't. + - name: ARM64 pins + run: | + $missing = @(./build/fetch-engines.ps1 -Runtime win-arm64 -MissingPins) + if ($missing) { throw "Not pinned for win-arm64: $($missing -join ', ') (build/fetch-engines.ps1)." } + + - name: Fonts + run: ./build/fetch-fonts.ps1 + + - name: Fetch engines for engine tests + run: ./build/fetch-engines.ps1 -Runtime win-arm64 -Only pandoc,7zip,rhwp + + - name: Build + run: dotnet build Filee.slnx -c Release + + # The x64 Zig toolchain CI's build job saves; it cross-compiles the ARM64 DLL under x64 emulation. + - name: Restore Zig toolchain + uses: actions/cache/restore@v5 + with: + path: build/.cache/zig-x86_64-windows-0.16.0 + key: zig-0.16.0-x86_64-windows + + - name: Build Explorer menu extension + timeout-minutes: 30 + run: ./build/build-explorer-menu.ps1 -Architecture arm64 -Version ${{ steps.version.outputs.value }} + + - name: Test UI on its own + run: dotnet test tests/Filee.App.Tests --no-build -c Release --blame-crash --blame-hang-timeout 5m --logger "console;verbosity=normal" --results-directory TestResults/app + + - name: Test + run: dotnet test Filee.slnx --no-build -c Release --filter "FullyQualifiedName!~Filee.App.Tests" --logger "trx" --results-directory TestResults + + # Setup around a stub app, installed, updated and uninstalled in a sandbox: the PC that signs the release is + # x64 and can't run the ARM64 Setup. + - name: Check the installer + run: ./build/build-installer.ps1 -CheckOnly -Runtime win-arm64 + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v7 + with: + name: test-results-windows-arm64 + path: TestResults/ + if-no-files-found: ignore + + - name: Build installer and portable zip + run: ./build/build-installer.ps1 -Version ${{ steps.version.outputs.value }} -Runtime win-arm64 -Portable + + # Laid out like windows-unsigned, for build/sign-release.ps1. + - name: Keep the unsigned Windows ARM64 build + run: | + New-Item -ItemType Directory -Force -Path unsigned | Out-Null + Move-Item publish/win-arm64 unsigned/app + Copy-Item build/.cache/setup/Filee.Setup.exe unsigned/ + + - uses: actions/upload-artifact@v7 + with: + name: windows-arm64-unsigned + path: unsigned/ + if-no-files-found: error + retention-days: 30 + + draft: + needs: [portable, windows, windows-arm64] + runs-on: windows-latest + steps: + - uses: actions/checkout@v7 + + - name: Version from tag + id: version + shell: pwsh + run: | + $version = '${{ github.ref_name }}'.TrimStart('v') + "value=$version" >> $env:GITHUB_OUTPUT + - name: Download Linux and macOS packages uses: actions/download-artifact@v8 with: @@ -122,8 +223,10 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | $version = '${{ steps.version.outputs.value }}' - # Linux and macOS only: build/sign-release.ps1 adds the signed Windows files. - $windows = "Filee-$version-win-Setup.exe", "Filee-$version-win-Portable.zip", "Filee-$version-SHA256SUMS.txt" + # Linux and macOS only: build/sign-release.ps1 adds the signed Windows files. The ARM64 build's own sums file + # never ships (its hashes go into Filee--SHA256SUMS.txt). + $windows = "Filee-$version-win-Setup.exe", "Filee-$version-win-Portable.zip", "Filee-$version-SHA256SUMS.txt", + "Filee-$version-win-arm64-Setup.exe", "Filee-$version-win-arm64-Portable.zip", "Filee-$version-win-arm64-SHA256SUMS.txt" $files = Get-ChildItem Releases -File -Filter "Filee-$version-*" | Where-Object Name -notin $windows | ForEach-Object FullName # "## 1.4.0" up to the next "## " heading of CHANGELOG.md, without the heading itself. $changes = '' diff --git a/CHANGELOG.md b/CHANGELOG.md index b14eaa8a7..14ef139d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,166 @@ change, a language may repeat; a language without lines shows the English ones): - `recommended`: bug fixes. The card shows once per version. - `optional`: new features only. No card, the sidebar button only. +## Unreleased + +Rename this heading to the version number when you release it. + + + +- **Updating from Settings → About works when GitHub's downloads don't answer** (#1593). The in-app update on Windows + gave up when GitHub's download link didn't answer within 20 seconds, which some networks hit every time. Filee now + takes the same file from its own download server (`dl.filee.sh`) instead, and the rest of that update goes there + first. Every file is still checked as before: the signed checksum list, the installer's checksum and its publisher, + so the server can only hand out the real installer. The log says where each file came from. + It helps from the update after this version on: on such a network, this version itself still comes from + [filee.sh](https://filee.sh/). + +## 2.5.0 + + + +### Security + +Fixes for three advisories: [GHSA-x2fp-2ch7-5fvx](https://github.com/KnifeLemon/Filee/security/advisories/GHSA-x2fp-2ch7-5fvx) and [GHSA-vq2m-qq38-mxx3](https://github.com/KnifeLemon/Filee/security/advisories/GHSA-vq2m-qq38-mxx3) (reported by @1ceS1amese, thank you), and [GHSA-vcp3-99h4-v3wx](https://github.com/KnifeLemon/Filee/security/advisories/GHSA-vcp3-99h4-v3wx) (found in our own review). Please update. + +- **Setup and uninstall with admin rights:** when Setup or the uninstaller removes folders in your user profile, it no longer follows links or junctions placed there, so it can't be made to delete files elsewhere. The uninstaller now asks for admin rights before copying itself, and runs that copy only from a folder ordinary programs can't write to. The graphics libraries Setup loads are unpacked to a fresh folder each run and loaded by their full path. +- **Files built to use up memory, disk or time:** spreadsheets, HWPX documents, MOBI e-books, deeply nested archives, re-zipped office files and PDF page contents that expand to far too much are now refused with a clear message instead of slowing Filee down or ending it. Pictures are read only by the image formats Filee needs. + +### Preset gallery + +- **Presets other people made, ready to install** (#1530): **Settings → Presets → Preset gallery** shows presets shared on [filee.sh/presets](https://filee.sh/presets), each with pictures of what it does. Sort them by Hot, Best (today, this week, … all time) or New, and filter by kind, format and tag. Presets written in your language come first, and *Only in my language* hides the rest. +- **Installing only adds.** A preset from the gallery comes in as a new preset next to yours and never replaces one. A shared donut opens only for files none of your donuts takes. Filee contacts filee.sh only while the gallery window is open. +- **Warnings before you install:** a preset that replaces your originals, moves them or sends them to the Trash, overwrites files, writes or removes metadata, copies into a folder or needs a particular translation model says so first. One that replaces, moves or trashes your originals waits until you tick that you understand. +- **Share your own:** **Export for the gallery…** on the same page checks the presets you tick the way the gallery checks them and saves a `preset.json`. Send it with 1 to 4 pictures through the submission form it opens. Passwords, folders, your own pictures and sounds, and names or places written into metadata are never part of a shared preset. Everything in the gallery is CC0: free to use, change and share, and the gallery still shows who shared it. + +### Windows on ARM + +- **Native ARM64 downloads** (#236): the release page now has `Filee-2.5.0-win-arm64-Setup.exe` and `Filee-2.5.0-win-arm64-Portable.zip` next to the x64 files. They run natively on Snapdragon and other ARM PCs instead of under x64 emulation. An ARM64 install updates itself with the ARM64 Setup. An x64 install on an ARM PC stays x64: install the ARM64 Setup once to switch. + +### New tools and features + +- **Move the original to the Trash** (preset editor, output card; by @adnan-bhaldar, #1387): after a conversion to another format is complete, the original goes to the Recycle Bin / Trash, where you can restore it. It's off by default and never deletes for good. If the Trash refuses (a network drive, a file in use), the original stays and the result says so. +- **Choose the compression each time** (by @Ugoyo, #1353): the four Compress tools can ask for the level when you drop files, with the size the files will roughly come to ("About 30.0 MB (70% smaller)"). It's on for them in new installs; elsewhere turn on *Ask every time* under the setting in the preset editor. +- **PDF/A (archival)** (#1367): a new preset in the palette makes a PDF/A-2b of a PDF, or of anything Filee turns into PDF. The PDF/A box of a preset now works on every route, not only when LibreOffice writes the PDF. It needs Ghostscript; without it the result says the PDF isn't PDF/A. Links and markup that only lack the print flag are kept (by @SeoJCalive). +- **Split PDFs and videos into parts** (#1259): *Choose pages* and the PDF card have *Several pages per file*, every N pages or N equal parts. A video can be saved as *Several parts*, every N seconds or minutes or N equal parts, by stream copy, so it takes seconds and nothing is re-encoded (a part ends at a key frame). The command line has `--split-every` and `--split-parts`. +- **Merge PDF:** *Use one paper size for all merged pages* fits every page to A4, Letter, A3 or the first page's size, centred and still vector (by @SeoJCalive). *Add a bookmark per source file* puts each file's bookmarks under its name (by @SeoJCalive). **Merge PDF** is back on the images donut's front, next to PDF, for new installs and *Reset to default* (#1413). +- **PDF to XLSX on the PDF donut** (#1187, #1343): new installs and *Reset to default* get **XLSX** next to DOCX. Existing libraries can drag the XLSX chip onto the PDF donut in *Settings → Donut toolbar*. +- **Edit PDF pages** (#860): select several pages with Ctrl or Shift, drag them, *Insert PDF* before or after the selection and *Replace with PDF*. +- **Word and web page tables to XLSX, ODS and CSV:** each table of a DOCX, HTML or MHTML file becomes its own sheet, with merged cells, borders and real numbers and dates (part of #1016). +- **Spreadsheet Print Studio:** *One PDF per sheet* writes a PDF for each sheet instead of one combined file (#1249). +- **Cut a clip on sounds** (by @adnan-bhaldar, #1291): MP3, WAV, FLAC, M4A and other sound files open in Cut a clip with their waveform, with pieces, volume, speed, fades and music as for video. +- **iPhone ringtones** (by @adnan-bhaldar, #1291): an **iPhone ringtone** preset in the palette makes an M4R of at most 40 seconds, and it opens Cut a clip to choose the part. +- **Music in Merge videos** (#1402): drop songs with the videos, or use *Add music…* in the merge order window. They play one after another under the videos, and *Loop music* repeats them until the video ends. +- **Subtitles stay in converted videos** (#789): embedded subtitle tracks come along into MKV, MP4, MOV and WebM, with their language tags. Picture subtitles (Blu-ray, DVD) that MP4, MOV or WebM can't hold are left out with a note. +- **Picture sizes** (#1270): *Never enlarge* makes width × height a maximum box, one side can be left empty with *Keep aspect ratio*, and *Keep the size, lower only the quality* fits a size limit without scaling the picture down. +- **Folders zip again** (by @Feraris20, #1345): the folders donut offers ZIP and One ZIP next to ISO again, and the folder preset editor 7Z and the TAR formats. A folders donut you changed is left as it is. +- **UDF 2.01 for ISO images** (by @Feraris20, #1443): a choice next to Joliet in the ISO preset and `--iso-filesystem udf201`, for long names and files over 4 GB. +- **Portable mode** (by @Feraris20, #1196): the portable ZIP, and a copy made with Setup's `/PORTABLE=1`, keep settings, presets, history, engines and logs in a `data` folder next to Filee. On its first start it offers to copy your existing data and leaves the original alone. +- **Proxy for Filee's downloads** (*Settings → General → Network*, #879): engine downloads, update checks, OCR languages and links dragged from a browser go through it, and other programs keep their own connection. `http`, `https`, `socks4` and `socks5` work, with a user name and password if needed. +- **Engines without internet** (#447): every engine card Filee can download has *Offline*, with *Install from downloaded files…*, *Save the files for another computer…* and *Copy download links*, and the command line has `filee engines download` and `filee engines install --from`. +- **Engines page** (by @lightscape-jm, #867, and @adnan-bhaldar): every working engine is **Ready**, with a line saying which copy Filee uses and where, and status pills and dots have colours. +- **WeasyPrint** (Windows; by @Ugoyo, #1403): an optional engine in *Settings → Engines* that prints HTML, Markdown and e-mails to PDF as a browser does. It loads only pictures beside the document. +- **Filee Connect** (by @rohitLovesKrishna): send text and files between Filee and a phone on the same Wi-Fi, through a QR code or a PIN, with nothing going through the internet. New installs open it with Ctrl + Alt + click where there is no file (Option + Shift + click on macOS); others add the gesture *Modifier + mouse click (Filee Connect)* in *Settings → Shortcuts*. +- **Donut labels** (by @lightscape-jm, #870, #871, #872): names stay inside their slice and are shortened with "…" rather than run over. Slices can show icons (*Show*: Auto, Icon & text, Text only, Icon only), a group's ring grows with the donut, and its names follow the curve. +- **Donut toolbar editor** (by @lightscape-jm, #873): *Edit Donut Size* shows the real donut on screen while you move the sliders, the sliders no longer stick, and groups open like folders. +- **A gesture per face** (#195): each gesture in *Settings → Shortcuts* can open the donut on its front or its back (*Opens on*), for example Ctrl + drag for the front and Ctrl + Shift + drag for the back. +- **Use the system font** (*Settings → Theme*, #1065): draw Filee in Segoe UI, San Francisco or your Linux desktop's font. +- **Translate:** Ukrainian, Persian, Vietnamese and Bengali are target languages (#1344). +- **Save button feedback** (*Settings → Presets*; by @Feraris20, #1505): a green tick after saving or a red cross when it fails, with the reason beside it. +- **Notifications** (by @Feraris20): error messages can be selected, scrolled and copied with a Copy button. Notifications that don't fit wait their turn with an "N more" count. +- **Extraction presets** (by @SeoJCalive, #1091): the donut centre and the Available presets tooltip say when a preset will only do an ordinary conversion for these files. +- **New language:** Монгол (Mongolian, by @xGARIDx), in the app and in Setup. +- **macOS:** the menu bar icon is one colour that follows the menu bar, like the system icons; *Show the menu bar icon in colour* brings the old one back (#724). The disk image window shows where to drag Filee (by @SeoJCalive). +- **Linux:** a [Yazi](https://github.com/sxyazi/yazi) plugin in `installer/linux/yazi` converts from the terminal file manager (by @manish0467). INSTALL.txt lists the Arch Linux packages (by @manish0467). +- **xplorer²** counts as a file manager for gestures (#1424). + +### New formats + +- **Valve textures (VTF)** (by @ltsammy, #1478): read and write the textures of Source engine games (Garry's Mod, Counter-Strike: Source, Team Fortress 2), so a PNG becomes a texture with a drag. +- **Gerber PCB layers** (by @Ugoyo): copper, mask, silkscreen and outline layers become SVG, vector PDF, pictures and DXF/DWG at their real size. +- **JSON Canvas** (Obsidian `.canvas`; by @Ugoyo): boards become SVG, PDF and pictures in Obsidian's look, and Markdown of their text. +- **G-code** (`.gcode`, `.gco`, `.ngc`; by @Ugoyo): the toolpath of a 3D print or CNC job from above or isometric, or the slicer's preview picture. +- **GIMP `.xcf` and Paint.NET `.pdn`** (by @Ugoyo): read and written by Filee itself, merged as GIMP and Paint.NET show them, with layers kept between XCF, PDN and PSD. +- **Windows animated cursors (`.ani`)** (by @Ugoyo, #1365) become animated GIF, APNG or WebP, or their first frame. +- **Security camera recordings** (by @Ugoyo): Wisenet WAVE / Nx Witness exports (`.nov`; password-protected ones are refused with a clear message) and Hikvision SD-card recordings with mu-law sound. +- **KuGou lyrics (`.krc`)** (by @cre8ive-marketing, #1296) convert to LRC, SRT and the other subtitle formats. +- **Packages read like ZIP:** NuGet (`.nupkg`, `.snupkg`), Android split APKs (`.apks`, `.xapk`, `.apkm`) and App Bundles (`.aab`) (#1464, #1465), and Adobe extensions (`.zxp`, #1382). They extract or convert to other archives. +- **Tracker music** (`.xm`, `.it`, `.s3m`, #1376) converts to every audio format through FFmpeg. +- **OpenStreetMap XML (`.osm`, #713)** becomes KML, KMZ, Shapefile, GeoJSON, GPX and CSV, with areas and multipolygons. +- **Program icons** (#1188): a Windows `.exe` or `.dll` converts to its icon (ICO with every size, or PNG and the other pictures). Programs are only read, never run. +- **Arduino and Processing sketches (`.ino`, `.pde`)** (by @Ugoyo) convert like text. +- **Other names:** `.quicktime` opens as MOV (#1283), `.mpg4` as MP4 (#1397), and Insta360 `.insp` photos as JPEG (#711). + +### Word, HWPX, PowerPoint and PDF + +- **HWPX to TXT, Markdown and HTML** (#1416): line breaks inside a paragraph are kept, with their indentation, so code no longer ends up on one line. +- **PowerPoint to PDF without LibreOffice** (#1352): titles aligned to the bottom or the middle of their box (the Title Slide layout) stay in it instead of dropping onto the subtitle. +- **Word to PDF and HWPX with table styles** (#1152): cells take the table style's spacing, so rows are no longer twice as tall, and banded-row lines and the bottom line of merged cells appear. +- **RTF to TXT** (by @yavuzmeteafsar, #1204): with LibreOffice installed it goes straight through LibreOffice, so code keeps its indentation and blank lines. +- **Missing fonts** (#1422, #1423): *Get fonts* opens Microsoft's pages for Aptos and DengXian instead of a Google Fonts search that finds nothing. +- **Merge PDF** (by @SeoJCalive): links whose target leaves out trailing values are kept, and a long destination name is written once instead of at every link. + +### Fixes + +- **LibreOffice downloads and the engine mirror** from 2.4.1 are in this version too (#1474). +- **Ollama for Translate** (#1364): an Ollama started with `OLLAMA_HOST` on another local port is found, and a busy Ollama no longer shows as not available. An `OLLAMA_HOST` on another computer is ignored on purpose, since documents stay on this one. +- **CUR files** (by @Ugoyo): every picture converted to CUR is now a real cursor with its hotspot, not an icon named `.cur`. +- **Metadata** (#1288): a field of an XMP list that ExifTool read only partly is no longer offered for editing, and the location notice says Remove location can't check the unread entries. +- **Donut** (by @Stamina9, #1374): a donut whose front has only unavailable slices can flip back to it from the back. +- **Settings pages** (#1327): a page that fails to open shows a short note instead of leaving the previous page on screen, and the log has the details. +- **Sidebar** (by @dal1wg, #1453): collapsing it no longer overshoots and shakes. +- **Camera RAW** (by @Marouane-elfadli, #1545): mid and dark tones are no longer too dark; LibRaw's tone curve is turned into sRGB when the file is read. + +## 2.4.1 + + + +A fix for engine downloads, on top of 2.4.0. + +- **LibreOffice downloads again** (#1474). LibreOffice took version 26.2.6 out of its "stable" download folder when 26.2.7 came out, so installing LibreOffice in **Settings → Engines** failed with *"Response status code does not indicate success: 404 (Not Found)"* on Windows and macOS. Filee now downloads the same 26.2.6 build from LibreOffice's permanent archive. +- **A backup for every engine download.** When an engine's own download link stops working, times out or serves a different file, Filee now takes the same file from its own mirror (`dl.filee.sh`). Every file is still checked against the checksum Filee was built with, so the mirror can only ever hand out that exact file. + ## 2.4.0 $(NoWarn);CS1591;CS1573 - 2.4.0 + 2.5.0 Filee Filee contributors Copyright (c) Filee contributors diff --git a/Directory.Packages.props b/Directory.Packages.props index 5d9dd0783..f0ecd7112 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -9,16 +9,16 @@ - - - + + + - - - - - + + + + diff --git a/README.md b/README.md index 98823a941..8507f7781 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ winget install KnifeLemon.Filee ``` - **Windows 10/11**: run `Filee--win-Setup.exe`, or unzip the `win-Portable.zip` and run `Filee.exe`. + - On a Windows on ARM PC (Settings → System → About says "ARM-based processor"), take `win-arm64-Setup.exe` or `win-arm64-Portable.zip` instead: it runs natively, not under x64 emulation. - Setup is Filee's own installer, in Filee's languages, and needs nothing else on the PC. - It can add the Explorer menu, start at sign-in, the `filee` command and optional engines. - Silent installs take Inno Setup's switches (`/VERYSILENT /SUPPRESSMSGBOXES`). @@ -136,6 +137,8 @@ To undo it, remove the entries in Windows Security → App & browser control → - PDF pages and compression - video and audio - output folder and file names +- **A preset gallery**: *Settings → Presets → Preset gallery* installs presets other people shared on [filee.sh/presets](https://filee.sh/presets), next to yours. + *Export for the gallery…* shares your own. - **Two sides to every donut**: press Tab or turn the mouse wheel while it is open to flip it over to less common formats and tools. - **Crop before converting**: the Crop slice opens pictures one by one. Drag the frame, pick a ratio, and only that part is saved. @@ -147,7 +150,7 @@ To undo it, remove the entries in Windows Security → App & browser control → Drag the cards or use Alt+↑ / Alt+↓ to set the order, Delete to remove one, and *Choose action* to open the donut for the list in that order. The list empties when that conversion completes. - **Other ways in**: the right-click menu, a keyboard shortcut, the drop zone and the [`filee` command](#command-line). -- Light and dark themes with your own accent colour and donut opacity, in English, Español, 日本語, 한국어, 简体中文, 繁體中文, Polski, हिन्दी, Русский, العربية (right to left), Português (Brasil), Français, नेपाली, ไทย, Türkçe, Português (Portugal), Deutsch, Italiano, Bahasa Indonesia and Tiếng Việt. +- Light and dark themes with your own accent colour and donut opacity, in English, Español, 日本語, 한국어, 简体中文, 繁體中文, Polski, हिन्दी, Русский, العربية (right to left), Português (Brasil), Français, नेपाली, ไทย, Türkçe, Português (Portugal), Deutsch, Italiano, Bahasa Indonesia, Tiếng Việt, বাংলা, فارسی (right to left) and Монгол. ## Screenshots @@ -166,19 +169,19 @@ To undo it, remove the entries in Windows Security → App & browser control → | From | To | |---|---| -| **Images**: JPG, PNG, WEBP, AVIF, TIFF, BMP, GIF, APNG, ICO, ICNS, JPEG XL, JPEG 2000, PSD/PSB, TGA, PPM, HEIC, QOI, DDS, PCX, MNG, CUR, …;
camera RAW (CR2, CR3, NEF, ARW, DNG, …), DICOM, OpenEXR, HDR, FITS, JPEG XR (Windows), iPhone Live Photo (LIVP), Valve Texture VTF (Source engine, Garry's Mod), animated cursor (ANI) read;
GIMP XCF and Paint.NET PDN (layers kept between XCF, PDN and PSD) | any of these (HEIC⁵), GIMP XCF, Paint.NET PDN, VTF, PDF, SVG (traced), resized, grayscale;
Live/Motion Photos (iPhone, Android) → their video (MP4, MOV⁵), and a video → Live Photo (iPhone) or Motion Photo (Android)⁵, experimental | +| **Images**: JPG, PNG, WEBP, AVIF, TIFF, BMP, GIF, APNG, ICO, ICNS, JPEG XL, JPEG 2000, PSD/PSB, TGA, PPM, HEIC, QOI, DDS, PCX, MNG, CUR, …;
camera RAW (CR2, CR3, NEF, ARW, DNG, …), DICOM, OpenEXR, HDR, FITS, JPEG XR (Windows), iPhone Live Photo (LIVP), Insta360 INSP, Windows program icons (EXE, DLL), Valve Texture VTF (Source engine, Garry's Mod), animated cursor (ANI) read;
GIMP XCF and Paint.NET PDN (layers kept between XCF, PDN and PSD) | any of these (HEIC⁵), GIMP XCF, Paint.NET PDN, VTF, PDF, SVG (traced), resized, grayscale;
Live/Motion Photos (iPhone, Android) → their video (MP4, MOV⁵), and a video → Live Photo (iPhone) or Motion Photo (Android)⁵, experimental | | **Vector**: SVG, SVGZ, EMF, WMF, AI, Visio VSDX, ODG, FODG
EPS, PS¹
CDR, binary Visio VSD, CGM²
Obsidian Canvas (JSON Canvas) read | PDF (vector), PNG and other images,
SVG ↔ SVGZ, SVG → DXF/DWG, PDF → EPS/PS, SVG → EMF, WMF, ODG²;
Obsidian Canvas → its text as Markdown | -| **PDF** | DOCX, HWPX, TXT, PNG, JPG, TIFF, CBZ, PPTX (a picture of each page), SVG²;
merge (in an order you choose first), split, page ranges, compress (smaller PDFs) | -| **Documents**: DOCX, DOCM, DOTX, DOC, DOT, ODT, EML, Outlook MSG;
OFD (Chinese e-invoices, official documents) read
FODT, OTT, RTF, WPS, WPD, Pages, ClarisWorks, MacWrite, T602, …² | PDF, DOCX, ODT, HWPX, EPUB, TXT, HTML, PPTX and ODP slides;
MSG → EML
FODT, OTT² | +| **PDF** | DOCX, XLSX (tables), HWPX, TXT, PNG, JPG, TIFF, CBZ, PPTX (a picture of each page), SVG², PDF/A¹;
merge (in an order you choose first), split (by pages, every N pages or into equal parts), page ranges, compress (smaller PDFs) | +| **Documents**: DOCX, DOCM, DOTX, DOC, DOT, ODT, EML, Outlook MSG;
OFD (Chinese e-invoices, official documents) read
FODT, OTT, RTF, WPS, WPD, Pages, ClarisWorks, MacWrite, T602, …² | PDF, DOCX, ODT, HWPX, EPUB, TXT, HTML, PPTX and ODP slides;
DOCX, HTML tables → XLSX, ODS, CSV;
MSG → EML
FODT, OTT² | | **Spreadsheets**: XLSX, XLSM, XLS, XLT, ODS, CSV, TSV
OTS, FODS, Numbers, ET² | PDF, XLSX, ODS, CSV, TSV, JSON, HWPX, HTML
XLT, OTS² | | **Presentations**: PPTX, PPTM, POTX, POTM, PPSX, PPT, ODP, OTP, FODP
PowerPoint 95 PPT, Keynote² | PDF, PNG, JPG, ODP, DOCX, HWPX; PPT → PPTX
OTP² | | **HWP**: HWP, HWPX | PDF, PNG, DOCX, HWPX ↔ HWP, TXT, Markdown, HTML, PPTX and ODP slides | -| **Text**: TXT, LOG, script source (PY, PAC, BAT, COMMAND; read, never run), Markdown, HTML;
MHTML (saved web pages) read
Jupyter, reStructuredText, Org, MediaWiki, DocBook, Textile, OPML
LaTeX, AsciiDoc, Typst, man³ | UTF-8 TXT, PDF, DOCX, HWPX, EPUB, PPTX and ODP slides (a slide per heading)
each other, PPTX and ODP slides³ | +| **Text**: TXT, LOG, script source (PY, PAC, BAT, COMMAND; read, never run), Arduino and Processing sketches (INO, PDE), Markdown, HTML;
MHTML (saved web pages) read
Jupyter, reStructuredText, Org, MediaWiki, DocBook, Textile, OPML
LaTeX, AsciiDoc, Typst, man³ | UTF-8 TXT, PDF, DOCX, HWPX, EPUB, PPTX and ODP slides (a slide per heading)
each other, PPTX and ODP slides³ | | **E-books**: EPUB, KEPUB, MOBI, AZW3, AZW, AZW4, FB2, CBZ, CBR, CB7, HTMLZ, TXTZ, CHM, PDB, PML, TCR, RB, SNB, OEB
LIT, LRF⁴ | PDF, EPUB, KEPUB (Kobo), DOCX, TXT, HTML, HWPX
MOBI, AZW3 | -| **Video**⁵: MP4, MOV, MKV, WEBM, AVI, WMV, FLV, MPEG, Video CD (DAT), TS, M2TS, 3GP, OGV, VOB, … | MP4 (H.264, HEVC, AV1), WEBM, MOV, MKV, AVI, GIF, APNG, MP3, M4A, 720p,
subtitles (SRT, ASS, WebVTT) | -| **Audio**⁵: MP3, M4A, AAC, WAV, FLAC, OGG, OPUS, WMA, AIFF, AMR, APE, WavPack, TTA, DSD (DSF, DFF), DTS, AC3, E-AC3, … | MP3, M4A (AAC, ALAC), WAV, FLAC, OGG, OPUS, AAC, WavPack, TTA, W64, AC3, E-AC3 | +| **Video**⁵: MP4, MOV, MKV, WEBM, AVI, WMV, FLV, MPEG, Video CD (DAT), TS, M2TS, 3GP, OGV, VOB, …;
Wisenet WAVE / Nx Witness exports (NOV) read | MP4 (H.264, HEVC, AV1), WEBM, MOV, MKV, AVI, GIF, APNG, WEBP, MP3, M4A, 720p, split into parts;
subtitle tracks kept (MKV, MP4, MOV, WebM);
subtitles (SRT, ASS, WebVTT) | +| **Audio**⁵: MP3, M4A, AAC, WAV, FLAC, OGG, OPUS, WMA, AIFF, AMR, APE, WavPack, TTA, DSD (DSF, DFF), DTS, AC3, E-AC3, …;
tracker modules (XM, IT, S3M) read | MP3, M4A (AAC, ALAC), M4R (iPhone ringtone), WAV, FLAC, OGG, OPUS, AAC, WavPack, TTA, W64, AC3, E-AC3 | | **Subtitles**: SRT, ASS/SSA, WebVTT, SAMI (SMI), LRC, KRC, TTML, MicroDVD, SCC | each other as UTF-8 (Korean CP949 files read correctly) | -| **Archives**: ZIP, ANSYS Workbench (WBPZ), 7Z, RAR, TAR, TAR.GZ, TAR.BZ2, TAR.XZ, GZ, XZ, ISO, UDF, IMG, DMG, CAB, LHA, ARJ, ALZ, EGG, … | extract, ZIP, 7Z, TAR, TAR.GZ, TAR.XZ, XZ;
any files → one ZIP | +| **Archives**: ZIP, ANSYS Workbench (WBPZ), 7Z, RAR, TAR, TAR.GZ, TAR.BZ2, TAR.XZ, GZ, XZ, ISO, UDF, IMG, DMG, CAB, LHA, ARJ, ALZ, EGG, Garry's Mod addon (GMA), Valve pak (VPK), files packed into a Source map (BSP), …;
JAR, NuGet (NUPKG), Android packages (APKS, XAPK, APKM, AAB), Adobe extensions (ZXP) read | extract, ZIP, 7Z, TAR, TAR.GZ, TAR.XZ, XZ, GMA;
any files → one ZIP; folders → ZIP, ISO (Joliet or UDF 2.01), GMA | | **CAD**: DWG, DXF
Gerber PCB layers (GBR, GTL, GBL, GTO, …) read;
G-code of 3D printers and CNC machines (GCODE, GCO, NGC) read | PDF, SVG, PNG, DWG ↔ DXF;
G-code → toolpath (from above or isometric) or the slicer's preview | | **Fonts**: TTF, OTF, WOFF, WOFF2, EOT;
FON (Windows bitmap fonts) read | each other;
FON → one font per size | | **Data**: JSON, JSON Lines, YAML, TOML, XML
vCard, iCalendar | each other, CSV and XLSX (tables);
vCard, iCalendar ↔ CSV | @@ -236,6 +239,8 @@ It connects to the internet only: - to ask GitHub (`api.github.com`) whether a newer release exists, shortly after start and then every few hours. Turn this off in Settings → About ("Check for updates automatically"). +- to download an update when you press Update, from GitHub or, on Windows when GitHub doesn't answer, the same file + from Filee's download server (`dl.filee.sh`). - to download the conversion engines you choose to install, from the official locations pinned in [`engines.json`](src/Filee.Engines/Infrastructure/engines.json), and the text recognition (OCR) languages a preset uses, pinned in [`ocr-languages.json`](src/Filee.Engines/Infrastructure/ocr-languages.json). - when you click a link, which opens your web browser. diff --git a/SECURITY.md b/SECURITY.md index a97a1ae17..7d330e69d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -42,6 +42,9 @@ Out of scope: - **Updates:** an installed copy downloads the new installer (Windows) or package (Linux) from GitHub Releases and checks its SHA-256 against the release's `SHA256SUMS` file before it runs it. + - When GitHub doesn't hand out a Windows file (a timeout, an error), Filee takes the same file from its own + download mirror, `https://dl.filee.sh//`, and checks it in exactly the same way. The mirror is only + another way to get the file: a file from it that isn't signed or doesn't match is refused like one from GitHub. - Official builds carry the public half of Filee's update key. The `SHA256SUMS` file must then have a valid signature made with that key next to it (`…-SHA256SUMS.txt.sig`, ECDSA P-256), and the version it lists must be newer than the installed one. Otherwise nothing is installed, on every platform. The private key never leaves diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index a158d9b56..d9d36ea61 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -20,8 +20,9 @@ Each component remains under its own license. | Svg.Skia (incl. Svg, ShimSkiaSharp, ExCSS; text shaping in `Filee.Engines/Vector/OutlinedTextPlayback.cs` adapted from it) | MIT | https://github.com/wieslawsoltes/Svg.Skia | | HarfBuzzSharp | MIT | https://github.com/mono/SkiaSharp | | SharpCompress (in-process ZIP, 7z and RAR unpacking; bzip2, xz, LZMA and zstd decompression, also for engine downloads; RAR, 7z and TAR comics) | MIT | https://github.com/adamhathcock/sharpcompress | -| DiscUtils.Iso9660, DiscUtils.Udf, DiscUtils.HfsPlus, DiscUtils.Dmg (including DiscUtils.Core and DiscUtils.Streams; ISO creation, reading UDF discs, HFS+ volumes and DMG images) | MIT | https://github.com/DiscUtils/DiscUtils | -| lzfse-net (used by DiscUtils.Dmg; its managed wrapper only, the native LZFSE library is not shipped) | BSD-3-Clause | https://github.com/quamotion/lzfse-net | +| LTRData.DiscUtils.Iso9660, LTRData.DiscUtils.Udf, LTRData.DiscUtils.HfsPlus and LTRData.DiscUtils.Dmg (including Core and Streams; Joliet and UDF 2.01 image creation, reading UDF discs, HFS+ volumes and DMG images) | MIT | https://github.com/LTRData/DiscUtils | +| LTRData.Extensions 1.0.23 (dependency of LTRData.DiscUtils.Streams on .NET 10) | MIT | https://github.com/LTRData/Library | +| LzfseSharp (used by LTRData.DiscUtils.Dmg; LZFSE chunks never reach it, they go to 7-Zip) | BSD-3-Clause | https://github.com/Erik-White/LzfseSharp | | QRCoder | MIT | https://github.com/codebude/QRCoder | | Markdig | BSD-2-Clause | https://github.com/xoofx/markdig | | ExifTool (optional engine, downloaded on request: the Metadata tool reads and writes with it) | Perl's licence (Artistic or GPL), separate program | https://exiftool.org | diff --git a/build/build-installer.ps1 b/build/build-installer.ps1 index f943374bc..92b97981a 100644 --- a/build/build-installer.ps1 +++ b/build/build-installer.ps1 @@ -17,7 +17,9 @@ .PARAMETER Runtime win-x64 (default) or win-arm64. The ARM64 build (Filee--win-arm64-Setup.exe and -Portable.zip) has an ARM64 Setup, Explorer menu DLL and rhwp (fetch-engines.ps1 -Runtime win-arm64, which fails while the ARM64 rhwp - build is not pinned yet). It links the C runtime statically: no Microsoft C++ runtime DLLs are copied. + build is not pinned yet). It links the C runtime statically: no Microsoft C++ runtime DLLs are copied. With + -PublishDir and -SetupProgram from an ARM64 build it signs and packs on an x64 PC too (build/sign-release.ps1); + -CheckOnly runs the ARM64 Setup, so it needs Windows on ARM. .PARAMETER CertificateThumbprint Signs the release (build/sign-windows.ps1): the programs in the publish folder that come unsigned, the Setup @@ -135,14 +137,15 @@ if ($sign) { & $sign -Path $PublishDir, $SetupProgram -CertificateThumbprint $CertificateThumbprint } -# The x64 names are the ones Filee's updater looks for (-win-Setup.exe, -SHA256SUMS.txt). +# The x64 names are the ones Filee's updater looks for (-win-Setup.exe, -SHA256SUMS.txt). The ARM64 build writes its own +# sums file; a release adds those lines to the x64 one instead (sign-release.ps1). $prefix = if ($Runtime -eq 'win-x64') { "Filee-$Version-win" } else { "Filee-$Version-$Runtime" } $setupExe = Join-Path $OutputDir "$prefix-Setup.exe" Write-Host "pack installer $Version" $fast = @(if ($CheckOnly) { '--fast' }) Push-Location $root try { - Invoke-Checked 'make-setup' { dotnet run --no-cache build/tools/make-setup.cs -- $SetupProgram $PublishDir $Version $setupExe @fast } + Invoke-Checked 'make-setup' { dotnet run --no-cache build/tools/make-setup.cs -- $SetupProgram $PublishDir $Version $setupExe "--runtime=$Runtime" @fast } } finally { Pop-Location diff --git a/build/build-portable.ps1 b/build/build-portable.ps1 index d0122a66d..44b104aa9 100644 --- a/build/build-portable.ps1 +++ b/build/build-portable.ps1 @@ -170,6 +170,7 @@ else { Copy-Item -LiteralPath (Join-Path $root 'installer/linux/kwin') -Destination $package -Recurse Copy-Item -LiteralPath (Join-Path $root 'installer/linux/gnome') -Destination $package -Recurse Copy-Item -LiteralPath (Join-Path $root 'installer/linux/hyprland') -Destination $package -Recurse + Copy-Item -LiteralPath (Join-Path $root 'installer/linux/yazi') -Destination $package -Recurse Copy-Item -LiteralPath (Join-Path $root 'docs/GNOME-WAYLAND.md') -Destination $package } Invoke-Checked 'Installer permissions' { chmod +x (Join-Path $package 'install.sh') (Join-Path $package 'uninstall.sh') } diff --git a/build/sign-release.ps1 b/build/sign-release.ps1 index 2ce8350fe..e6c9460a9 100644 --- a/build/sign-release.ps1 +++ b/build/sign-release.ps1 @@ -4,24 +4,31 @@ once the release workflow of the tag has finished. .DESCRIPTION - The release workflow tests and builds the tag, keeps the unsigned Windows build (artifact windows-unsigned: the - publish folder and the Setup program) and drafts the release with the Linux and macOS packages. This script: - - 1. downloads that build, exactly as it was tested; - 2. checks out the tag in a worktree and runs its build-installer.ps1 with -CertificateThumbprint, which signs the - unsigned programs and the Setup program, packs Setup.exe, signs it, zips the portable copy and writes the - SHA-256 sums; + The release workflow tests and builds the tag, keeps the unsigned Windows builds (artifacts windows-unsigned and + windows-arm64-unsigned: the publish folder and the Setup program of each) and drafts the release with the Linux and + macOS packages. This script: + + 1. downloads those builds, exactly as they were tested; + 2. checks out the tag in a worktree and runs its build-installer.ps1 with -CertificateThumbprint for each, which + signs the unsigned programs and the Setup program, packs Setup.exe, signs it, zips the portable copy and writes + the SHA-256 sums (x64: Filee--win-Setup.exe and -win-Portable.zip; ARM64: + Filee--win-arm64-Setup.exe and -win-arm64-Portable.zip). The ARM64 sums are added to + Filee--SHA256SUMS.txt, the one Windows checksum file: Filee 2.4.0 and older take the last Windows-looking + SHA256SUMS file of a release, and a separate ARM64 one would leave them without their Setup's hash; 3. installs the signed Setup into a sandbox (nothing on the PC is touched) and checks that Filee.exe and - uninstall.exe come out signed, then uninstalls it; - 4. signs every SHA256SUMS file of the release (Windows, and the Linux and macOS ones from the draft) with Filee's - update key (build/sign-checksums.ps1, -UpdateKey), which writes a .sig file next to each; - 5. uploads Filee--win-Setup.exe, the portable zip, Filee--SHA256SUMS.txt and the .sig files to - the draft; + uninstall.exe come out signed, then uninstalls it. An x64 PC can't run the ARM64 Setup: there it checks the + signatures of the ARM64 Setup.exe and of the signed files that went into it instead (the release workflow ran + the ARM64 Setup program in a sandbox on Windows on ARM, around a stub app); + 4. signs every SHA256SUMS file of the release (the Windows one, and the Linux and macOS ones from the draft) with + Filee's update key (build/sign-checksums.ps1, -UpdateKey), which writes a .sig file next to each; + 5. uploads the Windows files and the .sig files to the draft; 6. copies the Windows files and their checksum signature to the download mirror, Cloudflare R2 behind https://dl.filee.sh//, and checks that each one is served there as is (no redirect, the same size). The - Microsoft Store takes Setup.exe from that address, because GitHub's download links redirect; + Microsoft Store takes the Setup programs from that address, because GitHub's download links redirect; 7. with -Publish, publishes the release. + A tag whose release workflow keeps no ARM64 build (2.4.0 and earlier) gets the x64 files only. + When the tag's Directory.Build.props carries an update key (FileeUpdatePublicKey), its builds refuse an update without signed checksums: the script then stops early without -UpdateKey, checks that the private key belongs to that public key, and doesn't publish while a SHA256SUMS file on the draft has no .sig next to it. @@ -77,12 +84,26 @@ if ($UpdateKey -and -not (Test-Path -LiteralPath $UpdateKey -PathType Leaf)) { t $work = Join-Path $PSScriptRoot ".cache\release-$Version" $source = Join-Path $work 'source' -if (Test-Path $source) { Invoke-Checked 'git worktree remove' { git -C $root worktree remove --force $source } } +# git can't delete paths longer than 260 characters, and the worktree has some once make-setup.cs has built its +# projects in it: PowerShell deletes what is left, and git forgets the worktree. +function Remove-Source { + if (Test-Path -LiteralPath $source) { + git -C $root worktree remove --force $source + if (Test-Path -LiteralPath $source) { Remove-Item -LiteralPath $source -Recurse -Force } + } + git -C $root worktree prune +} +Remove-Source Remove-Item $work -Recurse -Force -ErrorAction SilentlyContinue New-Item -ItemType Directory -Force -Path $work | Out-Null -Write-Host "download the unsigned build of run $($run.databaseId)" +# The release workflow keeps an ARM64 build after 2.4.0 (#236); older tags have only the x64 one. +$arm64 = (git -C $root show "${tag}:.github/workflows/release.yml" | Out-String) -match 'windows-arm64-unsigned' +Write-Host "download the unsigned Windows build$(if ($arm64) { 's (x64, ARM64)' }) of run $($run.databaseId)" Invoke-Checked 'gh run download' { gh run download $run.databaseId --name windows-unsigned --dir (Join-Path $work 'unsigned') } +if ($arm64) { + Invoke-Checked 'gh run download' { gh run download $run.databaseId --name windows-arm64-unsigned --dir (Join-Path $work 'unsigned-arm64') } +} Invoke-Checked 'git worktree add' { git -C $root worktree add --detach $source $tag } try { @@ -90,14 +111,31 @@ try { & (Join-Path $source 'build\build-installer.ps1') -Version $Version -Portable -OutputDir $out ` -PublishDir (Join-Path $work 'unsigned\app') -SetupProgram (Join-Path $work 'unsigned\Filee.Setup.exe') ` -CertificateThumbprint $CertificateThumbprint + if ($arm64) { + & (Join-Path $source 'build\build-installer.ps1') -Version $Version -Portable -OutputDir $out -Runtime win-arm64 ` + -PublishDir (Join-Path $work 'unsigned-arm64\app') -SetupProgram (Join-Path $work 'unsigned-arm64\Filee.Setup.exe') ` + -CertificateThumbprint $CertificateThumbprint + } } finally { - git -C $root worktree remove --force $source + Remove-Source } $setup = Join-Path $out "Filee-$Version-win-Setup.exe" -$files = @($setup, (Join-Path $out "Filee-$Version-win-Portable.zip"), (Join-Path $out "Filee-$Version-SHA256SUMS.txt")) +$windowsSums = Join-Path $out "Filee-$Version-SHA256SUMS.txt" +$files = @($setup, (Join-Path $out "Filee-$Version-win-Portable.zip"), $windowsSums) +$setupArm64 = Join-Path $out "Filee-$Version-win-arm64-Setup.exe" +if ($arm64) { + $files += @($setupArm64, (Join-Path $out "Filee-$Version-win-arm64-Portable.zip")) +} foreach ($file in $files) { if (-not (Test-Path $file)) { throw "$file was not written." } } +if ($arm64) { + # One checksum file for both (see the description): the ARM64 lines after the x64 ones, which stay as they were. + $arm64Sums = Join-Path $out "Filee-$Version-win-arm64-SHA256SUMS.txt" + Add-Content $windowsSums (Get-Content $arm64Sums) -Encoding ascii + Remove-Item $arm64Sums + Write-Host "added the ARM64 checksums to $(Split-Path $windowsSums -Leaf)" +} # The signed Setup still finds its payload, and what it installs is signed, the uninstaller too. $sandbox = Join-Path $work 'sandbox' @@ -105,24 +143,43 @@ function Invoke-Setup([string]$exe) { $process = Start-Process -FilePath $exe -ArgumentList @('/VERYSILENT', '/SUPPRESSMSGBOXES', "/SANDBOX=`"$sandbox`"") -Wait -PassThru if ($process.ExitCode -ne 0) { throw "$(Split-Path $exe -Leaf) failed in the sandbox with exit code $($process.ExitCode) (logs: $sandbox\Temp)" } } -Write-Host 'install the signed Setup into a sandbox' -Invoke-Setup $setup -$installed = Join-Path $sandbox 'Program Files\Filee' -foreach ($file in 'Filee.exe', 'filee-cli.exe', 'uninstall.exe', 'engines\rhwp\rhwp.exe') { - $signature = Get-AuthenticodeSignature (Join-Path $installed $file) - if ($signature.Status -ne 'Valid') { throw "$file is not signed after installing ($($signature.Status))." } +# Programs Setup installs that must come out signed: the app's own, and rhwp, which comes unsigned. +$programs = 'Filee.exe', 'filee-cli.exe', 'engines\rhwp\rhwp.exe' +function Assert-Signed([string]$folder, [string[]]$names, [string]$where) { + foreach ($file in $names) { + $signature = Get-AuthenticodeSignature (Join-Path $folder $file) + if ($signature.Status -ne 'Valid') { throw "$file is not signed $where ($($signature.Status))." } + } +} +function Test-Setup([string]$exe) { + Write-Host "install the signed $(Split-Path $exe -Leaf) into a sandbox" + Invoke-Setup $exe + $installed = Join-Path $sandbox 'Program Files\Filee' + Assert-Signed $installed ($programs + 'uninstall.exe') 'after installing' + Invoke-Setup (Join-Path $installed 'uninstall.exe') + Remove-Item $sandbox -Recurse -Force -ErrorAction SilentlyContinue +} +Test-Setup $setup +if ($arm64 -and [Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { + Test-Setup $setupArm64 +} +elseif ($arm64) { + # What its payload was packed from, signed in place by build-installer.ps1, and the Setup program, which Setup + # writes out as uninstall.exe. The release workflow ran the ARM64 Setup program in a sandbox (around a stub app). + Write-Host 'check the signatures of the ARM64 build (an x64 PC cannot run its Setup)' + Assert-Signed (Join-Path $work 'unsigned-arm64\app') $programs 'in the ARM64 build' + Assert-Signed (Join-Path $work 'unsigned-arm64') 'Filee.Setup.exe' 'in the ARM64 build' + Assert-Signed $out (Split-Path $setupArm64 -Leaf) 'after packing' } -Invoke-Setup (Join-Path $installed 'uninstall.exe') -Remove-Item $sandbox -Recurse -Force -ErrorAction SilentlyContinue -# Every SHA256SUMS file of the release, signed: the Linux and macOS ones the workflow put on the draft, and the new -# Windows one. +# Every SHA256SUMS file of the release, signed in one go (one passphrase): the Linux and macOS ones the workflow put +# on the draft, and the new Windows one. $signatures = @() if ($UpdateKey) { $sums = Join-Path $work 'sums' New-Item -ItemType Directory -Force -Path $sums | Out-Null Invoke-Checked 'gh release download' { gh release download $tag --pattern '*SHA256SUMS.txt' --dir $sums --clobber } - Copy-Item (Join-Path $out "Filee-$Version-SHA256SUMS.txt") $sums -Force + Copy-Item $windowsSums $sums -Force $signatures = @(& (Join-Path $PSScriptRoot 'sign-checksums.ps1') -Folder $sums -PrivateKeyPath $UpdateKey -PublicKey $publicKey) } @@ -157,6 +214,10 @@ if ($publicKey) { $unsigned = @($assets | Where-Object { $_ -like '*SHA256SUMS.txt' -and "$_.sig" -notin $assets }) if ($unsigned.Count) { throw "Not signed on the draft of ${tag}: $($unsigned -join ', '). Run again with -UpdateKey." } } +# A Windows checksum file besides Filee--SHA256SUMS.txt (uploaded by hand) could be the one Filee 2.4.0 and +# older pick, without the hash of their Setup. +$extraSums = @((gh release view $tag --json assets | ConvertFrom-Json).assets.name | Where-Object { $_ -like 'Filee-*-win-*SHA256SUMS.txt*' }) +if ($extraSums.Count) { throw "Remove from the draft of ${tag}: $($extraSums -join ', '). The Windows hashes all go in Filee-$Version-SHA256SUMS.txt." } if ($Publish) { Invoke-Checked 'gh release edit' { gh release edit $tag --draft=false --latest } Write-Host "published $tag" diff --git a/build/tools/make-setup.cs b/build/tools/make-setup.cs index f0730bdf2..0fd1d6241 100644 --- a/build/tools/make-setup.cs +++ b/build/tools/make-setup.cs @@ -2,22 +2,27 @@ // src/Filee.Setup/Payload/SetupPayload.cs) to the published Setup program. The engines Setup offers on a fresh install // come from EngineDownloads (engines.json), so Setup offers exactly what Settings → Engines offers. // Run by build/build-installer.ps1: -// dotnet run build/tools/make-setup.cs -- [--fast] +// dotnet run build/tools/make-setup.cs -- [--fast] [--runtime=win-arm64] // LZMA with a 48 MB dictionary, programs through the x86 branch filter; --fast uses a small dictionary, for checks. +// --runtime is the build the payload is (win-x64 by default): build/sign-release.ps1 packs the ARM64 Setup on an x64 PC, +// and it offers the engines of the ARM64 app. Both download the win-x64 engines on Windows 11 (EngineDownloads), so +// only the package list differs. #:project ../../src/Filee.Setup/Filee.Setup.csproj #:project ../../src/Filee.Engines/Filee.Engines.csproj #:property PublishAot=false using System.Diagnostics; using System.Reflection; +using System.Runtime.InteropServices; using Filee.Engines.Infrastructure; using Filee.Setup.Payload; var fast = args.Contains("--fast"); -var positional = args.Where(a => a != "--fast").ToArray(); -if (positional.Length != 4) +var runtime = args.FirstOrDefault(a => a.StartsWith("--runtime=", StringComparison.Ordinal))?["--runtime=".Length..] ?? "win-x64"; +var positional = args.Where(a => !a.StartsWith("--", StringComparison.Ordinal)).ToArray(); +if (positional.Length != 4 || runtime is not ("win-x64" or "win-arm64")) { - Console.Error.WriteLine("usage: dotnet run build/tools/make-setup.cs -- [--fast]"); + Console.Error.WriteLine("usage: dotnet run build/tools/make-setup.cs -- [--fast] [--runtime=win-x64|win-arm64]"); return 2; } var (program, app, version, output) = (positional[0], positional[1], positional[2], positional[3]); @@ -31,7 +36,7 @@ // LibreOffice and come with it, so they have no folder of their own. var marker = (string?)typeof(EngineInstaller).GetField("MarkerName", BindingFlags.NonPublic | BindingFlags.Static)?.GetRawConstantValue() ?? throw new InvalidOperationException("EngineInstaller.MarkerName not found"); -var engines = EngineDownloads.Packages +var engines = EngineDownloads.PackagesFor(runtime == "win-arm64" ? Architecture.Arm64 : Architecture.X64) .Where(EngineDownloads.CanDownload) .Select(p => new EngineOffer( p.Id, @@ -45,5 +50,5 @@ var manifest = SetupPayload.Write(program, app, Path.GetFullPath(output), version, engines, marker, fast, Console.WriteLine); var size = new FileInfo(output).Length; Console.WriteLine($"{manifest.Files.Count} files, {manifest.TotalSize / 1_000_000} MB -> {output} ({size / 1_000_000} MB) in {watch.Elapsed.TotalSeconds:0} s; " + - $"engines offered: {string.Join(", ", engines.Select(e => e.Suggested ? e.Id + "*" : e.Id))}"); + $"engines offered ({runtime}): {string.Join(", ", engines.Select(e => e.Suggested ? e.Id + "*" : e.Id))}"); return 0; diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 9197658b8..ab3c96fdd 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -429,6 +429,8 @@ text, vectors, outlines, forms, page labels and document information remain PDF Ctrl / Shift + click selects several pages, and every action works on the whole selection: the pages move up or down as a block, dragging them moves them to the line drawn between two pages, Insert puts another PDF's pages before or after the selection and Replace puts them where the selection was, removing it (#860). +PDFs dragged in from the file manager show the same line and go in at it, through the same path as Insert +(`PdfPageEditorViewModel.InsertFilesAtAsync`); other files are left out, and a drag without a PDF isn't taken (#1596). Each source PDF's bytes and page sizes are cached once after the window has appeared; thumbnails and the large preview render off the UI thread. A whole-document edit keeps the original catalogue and changes `/Rotate` in modify mode. An actual reorder, deletion, addition or extraction builds a new PDF from selected page objects. A PDF that opens @@ -463,6 +465,15 @@ hidden and Save starts the M4R conversion of that part (`AskedRingtone.Apply`). `setpts` and chained `atempo` for speed, `volume`, `color`/`anullsrc` for gaps, `concat`, the music as a second input (`atrim`, `volume`, `afade`, `adelay`, `amix`), then `fade`/`afade`. It is encoded with the preset's quality, size and codec. +- Pictures, clips, the preview and Live Photos start at the frame shown at the time chosen (#1205): + `Engines/Media/KeyFrames` reads the packets before the time with ffprobe, without decoding, for the key frame to read + from, since FFmpeg's own `-ss` lands between key frames in MPEG-TS and MPEG-PS and skips the leading pictures of an + open group. A picture is trimmed at the file's own times (`-copyts`). What is encoded reads with `-copyts` and + `-itsoffset`, moved back to a microsecond before the start so nothing kept is below time 0, and its picture is cut by + `trim` in the stream's own ticks; its progress comes from `-stats_enc_pre`, with `-progress` to show it is working + between parts. A copy's `-ss` is checked where FFmpeg's own copy lands, since each demuxer seeks its own way (an MP4 + by decode time, a WMV by a key frame a second), and its end is put where no frame shown before its last is missing. + The file header of `KeyFrames.cs` lists the FFmpeg behaviours, and the versions, that this allows for. ## Crop video @@ -614,6 +625,34 @@ installed yet; the slides introduce the installed one. The demo animations are r The tray app runs one per rule (`WatchFolderService`, Settings → Watch folders, conversions in the toast and history); `filee watch` runs one on its own, with a stable `cli` rule identity across command restarts. +## Preset gallery + +Presets shared by users live in the `KnifeLemon/Filee-Presets` repository and on filee.sh (#1530); the app reads +them, it never uploads. + +- `Filee.Core/Gallery/SharedPresetRules` is the allow-list: every field a shared preset.json (a `PresetBundle`) may + have, with its range, and the fields left out (folders of one's own, passwords, picture and sound paths, metadata + naming people, places or owners), which may only be empty. A field added to `Preset` fails the check until it is + listed there (`PresetGalleryCheckTests` compares the list with the model). Settings that touch the installer's files + pass with a warning (`SharedPresetWarnings`, codes shared with the gallery's repository and filee.sh); the window + shows them and asks for a tick before installing a preset with a high one. +- `SharedBundleCheck` checks a preset.json against it, as JSON first (unknown fields, types, ranges, links, personal + paths) and then as presets (kinds, tools, targets, references), and derives what meta.json needs. + `SharedPresetFolderCheck` checks a whole submission folder, pictures included (`GalleryImageHeader` reads their + header before anything decodes them). `filee presets check [--json]` runs it, with SkiaSharp decoding each + picture; the gallery's CI calls it. +- `GalleryInstaller` checks the downloaded file's SHA-256 and the rules again, then adds its presets and donut under + new ids (" (2)" on a name the library has); nothing is ever replaced, unlike Settings → General → Import. + `GalleryExport` builds the preset.json "Export for the gallery…" saves (Presets page). +- The app's `PresetGalleryWindow` (from the Presets page) reads `index.json` through `PresetGalleryClient`, only while + it is open, with the proxy setting, time and size limits, and falls back to the repository on GitHub when filee.sh + can't be reached. Paths in the index are relative to the URL it came from; Install uses the entry's counted + `download` link. Pictures are cached in the work folder's `gallery/` (64 MB, 30 days). A preset is written in one + main `language` and optionally more (`titleByLang`, `descriptionByLang`): the window shows the app language's texts + when the preset has them, else the main ones with a badge naming their language, lists the presets in the app's + language first and can hide the rest ("Only in my language"). Pictures follow the app language on their own + (`imagesByLang`). + ## Platform code Everything OS-specific goes through `IPlatformServices` (`Filee.Core/Platform`). Windows lives in @@ -736,7 +775,11 @@ have no semibold) instead of the app's embedded Noto fonts. update Setup starts Filee with `--background --whats-new`, so the slides show once in the app as well. - **Build** (`build/build-installer.ps1`): Setup is published as one self-contained, trimmed file - (`-p:FileeSetupPublish=true`), so it runs on Windows 10 1809+ x64 without .NET. `build/tools/make-setup.cs` appends + (`-p:FileeSetupPublish=true`), so it runs on Windows 10 1809+ x64 without .NET. Skia and HarfBuzz are resources of + `Filee.Setup.dll` rather than files .NET unpacks at start: `NativeLibraries` writes them into a new folder of its + own before the window opens (elevated, one in `%SystemRoot%\Temp` only administrators can change) and loads them by + full path; other libraries come from System32 only. Setup draws in software, so ANGLE isn't carried. + `build/tools/make-setup.cs` appends the app's publish folder as the payload: `[program][LZMA streams of all files][manifest JSON][72-byte trailer]` (`SetupPayload`): ~48 MB segments compressed in parallel with SharpCompress's LZMA (48 MB dictionary), programs first through the x86 branch filter (`X86Filter`, from the LZMA SDK) as 7-Zip and Inno Setup do. The manifest lists @@ -776,6 +819,13 @@ have no semibold) instead of the app's embedded Noto fonts. - **Command line**: Inno Setup's switches (`SetupOptions`, documented at the top of the file), because Filee 1.x updates itself with `/SILENT /NORESTART` and winget passes `/VERYSILENT /SUPPRESSMSGBOXES /NORESTART`. Exit codes as Inno Setup's: 0 done, 1 could not start, 2 cancelled before installing (also a declined UAC prompt), 4 failed. +- **In-app updates** (`UpdateService`): an installed copy downloads `Filee--SHA256SUMS.txt`, its `.sig` and + `Filee--win[-arm64]-Setup.exe` from the GitHub release, checks the signature with the update key, the Setup's + SHA-256 and its Authenticode publisher, and runs it with `/SILENT /NORESTART`. A file GitHub doesn't hand out (an + HTTP error, a timeout, a cut connection) is taken from the download mirror, `https://dl.filee.sh//` + (`UpdateService.MirrorRoot`, filled by `build/sign-release.ps1`); after one GitHub failure, the update's other files + try the mirror first. The checks don't depend on the source. A file that arrived and was refused is not fetched + again from the other source. Linux and macOS files aren't on the mirror. - **Testing**: `Filee.Setup.Tests` runs installs, updates (also over a simulated 1.x installation) and uninstalls against `MemoryRegistry`, a fake `ISetupSystem` and scratch folders, and renders every page. `/SANDBOX=` runs the real Setup with a registry file and all folders inside ``; `build-installer.ps1 -CheckOnly` (CI) diff --git a/docs/ENGINES.md b/docs/ENGINES.md index 904d9149d..d8d9fd674 100644 --- a/docs/ENGINES.md +++ b/docs/ENGINES.md @@ -12,7 +12,7 @@ Filee chooses engines automatically. Settings → *Engines* shows their status, | PDFsharp | built in (library) | images → PDF (CMYK pictures stay CMYK), merge, split, page ranges, page organising, lossless rotate and crop-box edits, pages per sheet (N-up), spreadsheet print-studio assembly, **compression** (smaller PDFs, see below), PDFs without their metadata | | PDFium | built in (library) | PDF → images (multi-page TIFF/GIF supported); CMYK pages → CMYK JPG/TIFF through Ghostscript when it is installed | | **HWP text** | built in | **HWP/HWPX → TXT, Markdown, HTML** with the [HWP](#hwp-reader) and [HWPX readers](#hwpx-reader) (pictures in a `_files` folder next to the Markdown, embedded in the HTML; see [HWP text, Markdown and HTML](#hwp-text-markdown-and-html)) | -| Text & Markdown (Markdig) | built in (library) | **Markdown → HTML, TXT**; **TXT, LOG, PY, PAC, BAT, CMD, COMMAND, LUA, CSS, PS1, SQL, AHK, INI, RSC, C, H, CPP, CC, CXX, HPP, HH, HXX, CS, DART, HQL, DBML, JAVA, INO, PDE → UTF-8 TXT**, preserving source text without running scripts (and → PDF through the Filee renderer, → DOCX through the DOCX writer) | +| Text & Markdown (Markdig) | built in (library) | **Markdown → HTML, TXT**; **TXT, LOG, CXLOG, PY, PAC, BAT, CMD, COMMAND, LUA, CSS, PS1, SQL, AHK, INI, RSC, C, H, CPP, CC, CXX, HPP, HH, HXX, CS, DART, HQL, DBML, JAVA, INO, PDE → UTF-8 TXT**, preserving source text without running scripts (and → PDF through the Filee renderer, → DOCX through the DOCX writer) | | **Markup languages** | built in | **Jupyter notebooks (IPYNB), OPML, Textile, MediaWiki, reStructuredText, Org, DocBook 5 → Markdown, HTML, TXT and each other**; every document the built-in readers read → each of them; each → DOCX, ODT, HWPX, PDF through the document writers (see [Lightweight markup languages](#lightweight-markup-languages)) | | Spreadsheets (ExcelDataReader for XLS) | built in (library) | **XLSX, XLS, ODS, CSV, TSV → XLSX, ODS, CSV, TSV** (one CSV / TSV per sheet) | | **Spreadsheet printing** | built in | **XLSX (+ XLSM/XLTX), XLS (+ XLT), ODS → PDF** printed the way Excel prints them: page setup, print areas and titles, scaling and fit to pages, page breaks, headers and footers (see [Spreadsheet printing](#spreadsheet-printing)) | @@ -41,13 +41,13 @@ Filee chooses engines automatically. Settings → *Engines* shows their status, | **Geospatial vector data** | built in | **GeoJSON, KML, KMZ, GPX, Shapefile ↔ each other and CSV** (longitude / latitude or WKT); Garmin FIT (activities) and OpenStreetMap XML (`.osm`), both read only, → each of them and CSV; projected Shapefiles (UTM, Web Mercator, Lambert, Albers) are converted to WGS 84; through CSV to XLSX, JSON, … (see below) | | **Filee renderer** | built in, on by default (Settings → Engines → *Use the Filee renderer*) | **HWPX, HWP, Word documents (DOCX and DOC), ODT, RTF, TXT, Markdown, HTML, e-books, CSV / TSV, OFD, the markup languages Filee reads itself (and Pandoc's formats) → PDF** with Filee's own layout engine; **PPTX, PPTM, POTX, POTM, PPSX, PPT ([PPT reader](#ppt-reader)), ODP, OTP, FODP ([ODP / ODG reader](#odp--odg-reader)) → PDF, PNG, JPG** with its slide renderer; files with what it doesn't draw yet take the HWPX writer and rhwp (see [Filee renderer: PDF output](#filee-renderer-pdf-output) and [slides](#filee-renderer-slides)) | | rhwp | bundled with the installer (`engines/rhwp`, with the Microsoft C++ runtime, see below) | HWP/HWPX → PDF when the Filee renderer is off or can't draw a file yet, **HWPX → HWP** (HWP → HWPX too, ranked below the built-in HWP reader) | -| Archives | built in (SharpCompress, DiscUtils, .NET and Filee's own readers and writers); 7-Zip optional (Settings → *Engines*, ~2 MB download) | **in-process**: ZIP (including ANSYS Workbench WBPZ and Adobe ZXP), Minecraft and Modrinth packs, 7Z (solid ones too), RAR, TAR (+ GZ/BZ2/XZ/Z/7Z/LZ), GZ, BZ2, XZ, LZMA, Z, lzip, CPIO, DEB, RPM, ISO (UDF discs too), IMG and DMG disk images, split (.001), ALZ, EGG, CAB, LHA, ARJ; **7-Zip, when installed**: the rare variants the in-process readers leave to it (see [Archives](#archives)) **→ folder, ZIP, 7Z, TAR, TAR.GZ, TAR.BZ2, TAR.XZ, BZ2, XZ, the packs** (in-process); "Compress into one archive" for any files | +| Archives | built in (SharpCompress, DiscUtils, .NET and Filee's own readers and writers); 7-Zip optional (Settings → *Engines*, ~2 MB download) | **in-process**: ZIP (including ANSYS Workbench WBPZ and Adobe ZXP, and Windows app packages MSIX / APPX), Minecraft and Modrinth packs, Garry's Mod addons (GMA), Valve paks (VPK), the files packed into Source maps (BSP), 7Z (solid ones too), RAR, TAR (+ GZ/BZ2/XZ/Z/7Z/LZ), GZ, BZ2, XZ, LZMA, Z, lzip, CPIO, DEB, RPM, ISO (UDF discs too), IMG and DMG disk images, split (.001), ALZ, EGG, CAB, LHA, ARJ; **7-Zip, when installed**: the rare variants the in-process readers leave to it (see [Archives](#archives)) **→ folder, ZIP, 7Z, TAR, TAR.GZ, TAR.BZ2, TAR.XZ, BZ2, XZ, the packs, GMA** (in-process); "Compress into one archive" for any files | | LibreOffice | **optional download** (~370 MB, 1.1 GB on disk) | older and rare formats only: Word 6.0 / 95 and Works documents, PowerPoint 95 and older PPT, binary Visio (`.vsd`), and ODP / ODG with what Filee doesn't draw yet (charts, OLE objects, 3D) → PDF; XLS, PPT, RTF and OpenDocument to each other, output as DOCX/ODT/ODS, and ODP for what the [ODP writer](#odp-writer) doesn't take (OpenDocument presentations themselves, Keynote, decks with charts, effects or 3D); read-only formats (see below) → PDF and their kind's editable formats; FODT, OpenDocument templates (OTT, OTS, OTP) and XLT out; SVG → EMF/WMF/ODG, a PDF page → SVG | | Pandoc | **optional download** (~42 MB, 240 MB on disk) | Markdown ↔ DOCX/ODT/RTF, DOCX/ODT/HTML/RTF → Markdown, HTML ↔ DOCX/ODT, markup languages (LaTeX, AsciiDoc, Typst, man; and RTF / EPUB from the built-in ones) ↔ Markdown/HTML/DOCX/ODT and each other (and → RTF, EPUB, TXT); their AST feeds the built-in PPTX writer (Pandoc's own slides only where Filee assumes a Pandoc that isn't installed) | | Ghostscript | **optional download** (~20 MB, 31 MB on disk) | EPS/PS → PDF, PostScript-based AI → PDF (images through PDF and PDFium), EPS/PS → PNG; PDF → EPS/PS only when moved above the built-in PostScript writer; smaller PDFs when a preset asks for it; PDF/A-2b for PDF/A presets; renders CMYK PDF/AI pages for CMYK JPG/TIFF | | Tesseract | **optional download** (~50 MB, 160 MB on disk; each language 0.4–10 MB when first used) | **text recognition (OCR)**: scans and pictures → searchable PDF, and their text into DOCX, TXT, Markdown and HWPX ("Recognize text" in the preset, see below) | | Apple Vision | part of macOS (Mac only) | **text recognition (OCR) on a Mac**, the same step as Tesseract without a download; Tesseract reads the languages Vision doesn't (see "Apple Vision on macOS") | -| FFmpeg | **optional download** (~100 MB, 272 MB on disk) | **all video and audio**: video ↔ video (H.264, HEVC, AV1), video → animated GIF / APNG, a still frame or every frame, audio and subtitle extraction, audio ↔ audio (also APE, WavPack, TTA, DSD, DTS, ALAC, …), GIF, APNG and photos → MP4/WEBM/MOV, Live / Motion Photos → their video, a clip of a video → an iPhone Live Photo or Android Motion Photo (experimental), images → HEIC, clips or audio files joined into one, pictures → a slideshow MP4, a video split into parts every so often or into equal parts (copied, not encoded), copies without metadata (see "Media tools") | +| FFmpeg | **optional download** (~100 MB, 272 MB on disk) | **all video and audio**: video ↔ video (H.264, HEVC, AV1), video → animated GIF / APNG / WebP, a still frame or every frame, audio and subtitle extraction, audio ↔ audio (also APE, WavPack, TTA, DSD, DTS, ALAC, …), GIF, APNG and photos → MP4/WEBM/MOV, Live / Motion Photos → their video, a clip of a video → an iPhone Live Photo or Android Motion Photo (experimental), images → HEIC, clips or audio files joined into one, pictures → a slideshow MP4, a video split into parts every so often or into equal parts (copied, not encoded), copies without metadata (see "Media tools") | | Calibre | **optional download** (~216 MB, 660 MB on disk) | rare e-book formats: LIT, LRF → EPUB (CHM, PDB, PML, RB, SNB, TCR, OEB too, below the built-in readers); EPUB → LIT, LRF, PDB, PML, RB, SNB, TCR (MOBI, AZW3 too, below the built-in writer); e-books → PDF (ranked above the HWPX writer with the Filee renderer off, see below) | | WeasyPrint | **optional download** (Windows only for now; ~32 MB, 65 MB on disk) | **HTML, Markdown, EML, MSG, MHTML → PDF** laid out as a browser prints them (headings, tables, bold, Arabic and Indic shaping), instead of the built-in route; nothing changes without it (see below) | | Whisper | **optional download** (Windows only; ~157 MB with model, ~160 MB on disk) | **Speech-to-text transcription**: video and audio → SRT subtitles or plain TXT in ~100 languages using OpenAI Whisper (whisper.cpp); runs locally and offline; needs FFmpeg | @@ -267,7 +267,8 @@ app, the command line and Setup for win-arm64, the Explorer menu DLL for ARM64 ( -Architecture arm64`, packaged as `arm64`), and ARM64 builds of the bundled engines (`fetch-engines.ps1 -Runtime win-arm64`). The engines the app downloads stay x64: on Windows 11 on ARM, which runs them under emulation, the app offers the win-x64 downloads (`EngineDownloads.DownloadRuntime`); Windows 10 on ARM can't run them and gets none. -Setup's engine list is made when it is packed (`build/tools/make-setup.cs`), so the ARM64 Setup offers the x64 one. +Setup's engine list is made when it is packed (`build/tools/make-setup.cs --runtime=win-arm64`, also on the x64 PC +that signs the release): the x64 downloads, without the packages the ARM64 app has none of (the upscaler). - **7-Zip** is not bundled (it is an optional download, x64 under emulation like the others). `fetch-engines.ps1 -Runtime win-arm64 -Only 7zip` still fetches its ARM64 build for the archive tests on the ARM64 runner: the official @@ -280,8 +281,14 @@ Setup's engine list is made when it is packed (`build/tools/make-setup.cs`), so pin is filled in, a win-arm64 build stops and says so. HWP / HWPX → TXT, Markdown and HTML are managed code ([HWP text](#hwp-text-markdown-and-html)) and work on ARM64 like -everywhere else. CI's `build (win-arm64)` job builds and tests on Windows 11 ARM64; once the pins are filled in it also -builds the package (artifact `windows-arm64-package`). +everywhere else. CI's `windows / build (win-arm64)` job builds and tests on Windows 11 ARM64 (for pull requests into builtin-engines +only with the `full-ci` label); once the pins are filled in it also builds the package (artifact +`windows-arm64-package`). Releases ship it next to the x64 files: the release workflow's `windows-arm64` job builds and +tests it the same way and keeps it unsigned for `build/sign-release.ps1` (see +[Releasing](../CONTRIBUTING.md#releasing-maintainers)), and the in-app updater of an ARM64 build takes +`-win-arm64-Setup.exe` (an x64 build keeps to the x64 Setup, also on Windows on ARM). Both are in the one Windows +`Filee--SHA256SUMS.txt`: Filee 2.4.0 and older take the last Windows-looking SHA256SUMS file of a release, +so a separate ARM64 one would break their updates. ## Images and vector graphics @@ -296,6 +303,15 @@ builds the package (artifact `windows-arm64-package`). one of these (animated GIF ↔ animated WebP ↔ APNG ↔ MNG ↔ JPEG XL ↔ AVIF, WebP lossy or lossless as the preset says, #988) and becomes a multi-page TIFF; other targets get the first frame. Multi-page TIFFs and PDFs stay one image per page in WebP and AVIF. + - **Video → animated WebP** needs FFmpeg: one looping pass with its `libwebp_anim` encoder (`MediaEncoding.AnimatedWebp`). + `FfmpegConverter` has a direct video → WebP edge (cost 15). Without it the route planner took video → still PNG → + WebP (10 + 10), cheaper than the animated routes through GIF or APNG (15 + 10), so the WebP was one frame. The + preset's image options decide the encoding: the quality slider sets a lossy WebP, *Lossless WEBP* writes every frame + losslessly. Lossy output follows the video quality for its limits (20 / 15 / 12 frames a second, at most 1920 / 1280 / + 854 px wide, never upscaled: a 930 × 480 clip stays 930 × 480); lossless has no width limit (WebP's own is + 16,383 px) and keeps up to 30 frames a second, so its files are large. "Ask every time" for the compression offers the + picture quality for a video → WebP (`AskedCompression.KindOf`); its size estimate reads a picture tile, so it can + show "unknown" for a video. - **Animated AVIF** (#1200) needs no FFmpeg, but goes much faster with it. ImageMagick reads the frames and applies the preset either way. With FFmpeg and its libaom-av1 encoder (Filee's FFmpeg download has it), `Media/AvifSequenceWriter.cs` packs the frames into an APNG in the work folder (`Magick/Apng.cs`, exact delays) and @@ -322,7 +338,7 @@ builds the package (artifact `windows-arm64-package`). keeps its new length. Players show a frame of 10 ms or less for 100 ms, so no delay goes below 20 ms (50 frames a second): a frame that would start sooner than that after the one before is dropped and its time goes to that one, which leaves frames out evenly. Source delays of 10 ms or less count as the 100 ms players show. Loop count and - disposal stay; 1× (also every preset saved before the option) leaves the timing untouched. Video → GIF / APNG + disposal stay; 1× (also every preset saved before the option) leaves the timing untouched. Video → GIF / APNG / WebP (FFmpeg) puts `setpts=PTS/` before the `fps` filter, so the frame rate limits stay. The speed changes only in the step that writes the output (`JobQueue`), never twice on a longer route. - **APNG** (`Magick/Apng.cs`) is Filee's own code, written from the APNG specification: ImageMagick reads only an @@ -997,7 +1013,7 @@ low-level objects (option B).** `Typesetting/FileeRendererConverter.cs` (id `layout`, "Filee renderer") reads a document into the document model, lays it out and writes the PDF in one step, in-process. Settings → Engines → *Use the Filee renderer* turns it on and -off (`AppSettings.FileeRenderer`, on by default; settings schema 97 turned it on once for everyone, as it had been a +off (`AppSettings.FileeRenderer`, on by default; settings schema 102 turned it on once for everyone, as it had been a preview of unreleased builds). Off, it has no edges and is shown as off, and documents → PDF go through the HWPX writer and rhwp again. The engine tests read no settings: there `EngineEnvironment.FileeRenderer` is off unless a test turns it on. @@ -1027,7 +1043,7 @@ test turns it on. the renderer: LibreOffice takes them only at its fallback cost, so left out they would go to the HWPX writer and rhwp, as they did before the renderer. Without LibreOffice the switches change nothing. *Use LibreOffice for presentations* was on by default when the alternative was the HWPX writer and rhwp; - settings schema 97 turned it off once, so decks reach the slide renderer, and it is off for new users. The other two + settings schema 102 turned it off once, so decks reach the slide renderer, and it is off for new users. The other two were always off by default and are left as the user set them. Tests: `FileeRendererConverterTests` (`Libreoffice_chosen_for_*`), `RoutePlannerTests` (the costs). - **The check before converting** (`ConversionEdge.Checked`, `ICapabilityCheck`): the engine looks through an HWPX, Word @@ -1477,7 +1493,7 @@ use: it turns a deck into flowing pages of text boxes, which is right for DOCX o a slide. - **Cost 0:** with the priority list's penalty it would tie LibreOffice's slides edge (0 when Settings → Engines → - *Use LibreOffice for presentations → PDF* is on; off by default since settings schema 97) at the bottom of the list. + *Use LibreOffice for presentations → PDF* is on; off by default since settings schema 102) at the bottom of the list. While that switch is on and LibreOffice is installed, the renderer leaves the decks out, so LibreOffice takes them. - **Slide model** (`SlideModel.cs`): the deck's size and slides; each slide's background and elements in drawing order (the master's and layout's own shapes first). Elements have a box in their parent's coordinates, a rotation and @@ -2345,6 +2361,10 @@ in the preset library only). Video and audio need FFmpeg. source goes into the ZIP instead. - **Extract audio** copies AAC or ALAC into M4A without an encode (`MediaOptions.CopyAudioWhenPossible`); other sound is encoded to AAC. +- **Same format as the audio** (Convert to, `--to same-audio`; `BuiltInData.SameAsAudio`, #1490) copies a video's sound + track as it is, never encoded: the track marked default, else the first, without pictures, subtitles or data. The + format comes from its codec (`MediaEncoding.CopyTargetFor`): AAC and ALAC → M4A, MP3, FLAC, Opus → OPUS, Vorbis → OGG, + little-endian PCM → WAV (RF64 over 4 GB), anything else (AC-3, E-AC-3, DTS, TrueHD, …) → MKA. - **Merge videos** copies the clips with the concat demuxer only when all share the codec setup (ffprobe's extradata hash), size, pixel format, frame rate, turn and kind of sound; otherwise every clip is fitted into the first clip's frame and encoded, a clip without sound silent for its length. Sound tracks FFmpeg can't decode are skipped: each @@ -3167,7 +3187,7 @@ files); the e-book writers write it out: the document's summary (else its first heading, else the file name) and the language guessed from its text. The edges cost what Unhwp's did (TXT and Markdown 10, HTML 14) and the engine took Unhwp's place in the engine order -(settings schema 95 renames `unhwp` to `hwp-text`), so every route keeps its cost. +(settings schema 100 renames `unhwp` to `hwp-text`), so every route keeps its cost. Unhwp (a native Rust library through NuGet) did this before. It needed the Visual C++ runtime next to Filee.exe and had no Linux or Windows ARM64 build of its own (Filee built one, #236). Measured before it was removed, @@ -3414,6 +3434,9 @@ paths leaving the folder, bombs, entry floods) are final and never retried. Sett | CAB | Filee (`CabReader`: stored, MSZIP, LZX); Quantum and cabinet sets by 7-Zip | — | | LHA / LZH | Filee (`LhaReader`: -lh0-, -lz4-, -lh4- to -lh7-); other methods by 7-Zip | — | | ARJ | Filee (`ArjReader`: methods 0–4); multi-volume archives and other methods by 7-Zip | — | +| GMA (Garry's Mod addon) | Filee: versions 1–3, CRCs checked, an `addon.json` written beside the files | Filee, as gmad does (see below) | +| BSP (Source engine map), its packed files | Filee copies the pakfile lump (a ZIP) out and unpacks it like any ZIP | — | +| VPK (Valve pak) | Filee: versions 1 and 2, `_dir.vpk` with its `_000.vpk` … parts, CRCs checked; a PS Vita `.vpk` (a ZIP) like any ZIP | — | | IMG (raw disk images) | Filee (`DiskImageReader`): GPT, Apple partition map or MBR with extended partitions (`DiskImagePartitions`), a folder `