YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
make screenpipe run on Windows 10 (#1592)
Divanshu Grover79eb3be0599c
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex f27aa84c5..d281f88c5 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -103,29 +103,8 @@ jobs:command: release draft ${{ secrets.CN_APP_SLUG }} --framework tauriapi-key: ${{ secrets.CN_API_KEY }}- check_runner:- runs-on: ubuntu-latest- outputs:- runner_type: ${{ steps.check.outputs.runner_type }}- steps:- - id: check- run: |- # Try to ping self-hosted runner for 2 minutes- timeout=120- start_time=$SECONDS- while [ $(( SECONDS - start_time )) -lt $timeout ]; do- if curl -s "${{ github.api_url }}/repos/${{ github.repository }}/actions/runners" \- -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" | \- jq -e '.runners[] | select(.name | contains("self-hosted")) | select(.status=="online")' > /dev/null; then- echo "runner_type=[self-hosted, Windows, X64]" >> $GITHUB_OUTPUT- exit 0- fi- sleep 10- done- echo "runner_type=windows-latest" >> $GITHUB_OUTPUT-publish-tauri:- needs: [check_commit, draft, check_runner]+ needs: [check_commit, draft]if: github.event_name == 'workflow_dispatch' || needs.check_commit.outputs.should_release == 'true'permissions:contents: write@@ -143,7 +122,7 @@ jobs:target: x86_64-apple-darwintauri-args: "--target x86_64-apple-darwin"os_type: "macos"- - platform: ${{ needs.check_runner.outputs.runner_type }}+ - platform: "windows-2019"args: "--target x86_64-pc-windows-msvc --features mkl"pre-build-args: ""tauri-args: "--target x86_64-pc-windows-msvc"@@ -624,259 +603,8 @@ jobs:api-key: ${{ secrets.CN_API_KEY }}path: ./screenpipe-app-tauri/src-tauri- retry-win:- needs: publish-tauri- if: ${{ always() && contains(needs.publish-tauri.result, 'failure') }}- permissions:- contents: write- strategy:- fail-fast: false- matrix:- include:- - platform: windows-latest- args: "--target x86_64-pc-windows-msvc --features mkl"- pre-build-args: ""- tauri-args: "--target x86_64-pc-windows-msvc"- shell: pwsh- target: x86_64-pc-windows-msvc- os_type: "windows"-- runs-on: ${{ matrix.platform }}- steps:- - uses: actions/checkout@v4- with:- ref: ${{ github.event.inputs.commit_hash || github.ref }}-- - name: Update version in Cargo.toml- if: github.event.inputs.commit_hash && github.event.inputs.version && matrix.platform != 'macos-latest'- shell: pwsh- run: |- $content = Get-Content screenpipe-app-tauri/src-tauri/Cargo.toml- $content = $content -replace '^version = ".*"', ('version = "' + '${{ github.event.inputs.version }}' + '"')- $content | Set-Content screenpipe-app-tauri/src-tauri/Cargo.toml -Force-- - name: Setup Bun- uses: oven-sh/setup-bun@v2- with:- bun-version: 1.1.43-- - name: Setup Node- uses: actions/setup-node@v4- with:- node-version: 20-- - name: Install Rust- if: matrix.os_type == 'windows'- run: |- Invoke-WebRequest https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe -OutFile rustup-init.exe- .\rustup-init.exe -y-- - uses: actions/cache@v4- with:- path: |- ~/.cargo/registry/index/- ~/.cargo/registry/cache/- ~/.cargo/git/db/- target/${{ matrix.target }}/release/deps- target/${{ matrix.target }}/release/build- key: ${{ matrix.platform }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1- restore-keys: |- ${{ runner.os }}-${{ matrix.target }}-cargo-v1--- - name: Cache Pre Build- id: cache-pre-build- uses: actions/cache@v4- with:- path: |- screenpipe-app-tauri/src-tauri/ffmpeg- screenpipe-app-tauri/src-tauri/tesseract-*- screenpipe-app-tauri/node_modules- screenpipe-app-tauri/src-tauri/target- screenpipe-app-tauri/.tauri- screenpipe-app-tauri/src-tauri/WixTools- screenpipe-app-tauri/src-tauri/mkl- # Ollama binaries and libs- screenpipe-app-tauri/src-tauri/ollama-*- screenpipe-app-tauri/src-tauri/lib/ollama- # Swift UI monitoring binaries- screenpipe-app-tauri/src-tauri/ui_monitor-*- # FFmpeg downloads- screenpipe-app-tauri/src-tauri/ffmpeg-*- # Platform specific bins- screenpipe-app-tauri/src-tauri/bun-*- screenpipe-app-tauri/src-tauri/screenpipe-*- key: ${{ matrix.platform }}-${{ matrix.target }}-pre-build-${{ hashFiles('**/Cargo.lock', '**/bun.lockb') }}- restore-keys: |- ${{ matrix.platform }}-${{ matrix.target }}-pre-build--- - name: Install frontend dependencies- working-directory: ./screenpipe-app-tauri- run: bun install-- - name: Install vcpkg- if: matrix.os_type == 'windows'- uses: lukka/run-vcpkg@v11- with:- vcpkgGitCommitId: "7adc2e4d49e8d0efc07a369079faa6bc3dbb90f3"-- - name: Set up MSVC- if: matrix.os_type == 'windows'- uses: ilammy/msvc-dev-cmd@v1-- - name: Install 7zip- if: matrix.os_type == 'windows'- shell: powershell- run: |- $7zipUrl = "https://7-zip.org/a/7z2301-x64.exe"- $7zipInstaller = "7z-installer.exe"- Invoke-WebRequest -Uri $7zipUrl -OutFile $7zipInstaller- Start-Process -FilePath .\$7zipInstaller -Args "/S" -Wait- Remove-Item $7zipInstaller- echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append- & "C:\Program Files\7-Zip\7z.exe" i-- - name: Cache LLVM- if: matrix.os_type == 'windows'- id: cache-llvm- uses: actions/cache@v4- with:- path: |- C:\Program Files\LLVM- ${{ runner.temp }}\llvm- key: llvm-10.0-windows-${{ hashFiles('.github/workflows/release-app.yml') }}-- - name: Install LLVM and Clang- if: matrix.os_type == 'windows' && steps.cache-llvm.outputs.cache-hit != 'true'- uses: KyleMayes/install-llvm-action@v2- with:- version: "10.0"- directory: "C:\\Program Files\\LLVM"-- - name: Run pre_build.js- env:- SKIP_SCREENPIPE_SETUP: true- run: bun ./scripts/pre_build.js ${{ matrix.pre-build-args }}- working-directory: ./screenpipe-app-tauri-- - name: Build CLI on Windows- if: matrix.os_type == 'windows'- shell: pwsh- env:- CARGO_PROFILE_RELEASE_STRIP: symbols- CARGO_PROFILE_RELEASE_PANIC: abort- CARGO_PROFILE_RELEASE_INCREMENTAL: false- run: cargo build --release -p screenpipe-server ${{ matrix.args }}-- # Run pre build again to copy the CLI into app- - name: Run pre_build.js- run: |- bun ./scripts/pre_build.js ${{ matrix.pre-build-args }}- working-directory: ./screenpipe-app-tauri-- - name: Install pip- if: matrix.os_type == 'windows'- uses: actions/setup-python@v5- with:- python-version: "3.13"-- - name: Copy library for MKL- if: matrix.os_type == 'windows'- shell: pwsh- run: |- # Create target directory- $mkl_dir = "screenpipe-app-tauri/src-tauri/mkl"- New-Item -ItemType Directory -Force -Path $mkl_dir | Out-Null-- # Install and copy Intel OpenMP- python -m pip install --upgrade pip- $temp_dir = "temp_omp"- New-Item -ItemType Directory -Force -Path $temp_dir | Out-Null-- Write-Host "Installing Intel OpenMP..."- python -m pip install intel-openmp --target $temp_dir-- Write-Host "Copying DLL files..."- Get-ChildItem -Path $temp_dir -Recurse -Filter "*.dll" | ForEach-Object {- Write-Host "Copying $_"- Copy-Item $_.FullName -Destination $mkl_dir -Force- }-- # Verify DLLs were copied- $dll_count = (Get-ChildItem -Path $mkl_dir -Filter "*.dll").Count- Write-Host "Found $dll_count DLLs in target directory"- if ($dll_count -eq 0) {- throw "No DLLs found in target directory!"- }-- Remove-Item -Path $temp_dir -Recurse -Force-- - name: Copy library for vcredist- if: matrix.os_type == 'windows'- shell: powershell- run: |- # Create target directory- $vcredist_dir = "screenpipe-app-tauri/src-tauri/"- New-Item -ItemType Directory -Force -Path $vcredist_dir | Out-Null-- # Install and copy VcRedist- Set-ExecutionPolicy Bypass -Scope Process -Force- [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072- iex ((New-Object System.Net.WebClient).DownloadString('https://vcredist.com/install.ps1'))-- Write-Host "Copying DLL files..."- Copy-Item C:\Windows\System32\vcruntime140.dll -Destination $vcredist_dir -Force-- # Verify DLLs were copied- $dll_count = (Get-ChildItem -Path $vcredist_dir -Filter "*.dll").Count- Write-Host "Found $dll_count DLLs in target directory"- if ($dll_count -eq 0) {- throw "No DLLs found in target directory!"- }-- - name: Build- uses: tauri-apps/[email protected]- env:- # for updater- TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}- TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}- # for release- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- # for macos signing- APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}- APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}- APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}- APPLE_ID: ${{ secrets.APPLE_ID }}- APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}- APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}- # https://tauri.app/v1/guides/distribution/sign-macos- CI: true- # Optimize for build speed on Windows- CARGO_PROFILE_RELEASE_LTO: ${{ matrix.os_type == 'windows' && 'thin' || 'false' }}- CARGO_PROFILE_RELEASE_OPT_LEVEL: ${{ matrix.os_type == 'windows' && '2' || '3' }}- CARGO_PROFILE_RELEASE_CODEGEN_UNITS: ${{ matrix.os_type == 'windows' && '16' || '16' }}- # Enable incremental compilation for Windows- CARGO_INCREMENTAL: ${{ matrix.os_type == 'windows' && 'true' || 'false' }}- # Windows specific optimizations- CARGO_PROFILE_RELEASE_STRIP: ${{ matrix.os_type == 'windows' && 'symbols' || 'none' }}- CARGO_PROFILE_RELEASE_PANIC: ${{ matrix.os_type == 'windows' && 'abort' || 'unwind' }}- CARGO_PROFILE_RELEASE_INCREMENTAL: ${{ matrix.os_type == 'windows' && 'false' || 'true' }}- RUSTFLAGS: ${{ matrix.os_type == 'windows' && '-C target-feature=+crt-static -C link-arg=/LTCG' || '' }}- VCPKG_STATIC_LINKAGE: "true"- KNF_STATIC_CRT: ${{ matrix.os_type == 'windows' && '1' || '' }}- with:- args: ${{ matrix.tauri-args }}- projectPath: "./screenpipe-app-tauri"- tauriScript: bunx tauri -v-- - name: Upload Assets to CrabNebula Cloud- uses: crabnebula-dev/[email protected]- with:- command: release upload ${{ secrets.CN_APP_SLUG }} --framework tauri- api-key: ${{ secrets.CN_API_KEY }}- path: ./screenpipe-app-tauri/src-tauri-publish-release:- needs: [check_commit, publish-tauri, retry-win]+ needs: [check_commit, publish-tauri]if: needs.check_commit.outputs.should_publish == 'true' && (needs.publish-tauri.result == 'success' || needs.retry-win.result == 'success')runs-on: ubuntu-lateststeps:diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.ymlindex b30f4e14b..95dc783cd 100644--- a/.github/workflows/release-cli.yml+++ b/.github/workflows/release-cli.yml@@ -94,7 +94,7 @@ jobs:path: screenpipe-*.tar.gzbuild-windows:- runs-on: windows-latest+ runs-on: windows-2019steps:- name: Checkout codeuses: actions/checkout@v4diff --git a/.github/workflows/windows-integration-test.yml b/.github/workflows/windows-integration-test.ymlindex ca25583fb..7235a6563 100644--- a/.github/workflows/windows-integration-test.yml+++ b/.github/workflows/windows-integration-test.yml@@ -8,7 +8,7 @@ on:jobs:test-windows:- runs-on: windows-latest+ runs-on: windows-2019steps:- uses: actions/checkout@v4@@ -59,10 +59,6 @@ jobs:Scream\Install\helpers\devcon-x64.exe install Scream\Install\driver\x64\Scream.inf *Screamtimeout-minutes: 5- - name: Start Windows Audio Service- shell: powershell- run: net start audiosrv-- name: Build CLIrun: cargo build --release