Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include imageio_ffmpeg to pyinstaller #59

Merged
merged 6 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy — Linux
name: Build and Publish — Linux
run-name: ${{ github.actor }} is building a Linux release

on:
Expand All @@ -12,7 +12,7 @@ permissions:
packages: write

jobs:
deploy-on-linux:
build-for-linux:
runs-on: ubuntu-22.04

defaults:
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build and deploy on Linux(Debian)
- name: Build and publish for Linux(Debian)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build:linux --publish=always
12 changes: 6 additions & 6 deletions .github/workflows/build-and-release-mac-arm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy — Mac ARM
name: Build and Publish — Mac ARM
run-name: ${{ github.actor }} is building a Mac release

on:
Expand All @@ -12,9 +12,9 @@ permissions:
packages: write

jobs:
deploy-on-mac:
build-for-mac:
runs-on: macos-latest

defaults:
run:
shell: bash -l {0}
Expand All @@ -27,10 +27,10 @@ jobs:
python-version: "3.11"

- name: install python dependencies
run: |
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- uses: actions/setup-node@v4
with:
node-version: "20"
Expand All @@ -43,7 +43,7 @@ jobs:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MAOS_CERTIFICATE_PWD }}

- name: Build and deploy on MacOS
- name: Build and publish for MacOS arm64
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build:mac -- --publish=always --arm64
14 changes: 7 additions & 7 deletions .github/workflows/build-and-release-mac-x86.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy — Mac Intel
name: Build and Publish — Mac Intel
run-name: ${{ github.actor }} is building a Mac release

on:
Expand All @@ -12,9 +12,9 @@ permissions:
packages: write

jobs:
deploy-on-mac:
runs-on: macos-13
build-for-mac:
runs-on: macos-13

defaults:
run:
shell: bash -l {0}
Expand All @@ -27,10 +27,10 @@ jobs:
python-version: "3.11"

- name: install python dependencies
run: |
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- uses: actions/setup-node@v4
with:
node-version: "20"
Expand All @@ -43,7 +43,7 @@ jobs:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MAOS_CERTIFICATE_PWD }}

- name: Build and deploy on MacOS
- name: Build and publish for MacOS
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build:mac -- --publish=always --x64
8 changes: 4 additions & 4 deletions .github/workflows/build-and-release-win.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy — Windows
name: Build and Publish — Windows
run-name: ${{ github.actor }} is building a Windows release

on:
Expand All @@ -12,7 +12,7 @@ permissions:
packages: write

jobs:
deploy-on-windows:
build-for-windows:
runs-on: windows-latest

defaults:
Expand All @@ -27,7 +27,7 @@ jobs:
python-version: "3.11"

- name: install python dependencies
run: |
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

Expand All @@ -38,7 +38,7 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build and deploy on Windows
- name: Build and publish for Windows
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build:win -- --publish=always
8 changes: 4 additions & 4 deletions .github/workflows/test-build-mac-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
test-on-mac:
runs-on: macos-latest

defaults:
run:
shell: bash -l {0}
Expand All @@ -21,16 +21,16 @@ jobs:
python-version: "3.11"

- name: install python dependencies
run: |
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm install

- name: Build and deploy on Mac
- name: Build for Mac arm64
run: npm run build:mac -- --publish=never --arm64
10 changes: 5 additions & 5 deletions .github/workflows/test-build-mac-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:

jobs:
test-on-mac:
runs-on: macos-13
runs-on: macos-13

defaults:
run:
shell: bash -l {0}
Expand All @@ -21,16 +21,16 @@ jobs:
python-version: "3.11"

- name: install python dependencies
run: |
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm install

- name: Build and deploy on Mac
- name: Build for Mac
run: npm run build:mac -- --publish=never --x64
6 changes: 3 additions & 3 deletions .github/workflows/test-build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run-name: ${{ github.actor }} is building for Windows.
on:
pull_request:
branches: [ main ]

jobs:
test-on-windows:
runs-on: windows-latest
Expand All @@ -21,7 +21,7 @@ jobs:
python-version: "3.11"

- name: install python dependencies
run: |
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

Expand All @@ -32,5 +32,5 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build and deploy on Windows
- name: Build for Windows
run: npm run build:win -- --publish=never
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ This will start the Electron app on developer mode.

The build process will create a `.exe`, `.dmg` or `.deb` depend on OS. Run differents command on incompatible OS will result on error.

![Build diagram](https://private-user-images.githubusercontent.com/24541631/366426425-ee5c223b-e918-4863-befe-f4f2b92aede4.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwNTI2NDAsIm5iZiI6MTcyNjA1MjM0MCwicGF0aCI6Ii8yNDU0MTYzMS8zNjY0MjY0MjUtZWU1YzIyM2ItZTkxOC00ODYzLWJlZmUtZjRmMmI5MmFlZGU0LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDEwNTkwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyNTM2YjNiZDg0MjNiMTQwYTRlZTUyYTU1MDA4NmNkNzQ1NmJhZWUwZGZlMzNjZmFjNDc4M2JiMGI2MDQzYzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LYN0dHYhxAVjsjjAZbGLQDzDu-HBv7meNqlPODQewsc)

MacOS
```bash
npm run build:mac
Expand All @@ -138,7 +140,8 @@ To avoid unecessary releases, follow these steps:
- Create a branch `git checkout -b <branch_name>`, work on it, and create a pull request to `main`.
- Update the `package.json` with the new version number.
- Create a new tag with `git tag v<tag_number>`, push it to the repo with `git push orgin --tags`. **IMPORTANT**: the tag must be in the format `vX.Y.Z` where `X.Y.Z` is the package version number in `package.json`.
- Merge the PR from `<branch_name>` into `main`. The github actions will create a [Draft Release](https://github.com/catalystneuro/vame-desktop/releases).
- Create a draft release on github using the tag created.
- Merge the PR from `<branch_name>` into `main`. The github action will publiss the executable assets to the draft release.
- Manually edit the draft release, add information about the new features, bug fixes, and breaking changes.
- Finaly approve and publish the new release.

2 changes: 2 additions & 0 deletions main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ hiddenimports = []
tmp_ret = collect_all('numpy.core')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]

tmp_ret = collect_all('imageio_ffmpeg')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]

a = Analysis(
['src/services/vameApi/main.py'],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vame-desktop",
"main": "./out/main/index.js",
"version": "0.3.3",
"version": "0.3.4",
"description": "An open-source machine learning tool for behavioral segmentation and analyses.",
"license": "GPL-3.0-only",
"author": "Catalyst Neuro <hello@catalystneuro.com>, Nathan Vieira <nathan.v.marcelino@gmail.com>, Garrett Flynn <garrettmflynn@gmail.com>",
Expand Down Expand Up @@ -63,4 +63,4 @@
"typescript": "^5.3.3",
"vite": "^5.0.12"
}
}
}