From ede9bc6e4e4e004dd60b23978959b8d72f0e2e27 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:01:38 -0400 Subject: [PATCH 01/34] test_mac_build --- .github/workflows/test_mac_build.yml | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/test_mac_build.yml diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml new file mode 100644 index 00000000..784f87b1 --- /dev/null +++ b/.github/workflows/test_mac_build.yml @@ -0,0 +1,58 @@ +name: Publish + +on: + push: + branches: + - test-mac + workflow_dispatch: + +jobs: + publish: + # To enable auto publishing to github, update your electron publisher + # config in package.json > "build" and remove the conditional below + # D:\a\RescueBox-FlaskML-xxx\RescueBox-FlaskML-xxx + if: ${{ github.repository_owner == 'UMass-Rescue' }} + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest] + + steps: + - name: Checkout git repo + uses: actions/checkout@v4 + + - name: Install Node and NPM + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + cache-dependency-path: '**/package-lock.json' + - run: npm --version + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install and build + run: | + cd ~/RescueBox/RescueBox/RescueBox-Desktop + echo %cd% + copy /y ..\build_files\rb.py assets\rb_server + copy /y ..\build_files\installer.ps1 assets\rb_server + copy /y ..\build_files\requirements.txt assets\rb_server + echo "run install" + npm install + echo "run postinstall" + npm run postinstall + echo "run build" + npm run build + echo "run rebuild" + npm run rebuild + echo "run exec" + npm exec electron-builder -- --publish always --mac + ls release/build + IF NOT EXIST "release/build/RescueBox-Desktop-2.1.0.dmg" EXIT 1 + shell: zsh From f8e2d52af8c2771f3daa00b1cb4a48742b3e50f7 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:14:12 -0400 Subject: [PATCH 02/34] Update test_mac_build.yml --- .github/workflows/test_mac_build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 784f87b1..f4febe0b 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -38,11 +38,10 @@ jobs: - name: Install and build run: | - cd ~/RescueBox/RescueBox/RescueBox-Desktop - echo %cd% - copy /y ..\build_files\rb.py assets\rb_server - copy /y ..\build_files\installer.ps1 assets\rb_server - copy /y ..\build_files\requirements.txt assets\rb_server + pwd + env + ls $HOME + cd $HOME/RescueBox/RescueBox-Desktop echo "run install" npm install echo "run postinstall" @@ -55,4 +54,4 @@ jobs: npm exec electron-builder -- --publish always --mac ls release/build IF NOT EXIST "release/build/RescueBox-Desktop-2.1.0.dmg" EXIT 1 - shell: zsh + shell: sh From 6c94afbf0fa5c94f8686cc9a52026446da6e68dc Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:17:28 -0400 Subject: [PATCH 03/34] Update test_mac_build.yml --- .github/workflows/test_mac_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index f4febe0b..b27cd8bb 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -3,7 +3,7 @@ name: Publish on: push: branches: - - test-mac + - test_mac_build workflow_dispatch: jobs: From 9d3238c13f8ae1dce62edb71f23e1b94a0eb347f Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:26:46 -0400 Subject: [PATCH 04/34] Update test_mac_build.yml --- .github/workflows/test_mac_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index b27cd8bb..fc9086e6 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -39,9 +39,9 @@ jobs: - name: Install and build run: | pwd - env - ls $HOME - cd $HOME/RescueBox/RescueBox-Desktop + ls $RUNNER_WORKSPACE + cd $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop + ls echo "run install" npm install echo "run postinstall" From f358ced712a70d61f71d36a7d0df3cf43d5f7bca Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:31:15 -0400 Subject: [PATCH 05/34] brew install python-setuptools --- .github/workflows/test_mac_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index fc9086e6..6b9ba02d 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -39,9 +39,9 @@ jobs: - name: Install and build run: | pwd - ls $RUNNER_WORKSPACE cd $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop - ls + ls + brew install python-setuptools echo "run install" npm install echo "run postinstall" From e9fc7ded24feeddb0844cfc1235a96f6611532c7 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:38:43 -0400 Subject: [PATCH 06/34] Update package.json version to 2.1.0 --- RescueBox-Desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RescueBox-Desktop/package.json b/RescueBox-Desktop/package.json index ad6d89c7..33b09494 100644 --- a/RescueBox-Desktop/package.json +++ b/RescueBox-Desktop/package.json @@ -1,6 +1,6 @@ { "name": "rescuebox-desktop", - "version": "2.0.0", + "version": "2.1.0", "description": "A foundation for scalable desktop apps", "keywords": [], "homepage": "https://github.com/UMass-Rescue/RescueBox-Desktop#readme", From 8f0fbdff3162840c2e5b0c178f81c132de5dd769 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:45:29 -0400 Subject: [PATCH 07/34] pip install setuptools error module not found distutils --- .github/workflows/test_mac_build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 6b9ba02d..446ac603 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -42,6 +42,7 @@ jobs: cd $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop ls brew install python-setuptools + python3 -m pip install setuptools echo "run install" npm install echo "run postinstall" @@ -51,7 +52,7 @@ jobs: echo "run rebuild" npm run rebuild echo "run exec" - npm exec electron-builder -- --publish always --mac - ls release/build - IF NOT EXIST "release/build/RescueBox-Desktop-2.1.0.dmg" EXIT 1 + npm exec electron-builder -- --mac + ls $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build + IF NOT EXIST "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0.dmg" EXIT 1 shell: sh From 8da80235090aa39860b3d534bd089ee4e743ce29 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:56:09 -0400 Subject: [PATCH 08/34] set github.token --- .github/workflows/test_mac_build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 446ac603..e57cdc93 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -37,6 +37,8 @@ jobs: python-version: '3.12' - name: Install and build + env: + GH_TOKEN: ${{ github.token }} run: | pwd cd $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop From 81682e5766964b8c0f194680f4055521d1e8e5c1 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:03:28 -0400 Subject: [PATCH 09/34] check dmg file created ok --- .github/workflows/test_mac_build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index e57cdc93..7e36cbc4 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -56,5 +56,7 @@ jobs: echo "run exec" npm exec electron-builder -- --mac ls $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build - IF NOT EXIST "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0.dmg" EXIT 1 + if [ -f "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0.dmg" ]; then + echo "rescueboc desktop 2.0 for mac built ok" + fi shell: sh From 3702d04b1d609cbf78c6b59660d8b3a6fd0c124c Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:10:25 -0400 Subject: [PATCH 10/34] Update package-lock.json to 2.1.0 --- RescueBox-Desktop/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RescueBox-Desktop/package-lock.json b/RescueBox-Desktop/package-lock.json index 846dfab8..dcac5d2a 100644 --- a/RescueBox-Desktop/package-lock.json +++ b/RescueBox-Desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescuebox-desktop", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rescuebox-desktop", - "version": "2.0.0", + "version": "2.1.0", "hasInstallScript": true, "license": "MIT", "dependencies": { From e607408498399d31a2c1e68b62cefb208ddb1384 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:10:54 -0400 Subject: [PATCH 11/34] checkout specific branch not main --- .github/workflows/test_mac_build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 7e36cbc4..49a92253 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -22,6 +22,8 @@ jobs: steps: - name: Checkout git repo uses: actions/checkout@v4 + with: + ref: 'test_mac_build' - name: Install Node and NPM uses: actions/setup-node@v4 From 7fa33a59b1fff9ea272082444c1d137c7ca81b4d Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:14:24 -0400 Subject: [PATCH 12/34] check specific branch build ok --- .github/workflows/test_mac_build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 49a92253..eb5e7d35 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -58,7 +58,11 @@ jobs: echo "run exec" npm exec electron-builder -- --mac ls $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build - if [ -f "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0.dmg" ]; then - echo "rescueboc desktop 2.0 for mac built ok" + if [ -f "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0-universal.dmg" ]; then + echo "rescueboc desktop 2.1.0 for mac built ok" + exit 0 + else + echo "rescueboc desktop 2.1 for mac not built ok" + exit 1 fi shell: sh From d7d7588932099be3979ee9669e2c7e992de0314c Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:31:12 -0400 Subject: [PATCH 13/34] Update package-lock.json --- RescueBox-Desktop/release/app/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RescueBox-Desktop/release/app/package-lock.json b/RescueBox-Desktop/release/app/package-lock.json index 69115c44..9974d7a3 100644 --- a/RescueBox-Desktop/release/app/package-lock.json +++ b/RescueBox-Desktop/release/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "RescueBox-Desktop", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "RescueBox-Desktop", - "version": "2.0.0", + "version": "2.1.0", "hasInstallScript": true, "license": "MIT", "dependencies": { From c14f822cedbe3bdd704370fd16c6a021c5d9ced7 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:31:33 -0400 Subject: [PATCH 14/34] Update package.json --- RescueBox-Desktop/release/app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RescueBox-Desktop/release/app/package.json b/RescueBox-Desktop/release/app/package.json index d5c3f6fc..f3c06c09 100644 --- a/RescueBox-Desktop/release/app/package.json +++ b/RescueBox-Desktop/release/app/package.json @@ -1,6 +1,6 @@ { "name": "RescueBox-Desktop", - "version": "2.0.0", + "version": "2.1.0", "description": "A desktop application with a collection of ML models for forensics, and a job engine to run them", "license": "MIT", "author": { From cc24e02994eac2b8ef53e83ff21264cf68e39200 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 19:54:19 -0400 Subject: [PATCH 15/34] add backend exe build steps --- .github/workflows/test_mac_build.yml | 38 ++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index eb5e7d35..4f2f6da6 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -42,9 +42,43 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - pwd + cd $RUNNER_WORKSPACE/RescueBox + gdown 1yJoDqNbnNUte7vfv1GV5Go57MPkSdPlc + ls -lrt + mkdir tmp + cd tmp + unip ../rb_mac_files.zip + mv age_and_gender_detection/models ../src/age_and_gender_detection + mv face-detection-recognition/face_detection_recognition/models ../src/face-detection-recognition/face_detection_recognition + mv deepfake-detection/deepfake_detection/onnx_models ../src/deepfake-detection/deepfake_detection + mv hook.py .. + mv mac.spec .. + rm -f ../pyproject.toml + mv pyproject.toml ../pyproject.toml + cd .. + rm -rf tmp + brew install ffmpeg + ls -l /usr/local/bin/ffmpeg + cp /usr/local/bin/ffmpeg . + brew install pipx + pipx install poetry + poetry sync + poetry env list + poetry env info + poetry lock + poetry install + poetry run pyinstaller mac.spec + ls -l dist/rescuebox/rescuebox + if [ -f "dist/rescuebox/rescuebox" ]; then + echo "backend rescuebox exe build ok" + else + echo "backend rescuebox exe build not ok" + exit 1 + fi + mv dist RescueBox-Desktop/assets/rb_server + echo "backend rescuebox build completed" cd $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop - ls + ls package.json brew install python-setuptools python3 -m pip install setuptools echo "run install" From 5bcf09fd153acdc458afacaccb00ab71a480dd65 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 19:56:44 -0400 Subject: [PATCH 16/34] brew install gdown for artifacts --- .github/workflows/test_mac_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 4f2f6da6..8ddef88c 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -43,6 +43,7 @@ jobs: GH_TOKEN: ${{ github.token }} run: | cd $RUNNER_WORKSPACE/RescueBox + brew install gdown gdown 1yJoDqNbnNUte7vfv1GV5Go57MPkSdPlc ls -lrt mkdir tmp From 09a3a0f6bf002e0f950fec510f344d67b05b294f Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 19:58:42 -0400 Subject: [PATCH 17/34] fix unzip typo --- .github/workflows/test_mac_build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 8ddef88c..b3212673 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -48,7 +48,7 @@ jobs: ls -lrt mkdir tmp cd tmp - unip ../rb_mac_files.zip + unzip ../rb_mac_files.zip mv age_and_gender_detection/models ../src/age_and_gender_detection mv face-detection-recognition/face_detection_recognition/models ../src/face-detection-recognition/face_detection_recognition mv deepfake-detection/deepfake_detection/onnx_models ../src/deepfake-detection/deepfake_detection @@ -58,6 +58,7 @@ jobs: mv pyproject.toml ../pyproject.toml cd .. rm -rf tmp + rm -f rb_mac_files.zip brew install ffmpeg ls -l /usr/local/bin/ffmpeg cp /usr/local/bin/ffmpeg . From d3543e4630c75030b86dd2d89130e03a10822b22 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:06:17 -0400 Subject: [PATCH 18/34] update gdown --- .github/workflows/test_mac_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index b3212673..759c3619 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -44,7 +44,7 @@ jobs: run: | cd $RUNNER_WORKSPACE/RescueBox brew install gdown - gdown 1yJoDqNbnNUte7vfv1GV5Go57MPkSdPlc + gdown 1t8PHU13mJD_OHQtt5Rpzwt22iIcevPZ_ ls -lrt mkdir tmp cd tmp From 4609c8ffcc94dca9978beda64c5e50cfc8d0460d Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:10:14 -0400 Subject: [PATCH 19/34] fix existing age_detect models --- .github/workflows/test_mac_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 759c3619..2041379a 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -49,7 +49,7 @@ jobs: mkdir tmp cd tmp unzip ../rb_mac_files.zip - mv age_and_gender_detection/models ../src/age_and_gender_detection + # mv -f age_and_gender_detection/models ../src/age_and_gender_detection mv face-detection-recognition/face_detection_recognition/models ../src/face-detection-recognition/face_detection_recognition mv deepfake-detection/deepfake_detection/onnx_models ../src/deepfake-detection/deepfake_detection mv hook.py .. From b896a19d188aea7778343d2491ee7a1c7bfffad7 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:18:39 -0400 Subject: [PATCH 20/34] brew install ffmpeg 7.1.1_3 --- .github/workflows/test_mac_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 2041379a..ff3afe8f 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -59,9 +59,9 @@ jobs: cd .. rm -rf tmp rm -f rb_mac_files.zip - brew install ffmpeg - ls -l /usr/local/bin/ffmpeg - cp /usr/local/bin/ffmpeg . + brew install ffmpeg@7.1.1_3 + ls -l /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg + cp /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . brew install pipx pipx install poetry poetry sync From 42b8bf0a772c4869bc9ac1d4cc10869a4e747941 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:30:04 -0400 Subject: [PATCH 21/34] ffmpeg version 7.1 --- .github/workflows/test_mac_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index ff3afe8f..ae57f13a 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -59,7 +59,7 @@ jobs: cd .. rm -rf tmp rm -f rb_mac_files.zip - brew install ffmpeg@7.1.1_3 + brew install ffmpeg@7.1 ls -l /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg cp /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . brew install pipx From 0d67b7ef370b339be4f77ab7cd585c86cde26159 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:35:42 -0400 Subject: [PATCH 22/34] ffmpeg remove version --- .github/workflows/test_mac_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index ae57f13a..e2954714 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -59,7 +59,7 @@ jobs: cd .. rm -rf tmp rm -f rb_mac_files.zip - brew install ffmpeg@7.1 + brew install ffmpeg ls -l /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg cp /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . brew install pipx From 24baa1286774e18460f43e422fd1c99b84d0a6e7 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:41:37 -0400 Subject: [PATCH 23/34] find ffmpeg binary --- .github/workflows/test_mac_build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index e2954714..6656f7de 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -60,8 +60,9 @@ jobs: rm -rf tmp rm -f rb_mac_files.zip brew install ffmpeg - ls -l /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg - cp /usr/local/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . + brew list ffmpeg | grep "bin/ffmpeg" + ls -l /usr/local/Cellar/ffmpeg/*/bin/ffmpeg + cp /usr/local/Cellar/ffmpeg/*/bin/ffmpeg . brew install pipx pipx install poetry poetry sync From 1841599756350a732eccaa29e6c31687b2a33bba Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:51:11 -0400 Subject: [PATCH 24/34] copy ffmpeg from /opt/homebrew/Cellar --- .github/workflows/test_mac_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 6656f7de..be046548 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -61,8 +61,8 @@ jobs: rm -f rb_mac_files.zip brew install ffmpeg brew list ffmpeg | grep "bin/ffmpeg" - ls -l /usr/local/Cellar/ffmpeg/*/bin/ffmpeg - cp /usr/local/Cellar/ffmpeg/*/bin/ffmpeg . + ls -l /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg + cp /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . brew install pipx pipx install poetry poetry sync From ef253dce229cdd437c87a9abee81333ee2b44a95 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:55:17 -0400 Subject: [PATCH 25/34] fix poetry lock error --- .github/workflows/test_mac_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index be046548..02c29ad2 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -65,11 +65,11 @@ jobs: cp /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . brew install pipx pipx install poetry - poetry sync - poetry env list - poetry env info + rm -f poetry.lock poetry lock poetry install + poetry env list + poetry env info poetry run pyinstaller mac.spec ls -l dist/rescuebox/rescuebox if [ -f "dist/rescuebox/rescuebox" ]; then From e2db41a03038f16d62750588d22edc2420650087 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:59:53 -0400 Subject: [PATCH 26/34] cp ffmpeg to /usr/local/bin --- .github/workflows/test_mac_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 02c29ad2..62399294 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -63,6 +63,7 @@ jobs: brew list ffmpeg | grep "bin/ffmpeg" ls -l /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg cp /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . + cp ffmpeg /usr/local/bin brew install pipx pipx install poetry rm -f poetry.lock From 0b4943496d0b7a7d07815e83a843b84dfa21b828 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 21:10:40 -0400 Subject: [PATCH 27/34] add whisper weights file --- .github/workflows/test_mac_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 62399294..456611b5 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -44,7 +44,7 @@ jobs: run: | cd $RUNNER_WORKSPACE/RescueBox brew install gdown - gdown 1t8PHU13mJD_OHQtt5Rpzwt22iIcevPZ_ + gdown 1kN8BYEDinWfs9Qv5G1T_bILiwfuT5o-V ls -lrt mkdir tmp cd tmp @@ -52,6 +52,7 @@ jobs: # mv -f age_and_gender_detection/models ../src/age_and_gender_detection mv face-detection-recognition/face_detection_recognition/models ../src/face-detection-recognition/face_detection_recognition mv deepfake-detection/deepfake_detection/onnx_models ../src/deepfake-detection/deepfake_detection + mv whisper .. mv hook.py .. mv mac.spec .. rm -f ../pyproject.toml @@ -63,7 +64,6 @@ jobs: brew list ffmpeg | grep "bin/ffmpeg" ls -l /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg cp /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . - cp ffmpeg /usr/local/bin brew install pipx pipx install poetry rm -f poetry.lock From b0de727cf5c32f0bda1024d4f8c1d7a61c8c7907 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Mon, 7 Jul 2025 21:20:41 -0400 Subject: [PATCH 28/34] Update register-model-service.ts for mac backend startup if windows add .exe --- .../src/main/services/register-model-service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RescueBox-Desktop/src/main/services/register-model-service.ts b/RescueBox-Desktop/src/main/services/register-model-service.ts index ab39e872..de51dcfe 100644 --- a/RescueBox-Desktop/src/main/services/register-model-service.ts +++ b/RescueBox-Desktop/src/main/services/register-model-service.ts @@ -46,7 +46,7 @@ export default class RegisterModelService { 'dist', 'rescuebox', ); - public static serverExe = path.join(RegisterModelService.serverPath, 'rescuebox.exe',); + public static serverExe = path.join(RegisterModelService.serverPath, 'rescuebox',); public static childprocess: ChildProcess; public static async startServer() { @@ -62,6 +62,9 @@ export default class RegisterModelService { }; if (RegisterModelService.IS_SERVER_RUNNING) return; + if (process.platform === 'win32') { + RegisterModelService.serverExe = path.join(RegisterModelService.serverPath, 'rescuebox.exe',); + } RegisterModelService.childprocess = spawn(RegisterModelService.serverExe, options, defaults); if (RegisterModelService.childprocess != null) { RegisterModelService.childprocess.stdout?.on('data', (data: any) => { From 559bfb83d5fe2da6d6b080c3c0d339549be3c335 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Tue, 8 Jul 2025 09:01:33 -0400 Subject: [PATCH 29/34] Update package.json from universal to arm64 pillow error --- RescueBox-Desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RescueBox-Desktop/package.json b/RescueBox-Desktop/package.json index 33b09494..11c85ae6 100644 --- a/RescueBox-Desktop/package.json +++ b/RescueBox-Desktop/package.json @@ -265,7 +265,7 @@ "target": { "target": "default", "arch": [ - "universal" + "arm64" ] }, "additionalArguments": [ From e09fef55e13483930c33089adbe16edbc886d2eb Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Tue, 8 Jul 2025 09:19:32 -0400 Subject: [PATCH 30/34] check for arm64 mac build dmg file --- .github/workflows/test_mac_build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index 456611b5..c59153b8 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -64,7 +64,6 @@ jobs: brew list ffmpeg | grep "bin/ffmpeg" ls -l /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg cp /opt/homebrew/Cellar/ffmpeg/7.1.1_3/bin/ffmpeg . - brew install pipx pipx install poetry rm -f poetry.lock poetry lock @@ -96,8 +95,8 @@ jobs: echo "run exec" npm exec electron-builder -- --mac ls $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build - if [ -f "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0-universal.dmg" ]; then - echo "rescueboc desktop 2.1.0 for mac built ok" + if [ -f "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0-arm64.dmg" ]; then + echo "rescueboc desktop 2.1.0 for mac arm64 only built ok" exit 0 else echo "rescueboc desktop 2.1 for mac not built ok" From c6c2109809f0ad0276868d9e1d9f7968a31f67f8 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:56:39 -0400 Subject: [PATCH 31/34] update publish repo in package.json --- RescueBox-Desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RescueBox-Desktop/package.json b/RescueBox-Desktop/package.json index 11c85ae6..2c8a6e4f 100644 --- a/RescueBox-Desktop/package.json +++ b/RescueBox-Desktop/package.json @@ -330,7 +330,7 @@ "publish": { "provider": "github", "owner": "UMass-Rescue", - "repo": "RescueBox-Desktop" + "repo": "RescueBox" } }, "electronmon": { From eca2eefef7c406ff27ee7937d61cad3e7e8b11a8 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:57:57 -0400 Subject: [PATCH 32/34] Update package.json repo name --- RescueBox-Desktop/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RescueBox-Desktop/package.json b/RescueBox-Desktop/package.json index 2c8a6e4f..fd7768f7 100644 --- a/RescueBox-Desktop/package.json +++ b/RescueBox-Desktop/package.json @@ -3,13 +3,13 @@ "version": "2.1.0", "description": "A foundation for scalable desktop apps", "keywords": [], - "homepage": "https://github.com/UMass-Rescue/RescueBox-Desktop#readme", + "homepage": "https://github.com/UMass-Rescue/RescueBox#readme", "bugs": { - "url": "https://github.com/UMass-Rescue/RescueBox-Desktop/issues" + "url": "https://github.com/UMass-Rescue/RescueBox/issues" }, "repository": { "type": "git", - "url": "git+https://github.com/UMass-Rescue/RescueBox-Desktop.git" + "url": "git+https://github.com/UMass-Rescue/RescueBox.git" }, "license": "MIT", "author": "UMass Rescue Lab", From a15e78370a1df2c15d4c8e160f9186f958e22917 Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:01:36 -0400 Subject: [PATCH 33/34] Update test_mac_build.yml to publish always --- .github/workflows/test_mac_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index c59153b8..eafe0d82 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -93,7 +93,7 @@ jobs: echo "run rebuild" npm run rebuild echo "run exec" - npm exec electron-builder -- --mac + npm exec electron-builder -- --publish always --mac ls $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build if [ -f "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0-arm64.dmg" ]; then echo "rescueboc desktop 2.1.0 for mac arm64 only built ok" From ec9eeee8db13bad14a28dc1249fcc163f7fea34c Mon Sep 17 00:00:00 2001 From: jai kumar <8251914+nb950@users.noreply.github.com> Date: Thu, 10 Jul 2025 09:43:19 -0400 Subject: [PATCH 34/34] add permissions --- .github/workflows/test_mac_build.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_mac_build.yml b/.github/workflows/test_mac_build.yml index eafe0d82..64728d98 100644 --- a/.github/workflows/test_mac_build.yml +++ b/.github/workflows/test_mac_build.yml @@ -5,7 +5,10 @@ on: branches: - test_mac_build workflow_dispatch: - + +permissions: + contents: write + jobs: publish: # To enable auto publishing to github, update your electron publisher @@ -94,12 +97,4 @@ jobs: npm run rebuild echo "run exec" npm exec electron-builder -- --publish always --mac - ls $RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build - if [ -f "$RUNNER_WORKSPACE/RescueBox/RescueBox-Desktop/release/build/RescueBox-Desktop-2.1.0-arm64.dmg" ]; then - echo "rescueboc desktop 2.1.0 for mac arm64 only built ok" - exit 0 - else - echo "rescueboc desktop 2.1 for mac not built ok" - exit 1 - fi shell: sh