The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
feat(windows): releases go to the Microsoft Store as an .msix bundle
Jareer54c6a5d98cd5
diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.ymlindex 768b2343..fc1e5b15 100644--- a/.github/workflows/build-app.yml+++ b/.github/workflows/build-app.yml@@ -8,6 +8,7 @@ name: Build app# macOS arm64 (Apple silicon) x86_64 (Intel) -> Concat-*.dmg# Linux x86_64 aarch64 -> Concat-*.deb, .rpm, .AppImage, .pkg.tar.zst# Windows x86_64 aarch64 -> Concat-*-setup.exe, .msi+# (+ .msix for the Store, apart)## Installers and binaries only: the program is not shipped as an archive# of a folder to unpack, so what a person downloads is what they run.@@ -666,6 +667,12 @@ jobs:VERSION: ${{ steps.version.outputs.version }}CERT_PFX: ${{ secrets.WINDOWS_CERTIFICATE_PFX }}CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}+ # The identity Partner Center reserved for the app. Unset, no+ # .msix is made: a fork has no Store listing to make one for.+ MSSTORE_IDENTITY_NAME: ${{ vars.MSSTORE_IDENTITY_NAME }}+ MSSTORE_PUBLISHER: ${{ vars.MSSTORE_PUBLISHER }}+ MSSTORE_PUBLISHER_DISPLAY_NAME: ${{ vars.MSSTORE_PUBLISHER_DISPLAY_NAME }}+ MSSTORE_DISPLAY_NAME: ${{ vars.MSSTORE_DISPLAY_NAME || 'Concat' }}run: |$ErrorActionPreference = "Stop"$name = "Concat-$env:VERSION-windows-${{ matrix.arch }}"@@ -717,6 +724,38 @@ jobs:if (-not (Test-Path "stage\$name.msi")) { throw "stage\$name.msi is not there" }Sign "stage\$name.msi"if ($pfx) { Remove-Item -Force $pfx }+ # And the .msix, for the Microsoft Store, from the same folder with+ # the manifest and logos beside it. See assets/windows/AppxManifest.xml.+ # Into store/, not stage/: the Store signs it and takes it, and an+ # unsigned package in the release is one nobody can install.+ if ($env:MSSTORE_IDENTITY_NAME -and $env:MSSTORE_PUBLISHER) {+ $makeappx = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\makeappx.exe" |+ Sort-Object FullName -Descending | Select-Object -First 1+ if (-not $makeappx) { throw "makeappx.exe is not in the Windows SDK" }+ $pack = "$env:RUNNER_TEMP\msix"+ Copy-Item -Recurse "stage\$name" $pack+ Copy-Item -Recurse assets\windows\store "$pack\Assets"+ # The Store's four-part version, whose last part must be 0.+ $fill = [ordered]@{+ "{IdentityName}" = $env:MSSTORE_IDENTITY_NAME+ "{Publisher}" = $env:MSSTORE_PUBLISHER+ "{PublisherDisplayName}" = $env:MSSTORE_PUBLISHER_DISPLAY_NAME+ "{DisplayName}" = $env:MSSTORE_DISPLAY_NAME+ "{Version}" = "$env:VERSION.0"+ "{Arch}" = "${{ matrix.wix }}"+ }+ $manifest = Get-Content -Raw assets\windows\AppxManifest.xml+ foreach ($word in $fill.Keys) {+ $manifest = $manifest.Replace($word, [Security.SecurityElement]::Escape($fill[$word]))+ }+ Set-Content -Encoding utf8 -NoNewline "$pack\AppxManifest.xml" $manifest+ New-Item -ItemType Directory -Force store | Out-Null+ & $makeappx.FullName pack /o /d $pack /p "store\$name.msix"+ if ($LASTEXITCODE -ne 0) { throw "makeappx failed with $LASTEXITCODE" }+ Remove-Item -Recurse -Force $pack+ } else {+ Write-Host "No Store identity in the repository's variables: no .msix."+ }# The folder itself is not published: the two installers are.Remove-Item -Recurse -Force "stage\$name"@@ -725,3 +764,12 @@ jobs:name: Concat-${{ matrix.platform }}-${{ matrix.arch }}path: stage/*if-no-files-found: error++ # The Store's package, apart from the release's bundles: release.yml+ # bundles the two architectures and submits them.+ - uses: actions/upload-artifact@v7+ if: matrix.platform == 'windows' && hashFiles('store/*.msix') != ''+ with:+ name: Store-windows-${{ matrix.arch }}+ path: store/*.msix+ if-no-files-found: errordiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 63db8ce6..b8a18644 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -15,6 +15,10 @@ name: Release# FFmpeg runtime libraries beside the binary; the Android .apk is signed# with the repository's key, and the iOS .ipa is signed by the tester on# the way onto the phone. Nothing is built until CI has passed on the tag.+#+# A release that is not a pre-release also goes to the Microsoft Store,+# once it is published here, when the repository is set up for it; see+# the store job.on:push:tags: ["v*"]@@ -80,9 +84,11 @@ jobs:permissions:contents: writesteps:+ # The bundles only: the Store's packages are the store job's.- uses: actions/download-artifact@v8with:path: bundles+ pattern: Concat-*merge-multiple: true# The tree the release is cut from: the notes are read out of its@@ -134,3 +140,66 @@ jobs:body_path: ${{ runner.temp }}/notes.mdfail_on_unmatched_files: truefiles: bundles/*++ # The Windows packages to the Microsoft Store: the two .msix files the+ # build made, as one .msixbundle, submitted to the app's listing with+ # Microsoft's msstore CLI and committed for certification. The Store+ # signs the package and keeps installs up to date.+ #+ # Pre-releases stay here: the Store's version is the release's number,+ # and v0.3.0-beta.1 and v0.3.0 would both be 0.3.0.0.+ #+ # Needs, from Partner Center, repository variables:+ # MSSTORE_PRODUCT_ID the app's Store ID, e.g. 9NBLGGH4R315+ # MSSTORE_IDENTITY_NAME Package/Identity/Name+ # MSSTORE_PUBLISHER Package/Identity/Publisher, CN=...+ # MSSTORE_PUBLISHER_DISPLAY_NAME Package/Properties/PublisherDisplayName+ # MSSTORE_DISPLAY_NAME the reserved name, if not Concat+ # and secrets, from the Entra ID app associated with the account:+ # MSSTORE_TENANT_ID, MSSTORE_SELLER_ID, MSSTORE_CLIENT_ID,+ # MSSTORE_CLIENT_SECRET+ # Without the product ID the job is skipped, as it is on a fork.+ store:+ name: Microsoft Store+ needs: [check, publish]+ if: ${{ !contains(needs.check.outputs.tag, '-') && vars.MSSTORE_PRODUCT_ID != '' }}+ runs-on: windows-2022+ steps:+ - uses: actions/download-artifact@v8+ with:+ path: store+ pattern: Store-windows-*+ merge-multiple: true++ - name: Bundle+ shell: pwsh+ env:+ VERSION: ${{ needs.check.outputs.version }}+ run: |+ $ErrorActionPreference = "Stop"+ $makeappx = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\makeappx.exe" |+ Sort-Object FullName -Descending | Select-Object -First 1+ if (-not $makeappx) { throw "makeappx.exe is not in the Windows SDK" }+ $packages = @(Get-ChildItem store\*.msix)+ if ($packages.Count -ne 2) { throw "expected the x86_64 and aarch64 .msix, found $($packages.Count)" }+ & $makeappx.FullName bundle /o /bv "$env:VERSION.0" /d store /p "Concat-$env:VERSION-windows.msixbundle"+ if ($LASTEXITCODE -ne 0) { throw "makeappx failed with $LASTEXITCODE" }++ - uses: microsoft/setup-msstore-cli@v1++ - name: Submit+ shell: pwsh+ env:+ VERSION: ${{ needs.check.outputs.version }}+ PRODUCT_ID: ${{ vars.MSSTORE_PRODUCT_ID }}+ TENANT_ID: ${{ secrets.MSSTORE_TENANT_ID }}+ SELLER_ID: ${{ secrets.MSSTORE_SELLER_ID }}+ CLIENT_ID: ${{ secrets.MSSTORE_CLIENT_ID }}+ CLIENT_SECRET: ${{ secrets.MSSTORE_CLIENT_SECRET }}+ run: |+ $ErrorActionPreference = "Stop"+ msstore reconfigure --tenantId $env:TENANT_ID --sellerId $env:SELLER_ID `+ --clientId $env:CLIENT_ID --clientSecret $env:CLIENT_SECRET+ if ($LASTEXITCODE -ne 0) { throw "msstore could not sign in" }+ msstore publish "Concat-$env:VERSION-windows.msixbundle" -id $env:PRODUCT_ID+ if ($LASTEXITCODE -ne 0) { throw "msstore publish failed with $LASTEXITCODE" }diff --git a/assets/windows/AppxManifest.xml b/assets/windows/AppxManifest.xmlnew file mode 100644index 00000000..8dd38116--- /dev/null+++ b/assets/windows/AppxManifest.xml@@ -0,0 +1,47 @@+<?xml version="1.0" encoding="utf-8"?>+<!--+ Concat's MSIX manifest, for the Microsoft Store.++ build-app.yml fills the {Braced} words in and packs the staged folder+ (the one the .exe and .msi are made of) with this beside it and the+ logos under store/ as Assets. The identity is the one Partner Center+ reserved for the app, read from the repository's variables; see the+ Store job in release.yml. The Store signs the package itself, so it is+ not signed here, and it goes to the Store only - not to the release.++ A desktop program in a package: full trust, the files as they are. The+ Store keeps it up to date, so the app's own updater stands down when it+ finds itself installed under WindowsApps (see concat-host's updates.rs).+-->+<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"+ xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"+ xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"+ IgnorableNamespaces="uap rescap">+ <Identity Name="{IdentityName}"+ Publisher="{Publisher}"+ Version="{Version}"+ ProcessorArchitecture="{Arch}" />+ <Properties>+ <DisplayName>{DisplayName}</DisplayName>+ <PublisherDisplayName>{PublisherDisplayName}</PublisherDisplayName>+ <Logo>Assets\StoreLogo.png</Logo>+ </Properties>+ <Dependencies>+ <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.26100.0" />+ </Dependencies>+ <Resources>+ <Resource Language="en-us" />+ </Resources>+ <Applications>+ <Application Id="Concat" Executable="concat.exe" EntryPoint="Windows.FullTrustApplication">+ <uap:VisualElements DisplayName="{DisplayName}"+ Description="Video editor"+ BackgroundColor="transparent"+ Square150x150Logo="Assets\Square150x150Logo.png"+ Square44x44Logo="Assets\Square44x44Logo.png" />+ </Application>+ </Applications>+ <Capabilities>+ <rescap:Capability Name="runFullTrust" />+ </Capabilities>+</Package>diff --git a/assets/windows/store/Square150x150Logo.png b/assets/windows/store/Square150x150Logo.pngnew file mode 100644index 00000000..25a8e81cBinary files /dev/null and b/assets/windows/store/Square150x150Logo.png differdiff --git a/assets/windows/store/Square44x44Logo.png b/assets/windows/store/Square44x44Logo.pngnew file mode 100644index 00000000..e43dd528Binary files /dev/null and b/assets/windows/store/Square44x44Logo.png differdiff --git a/assets/windows/store/StoreLogo.png b/assets/windows/store/StoreLogo.pngnew file mode 100644index 00000000..f7eab3baBinary files /dev/null and b/assets/windows/store/StoreLogo.png differdiff --git a/src/crates/concat-host/src/updates.rs b/src/crates/concat-host/src/updates.rsindex 6e7ebd5e..0a00e5e7 100644--- a/src/crates/concat-host/src/updates.rs+++ b/src/crates/concat-host/src/updates.rs@@ -240,7 +240,8 @@ impl PackageKind {pub enum Fixed {/// A Flatpak: Flatpak keeps it up to date.Flatpak,- /// A phone: its store keeps it up to date.+ /// A phone, or the Microsoft Store's package: the store keeps it up+ /// to date.Store,/// Not installed from any package this knows - a build from the tree,/// a distribution's own package.@@ -259,6 +260,7 @@ pub fn installed_as() -> Result<PackageKind, Fixed> {.ok().and_then(|exe| exe.parent().map(Path::to_path_buf));windows_kind(+ dir.as_deref().is_some_and(in_windows_apps),dir.as_deref().is_some_and(|dir| dir.join("unins000.exe").is_file()),dir.as_deref().is_some_and(in_program_files),@@ -277,13 +279,17 @@ pub fn installed_as() -> Result<PackageKind, Fixed> {})}-/// A Windows install, from what sits beside the executable. The setup-/// leaves its uninstaller there; the .msi leaves none and always installs-/// under Program Files. Anything else - the portable zip, a build from the-/// tree - came from no installer, and an update from here would put a-/// second copy beside it rather than replace it.-fn windows_kind(uninstaller: bool, program_files: bool) -> Result<PackageKind, Fixed> {- if uninstaller {+/// A Windows install, from where the executable is and what sits beside+/// it. The Store's package lives under WindowsApps, which is itself under+/// Program Files, and the Store updates it. The setup leaves its+/// uninstaller beside the program; the .msi leaves none and always+/// installs under Program Files. Anything else - the portable zip, a build+/// from the tree - came from no installer, and an update from here would+/// put a second copy beside it rather than replace it.+fn windows_kind(store: bool, uninstaller: bool, program_files: bool) -> Result<PackageKind, Fixed> {+ if store {+ Err(Fixed::Store)+ } else if uninstaller {Ok(PackageKind::Setup)} else if program_files {Ok(PackageKind::Msi)@@ -292,6 +298,13 @@ fn windows_kind(uninstaller: bool, program_files: bool) -> Result<PackageKind, F}}+/// Whether `dir` is inside a packaged app's folder: Windows installs every+/// .msix under a `WindowsApps` folder, wherever the volume.+fn in_windows_apps(dir: &Path) -> bool {+ dir.components()+ .any(|part| part.as_os_str().eq_ignore_ascii_case("WindowsApps"))+}+/// Whether `dir` is under one of Windows' Program Files folders.fn in_program_files(dir: &Path) -> bool {["ProgramFiles", "ProgramW6432", "ProgramFiles(x86)"]@@ -828,13 +841,24 @@ mod tests {linux_kind(false, false, false, false, false),Err(Fixed::NotFromPackage));- // The setup's uninstaller wins even under Program Files, where an- // administrator's run of the setup also puts it; the .msi is the- // Program Files install without one; the portable zip is neither.- assert_eq!(windows_kind(true, false), Ok(PackageKind::Setup));- assert_eq!(windows_kind(true, true), Ok(PackageKind::Setup));- assert_eq!(windows_kind(false, true), Ok(PackageKind::Msi));- assert_eq!(windows_kind(false, false), Err(Fixed::NotFromPackage));+ // The Store's package is the Store's, though it sits under Program+ // Files. The setup's uninstaller wins even under Program Files,+ // where an administrator's run of the setup also puts it; the .msi+ // is the Program Files install without one; the portable zip is+ // neither.+ assert_eq!(windows_kind(true, false, true), Err(Fixed::Store));+ assert_eq!(windows_kind(false, true, false), Ok(PackageKind::Setup));+ assert_eq!(windows_kind(false, true, true), Ok(PackageKind::Setup));+ assert_eq!(windows_kind(false, false, true), Ok(PackageKind::Msi));+ assert_eq!(+ windows_kind(false, false, false),+ Err(Fixed::NotFromPackage)+ );+ assert!(in_windows_apps(Path::new(+ "C:/Program Files/WindowsApps/Concat_0.2.6.0_x64__abc"+ )));+ assert!(in_windows_apps(Path::new("D:/windowsapps/Concat")));+ assert!(!in_windows_apps(Path::new("C:/Program Files/Concat")));for kind in [PackageKind::Dmg,PackageKind::Setup,