screenpipe icon indicating copy to clipboard operation
screenpipe copied to clipboard

Successfully built Macos ScreenPipe app here

Open 0smboy opened this issue 1 year ago • 25 comments

this gist

0smboy avatar Sep 30 '24 10:09 0smboy

no access to workspace, news doesn't work

RobDiek avatar Sep 30 '24 11:09 RobDiek

@RobDiek try again

0smboy avatar Sep 30 '24 12:09 0smboy

awesome, thank you. :) currently trying out the script

RobDiek avatar Sep 30 '24 12:09 RobDiek

had to do a bit of manual work to get this to work;

  1. bun isn't installed - had to install it manually by running curl -fsSL https://bun.sh/install | bash
  2. installed Xcode command line tools just for being safe
  3. under "ok lets build it" there has to be a "cd screenpipe" first
  4. "bun i" misses a sudo before it

still getting error

error: failed to run custom build command for screenpipe-app v0.2.79 (/Users/user/Desktop/screenpipe/screenpipe-app-tauri/src-tauri)

Caused by: process didn't exit successfully: /Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-b07c37cc2f7b5503/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=TAURI_CONFIG cargo:rerun-if-changed=tauri.conf.json cargo:rustc-check-cfg=cfg(desktop) cargo:rustc-cfg=desktop cargo:rustc-check-cfg=cfg(mobile) cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_APP_NAME=pe cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_PREFIX=screenpi cargo:rustc-check-cfg=cfg(dev) cargo:PERMISSION_FILES_PATH=/Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-e160e3b75eb0e726/out/app-manifest/app-permission-files cargo:rerun-if-changed=capabilities cargo:rustc-env=TAURI_ENV_TARGET_TRIPLE=aarch64-apple-darwin resource path screenpipe-aarch64-apple-darwin doesn't exist warning: build failed, waiting for other jobs to finish... Error failed to build app: failed to build app user@192-168-2-186 screenpipe-app-tauri %

RobDiek avatar Sep 30 '24 13:09 RobDiek

when just running the script I get this

se -h to get full help or, even better, run 'man ffmpeg' ./build_screenpipe.sh: line 63: ]: command not found ./build_screenpipe.sh: line 64: syntax error near unexpected token }' ./build_screenpipe.sh: line 64: }'

RobDiek avatar Sep 30 '24 13:09 RobDiek

can't you don't just drop a link to the dmg / pkg?

RobDiek avatar Sep 30 '24 13:09 RobDiek

when just running the script I get this

se -h to get full help or, even better, run 'man ffmpeg' ./build_screenpipe.sh: line 63: ]: command not found ./build_screenpipe.sh: line 64: syntax error near unexpected token }' ./build_screenpipe.sh: line 64: }'

Same error here

akeslo avatar Sep 30 '24 13:09 akeslo

had to do a bit of manual work to get this to work;

  1. bun isn't installed - had to install it manually by running curl -fsSL https://bun.sh/install | bash
  2. installed Xcode command line tools just for being safe
  3. under "ok lets build it" there has to be a "cd screenpipe" first
  4. "bun i" misses a sudo before it

still getting error

error: failed to run custom build command for screenpipe-app v0.2.79 (/Users/user/Desktop/screenpipe/screenpipe-app-tauri/src-tauri)

Caused by: process didn't exit successfully: /Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-b07c37cc2f7b5503/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=TAURI_CONFIG cargo:rerun-if-changed=tauri.conf.json cargo:rustc-check-cfg=cfg(desktop) cargo:rustc-cfg=desktop cargo:rustc-check-cfg=cfg(mobile) cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_APP_NAME=pe cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_PREFIX=screenpi cargo:rustc-check-cfg=cfg(dev) cargo:PERMISSION_FILES_PATH=/Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-e160e3b75eb0e726/out/app-manifest/app-permission-files cargo:rerun-if-changed=capabilities cargo:rustc-env=TAURI_ENV_TARGET_TRIPLE=aarch64-apple-darwin resource path screenpipe-aarch64-apple-darwin doesn't exist warning: build failed, waiting for other jobs to finish... Error failed to build app: failed to build app user@192-168-2-186 screenpipe-app-tauri %

Did you follow the steps? First, you need to install the screenpipe CLI.

cd screenpipe
cargo build --release --features metal

Then create the link:

ln -s ./target/release/screenpipe screenpipe-app-tauri/src-tauri/screenpipe-aarch64-apple-darwin

0smboy avatar Sep 30 '24 13:09 0smboy

Hi, no, I didn't. I thought it's a "one for all" installation script, must have misinterpreted. Just did the steps and trying it again, thanks! :)

RobDiek avatar Sep 30 '24 13:09 RobDiek

hmm strange, still gives me an error

Compiling mac-notification-sys v0.6.2 Compiling screenpipe-app v0.2.79 (/Users/robindieker/Desktop/spbuild/screenpipe/screenpipe-app-tauri/src-tauri) Compiling sentry v0.34.0 Compiling tauri-plugin-autostart v2.0.0-rc.1 Compiling fix-path-env v0.0.0 (https://github.com/tauri-apps/fix-path-env-rs#8481725b) Compiling tauri-plugin-cli v2.0.0-rc.1 Compiling sysinfo v0.29.11 Compiling tauri-plugin-process v2.0.0-rc.1 error: failed to run custom build command for screenpipe-app v0.2.79 (/Users/robindieker/Desktop/spbuild/screenpipe/screenpipe-app-tauri/src-tauri)

Caused by: process didn't exit successfully: /Users/robindieker/Desktop/spbuild/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-b07c37cc2f7b5503/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=TAURI_CONFIG cargo:rerun-if-changed=tauri.conf.json cargo:rustc-check-cfg=cfg(desktop) cargo:rustc-cfg=desktop cargo:rustc-check-cfg=cfg(mobile) cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_APP_NAME=pe cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_PREFIX=screenpi cargo:rustc-check-cfg=cfg(dev) failed to read plugin permissions: failed to read file: No such file or directory (os error 2) warning: build failed, waiting for other jobs to finish... Error failed to build app: failed to build app

will dig up and try to see which file / directory he is missing.

RobDiek avatar Sep 30 '24 13:09 RobDiek

@RobDiek @akeslo i update the script, you can just run the script.

0smboy avatar Sep 30 '24 15:09 0smboy

had to do a bit of manual work to get this to work;

  1. bun isn't installed - had to install it manually by running curl -fsSL https://bun.sh/install | bash
  2. installed Xcode command line tools just for being safe
  3. under "ok lets build it" there has to be a "cd screenpipe" first
  4. "bun i" misses a sudo before it

still getting error error: failed to run custom build command for screenpipe-app v0.2.79 (/Users/user/Desktop/screenpipe/screenpipe-app-tauri/src-tauri) Caused by: process didn't exit successfully: /Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-b07c37cc2f7b5503/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=TAURI_CONFIG cargo:rerun-if-changed=tauri.conf.json cargo:rustc-check-cfg=cfg(desktop) cargo:rustc-cfg=desktop cargo:rustc-check-cfg=cfg(mobile) cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_APP_NAME=pe cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_PREFIX=screenpi cargo:rustc-check-cfg=cfg(dev) cargo:PERMISSION_FILES_PATH=/Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-e160e3b75eb0e726/out/app-manifest/app-permission-files cargo:rerun-if-changed=capabilities cargo:rustc-env=TAURI_ENV_TARGET_TRIPLE=aarch64-apple-darwin resource path screenpipe-aarch64-apple-darwin doesn't exist warning: build failed, waiting for other jobs to finish... Error failed to build app: failed to build app user@192-168-2-186 screenpipe-app-tauri %

Did you follow the steps? First, you need to install the screenpipe CLI.

cd screenpipe
cargo build --release --features metal

Then create the link:

ln -s ./target/release/screenpipe screenpipe-app-tauri/src-tauri/screenpipe-aarch64-apple-darwin

Do you still need to run this @0smboy ? Maybe this is my issue...cargo build gives me a build error. error: failed to run custom build command for libsamplerate-sys v0.1.12

akeslo avatar Sep 30 '24 15:09 akeslo

had to do a bit of manual work to get this to work;

  1. bun isn't installed - had to install it manually by running curl -fsSL https://bun.sh/install | bash
  2. installed Xcode command line tools just for being safe
  3. under "ok lets build it" there has to be a "cd screenpipe" first
  4. "bun i" misses a sudo before it

still getting error error: failed to run custom build command for screenpipe-app v0.2.79 (/Users/user/Desktop/screenpipe/screenpipe-app-tauri/src-tauri) Caused by: process didn't exit successfully: /Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-b07c37cc2f7b5503/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=TAURI_CONFIG cargo:rerun-if-changed=tauri.conf.json cargo:rustc-check-cfg=cfg(desktop) cargo:rustc-cfg=desktop cargo:rustc-check-cfg=cfg(mobile) cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_APP_NAME=pe cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_PREFIX=screenpi cargo:rustc-check-cfg=cfg(dev) cargo:PERMISSION_FILES_PATH=/Users/robindieker/Desktop/screenpipe/screenpipe-app-tauri/src-tauri/target/release/build/screenpipe-app-e160e3b75eb0e726/out/app-manifest/app-permission-files cargo:rerun-if-changed=capabilities cargo:rustc-env=TAURI_ENV_TARGET_TRIPLE=aarch64-apple-darwin resource path screenpipe-aarch64-apple-darwin doesn't exist warning: build failed, waiting for other jobs to finish... Error failed to build app: failed to build app user@192-168-2-186 screenpipe-app-tauri %

Did you follow the steps? First, you need to install the screenpipe CLI.

cd screenpipe
cargo build --release --features metal

Then create the link:

ln -s ./target/release/screenpipe screenpipe-app-tauri/src-tauri/screenpipe-aarch64-apple-darwin

Do you still need to run this @0smboy ? Maybe this is my issue...cargo build gives me a build error. error: failed to run custom build command for libsamplerate-sys v0.1.12

maybe you should install xcode- select first

xcode-select --install

0smboy avatar Sep 30 '24 15:09 0smboy

hey this shouldn't be that hard, check this:

https://github.com/mediar-ai/screenpipe/tree/main/screenpipe-app-tauri

louis030195 avatar Sep 30 '24 17:09 louis030195

@louis030195

I am just struggling a bit letting the app access the cli, currently I have to manually start the cli, but then it works until I make any changes to the config.

Is this intended? I just followed the Readme and ensured that all dependencies are resolved.

dmnkf avatar Sep 30 '24 18:09 dmnkf

@dmnkf whats the error?

louis030195 avatar Sep 30 '24 21:09 louis030195

Both the shell script and the "getting started locally" instructions built and launch but the app shows status is red with video and audio in error. I confirmed the app has Screen and System Audio Recording permissions and restarted.

I tried manually starting the screenpipe backend but I see these error logs:

ERROR: dyld[79274]: Library not loaded: @rpath/../Frameworks/libscreenpipe_arm64.dylib
ERROR:   Referenced from: <73E3AAE5-DDA9-3F46-B0F9-EDB916F3A16C> /Applications/screenpipe.app/Contents/MacOS/screenpipe
ERROR:   Reason: no LC_RPATH's found

torablien avatar Sep 30 '24 21:09 torablien

hey this shouldn't be that hard, check this:

https://github.com/mediar-ai/screenpipe/tree/main/screenpipe-app-tauri

This did it for me, thanks!

akeslo avatar Oct 01 '24 00:10 akeslo

Successfully built screenpipe CLI and app (with only minor personal setup issues). Followed the getting started instructions including for the screenpipe-app-tauri as @louis030195 mentioned. Update to docs in https://github.com/mediar-ai/screenpipe/pull/390

Hopefully this works for everyone, docs can be updated to be clear, and this issue can be resolved. 😃

Glavin001 avatar Oct 01 '24 05:10 Glavin001

Update: I just realized I had an old process of screenpipe CLI running when I started the desktop app. After killing the CLI process and restarting the desktop app, the app remains "status 🔴 " until I start the CLI process again. Without manually starting the CLI process, using expert only stop then start prints an error to recorder logs and does not appear to work:

image

Same error as @torablien . Did you ever figure out the issue?

@louis030195 @m13v : Is the expectation we must manually run screenpipe CLI in addition to starting desktop app? Therefore working as expected. Or is this error shown to @torablien and I in the screenshot an actual problem? Thanks!

Glavin001 avatar Oct 01 '24 05:10 Glavin001

Finished `release` profile [optimized] target(s) in 1m 21s

script fails at `chmod: ./target/release/screenpipe: No such file or directory`

pannous avatar Oct 01 '24 13:10 pannous

Both the shell script and the "getting started locally" instructions built and launch but the app shows status is red with video and audio in error. I confirmed the app has Screen and System Audio Recording permissions and restarted.

I tried manually starting the screenpipe backend but I see these error logs:

ERROR: dyld[79274]: Library not loaded: @rpath/../Frameworks/libscreenpipe_arm64.dylib
ERROR:   Referenced from: <73E3AAE5-DDA9-3F46-B0F9-EDB916F3A16C> /Applications/screenpipe.app/Contents/MacOS/screenpipe
ERROR:   Reason: no LC_RPATH's found

This exact same error also occurs for me! Anyone managed to fix?

XInTheDark avatar Oct 01 '24 14:10 XInTheDark

I fixed it manually by running

install_name_tool -add_rpath @executable_path/../Frameworks /Applications/screenpipe.app/Contents/MacOS/screenpipe

I noticed that the screenpipe-app has the proper links

➜  MacOS otool -l ./screenpipe-app | grep -A2 LC_RPATH
          cmd LC_RPATH
      cmdsize 48
         path @executable_path/../Frameworks (offset 12)

I am guessing it has something to do with the fact that we build screenpipe separately and the pre-install script copies it over. Not really sure though, OSX builds and deployable binaries is a little beyond me (already deeply relying on chatgpt here)

Scott-Meyer avatar Oct 01 '24 16:10 Scott-Meyer

I fixed it manually by running

install_name_tool -add_rpath @executable_path/../Frameworks /Applications/screenpipe.app/Contents/MacOS/screenpipe

I noticed that the screenpipe-app has the proper links

➜  MacOS otool -l ./screenpipe-app | grep -A2 LC_RPATH
          cmd LC_RPATH
      cmdsize 48
         path @executable_path/../Frameworks (offset 12)

I am guessing it has something to do with the fact that we build screenpipe separately and the pre-install script copies it over. Not really sure though, OSX builds and deployable binaries is a little beyond me (already deeply relying on chatgpt here)

This solved my issue!

kacper-serewis avatar Oct 01 '24 16:10 kacper-serewis

if you guys see anything to add to the docs feel free to send a PR, i will send you a tip!

louis030195 avatar Oct 02 '24 16:10 louis030195

hey this shouldn't be that hard, check this:

https://github.com/mediar-ai/screenpipe/tree/main/screenpipe-app-tauri

The link leads to a 404. I think it should be the subdomain docs. instead of the path /docs/.

bjszd avatar Oct 03 '24 08:10 bjszd

I fixed it manually by running

install_name_tool -add_rpath @executable_path/../Frameworks /Applications/screenpipe.app/Contents/MacOS/screenpipe

I noticed that the screenpipe-app has the proper links

➜  MacOS otool -l ./screenpipe-app | grep -A2 LC_RPATH
          cmd LC_RPATH
      cmdsize 48
         path @executable_path/../Frameworks (offset 12)

I am guessing it has something to do with the fact that we build screenpipe separately and the pre-install script copies it over. Not really sure though, OSX builds and deployable binaries is a little beyond me (already deeply relying on chatgpt here)

This solved my issue!

FYI - I used llvm-install-name-tool instead. Honestly don't know why, but install_name_tool returned libc++abi: terminating due to uncaught exception of type std::runtime_error: codesign_failed: 0 for me.

Maybe due to clang vs llvm?

yoyowu1000 avatar Nov 21 '24 15:11 yoyowu1000