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

Pupil Core 3.6 Release Candidate 1 #2314

Merged
merged 268 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
c0b977a
Merge branch 'master' into official_pyav
papr Mar 14, 2022
d41c557
pyav 9.x compatibility
papr Mar 14, 2022
1a3bcf2
Merge remote-tracking branch 'origin/master' into develop
papr Apr 27, 2022
7a76dbf
Avoid ZeroDivisionError in post-hoc blink detection
papr Apr 27, 2022
b367964
Merge pull request #2234 from pupil-labs/fix_blink_detection
papr Apr 27, 2022
b393c0c
Merge branch 'develop' into official_pyav
papr Apr 27, 2022
cfa0467
Fix issue with camera intrinsics estimation plugin if previously sele…
papr May 23, 2022
abc2533
Pye3d plugin: Remove outdated help text
papr May 23, 2022
2fa65ae
Merge pull request #2238 from pupil-labs/fix_intrinsics_estimation
papr May 23, 2022
b235b30
Merge pull request #2237 from pupil-labs/pye3d_remove_outdated_help
papr May 23, 2022
d1d5be3
Merge branch 'develop' into official_pyav
papr May 23, 2022
b644793
Fix `--profile` mode in Capture
papr Jun 7, 2022
cfc95e4
Merge pull request #2241 from pupil-labs/fix-profile
papr Jun 7, 2022
96985ca
Merge branch 'develop' into official_pyav
papr Jun 7, 2022
11c8497
Merge branch 'master' into develop
papr Jun 10, 2022
9693ddd
Merge branch 'develop' into official_pyav
papr Jun 10, 2022
04ed5e7
gitignore .venv*
papr Jun 14, 2022
21ec82f
Merge branch 'develop' into official_pyav
papr Jun 14, 2022
f7039fc
Use appropriate collections.abc replacement for removed Sequence class
papr Jun 15, 2022
940d88a
Fix fetching base class type annotations
papr Jun 15, 2022
93b2581
Merge branch 'py310_compat' into official_pyav
papr Jun 16, 2022
6a2ab49
Merge remote-tracking branch 'origin/master' into develop
papr Jul 29, 2022
77c3c87
pyright: exclude deployment and .venv folders
papr Jul 29, 2022
a05c5a9
Add rich requirement
papr Mar 14, 2022
6903b7e
Use rich log handler
papr Mar 14, 2022
65de30d
Display progress bar for loading pldata files
papr Mar 14, 2022
5f9fab5
Fix exception logging with rich
papr May 23, 2022
15dabff
Handle Camera Intrinsics Estimation crash if no circles are detected …
papr Jul 29, 2022
f8597b4
Merge pull request #2248 from pupil-labs/fix-cie-if-no-circles
papr Jul 29, 2022
7eeabae
Blink Detector: Only draw timeline if it exists
papr Jul 29, 2022
d8cf65e
Blink detector: Move time module import to top
papr Jul 29, 2022
3bdce34
Merge pull request #2249 from pupil-labs/fix-blink-detection
papr Jul 29, 2022
b51bbbc
Explicitly pass container format to av.open
papr Jul 29, 2022
d766d1d
Merge branch 'av_open_explicit_format' into official_pyav
papr Jul 29, 2022
95e9bc3
Use appropriate collections.abc replacement for removed Sequence class
papr Jun 15, 2022
1ec616a
Fix fetching base class type annotations
papr Jun 15, 2022
1efeb07
Set daemon on thread init
papr Jul 29, 2022
ea84ed0
Seek in audio container instead of stream
papr Jul 29, 2022
36b12f3
Handle av.audio.Resampler returning list of frames
papr Jul 29, 2022
11b6048
Sort imports
papr Jul 29, 2022
7fd3b84
Use sounddevice instead of pyaudio
papr Aug 1, 2022
567616a
Require official pyav
papr Aug 1, 2022
51fc543
Pass target stream for seeking
papr Aug 1, 2022
8c7e885
Audio Vis: Ignore frames that cannot be resampled
papr Aug 1, 2022
ea2a214
Use frame.to_ndarray() instead of np.frombuffer(frame.planes[0])
papr Aug 1, 2022
0bd2f31
Merge pull request #2252 from pupil-labs/official_pyav
papr Aug 2, 2022
addbede
Merge pull request #2253 from pupil-labs/sounddevice
papr Aug 2, 2022
6fba488
Merge pull request #2254 from pupil-labs/rich
papr Aug 2, 2022
35c8301
Aduio playback fixes
papr Aug 3, 2022
77166f4
Ensure av containers are closed before attempting to rename their files
papr Aug 18, 2022
59a38d2
Support pupil-labs-uvc 1.0
papr Sep 15, 2022
ff64f9d
Fix logging setup in Service
papr Sep 26, 2022
6df0478
Merge pull request #2264 from pupil-labs/fix-service-logging-setup
papr Sep 26, 2022
2265ffd
Make 2D Pupil Detector settings session-persistent
papr Sep 26, 2022
179c582
Merge pull request #2265 from pupil-labs/fix-2d-session-settings
papr Sep 26, 2022
a445108
Relax pye3d version requirement to only match major.minor
papr Sep 29, 2022
b80f020
Type hmd-streaming backend and add support for sending distortion coeffs
papr Sep 29, 2022
d28dced
Merge pull request #2267 from pupil-labs/hmd-streaming
papr Sep 29, 2022
e5196c8
Merge pull request #2266 from pupil-labs/pye3d-requirements
papr Sep 29, 2022
50d74a3
Update requirements
papr Oct 5, 2022
519865a
Add pre-commit hooks
papr Oct 7, 2022
c1da275
Add and apply pyupgrade 3.6+
papr Oct 7, 2022
edf8a4a
Add and apply isort
papr Oct 7, 2022
7a47eab
Add and apply setup-cfg-fmt
papr Oct 7, 2022
3c81b14
Merge pull request #2268 from pupil-labs/extend-pre-commit-config
papr Oct 7, 2022
50ac42f
Merge pull request #2251 from pupil-labs/py310_compat
papr Oct 7, 2022
034e397
Update source install docs
papr Oct 7, 2022
7757b73
pre-commit auto-update
papr Oct 7, 2022
f879dfe
Fix import order of gaze_procuer.ui
papr Oct 10, 2022
df10c6d
Allow modification of Player import process via user python files
papr Oct 10, 2022
7ce1b5d
Merge pull request #2270 from pupil-labs/flexible-imports
papr Oct 10, 2022
c421d3c
Merge branch 'develop' into post-hoc-vr-gazer
papr Oct 11, 2022
7acf36d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 11, 2022
18e4039
Skip on audio resampler setup issue
papr Oct 12, 2022
f951e9d
Log audio file path on load
papr Oct 12, 2022
58f444e
Track raw data export progress in console
papr Oct 12, 2022
244d959
Pye3d Plugin: Forward init arguments to Detector3D
papr Oct 12, 2022
428719e
Storage: Fix version classvar definition + add debug logs
papr Oct 12, 2022
675dae9
Load reference data from notify.pldata
papr Oct 12, 2022
e9573e6
Fix gazer_hmd monocular model init
papr Oct 12, 2022
48bb5ea
Add debug logs
papr Oct 12, 2022
31ba295
Implement Camera_Model.__str__
papr Oct 12, 2022
ecdab9d
Make pldata loading tracking optional
papr Oct 12, 2022
12d8062
Improve debug logs
papr Oct 12, 2022
248202c
Order requirements
papr Oct 13, 2022
979f9a5
Add intrinsics printing cli to camera models
papr Oct 13, 2022
b36247a
Set calibration status to "Recalculating" during recalculation
papr Oct 13, 2022
2a0b285
Use 3d mm_pos data in post-hoc vr gazer if available
papr Oct 13, 2022
915909e
Flip recorded 3d reference locations on load, instead of during calib…
papr Oct 14, 2022
6cc4e66
player_methods: Add __repr__ implementation and type annotations
papr Oct 14, 2022
f23c36b
Merge pull request #2273 from pupil-labs/fix-video-audio-export
papr Oct 24, 2022
a72b9c9
Improve gaze mapping type hints
papr Oct 31, 2022
668c293
Merge remote-tracking branch 'pl/develop' into post-hoc-vr-gazer
papr Oct 31, 2022
22228d1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 31, 2022
42b29dc
Merge pull request #2176 from pupil-labs/post-hoc-vr-gazer
papr Oct 31, 2022
35a9328
Load pldata: Fallback to reading timestamps from serialized msgpack d…
papr Oct 31, 2022
72290de
Handle corrupted PI scene video parts
papr Oct 31, 2022
d246abe
Player: Run the recording upgrade such that it does not block the UI
papr Nov 1, 2022
f4d9059
Add py37 requirement note to readme
papr Nov 1, 2022
347ad4a
Merge pull request #2274 from pupil-labs/non-blocking-ui-upgrade
papr Nov 2, 2022
57c59d0
Use spawn on Linux
papr Nov 8, 2022
314fb76
Use own zmq.Context in log_loop
papr Nov 8, 2022
b20310b
Always use RichHandler in log_loop
papr Nov 8, 2022
0f802c9
Load UI modules only on demand
papr Nov 9, 2022
d84d9a3
Add `git checkout develop` to dev instructions
papr Nov 14, 2022
059e5d4
Fix launching subprocess on Windows
papr Nov 16, 2022
7644419
Merge pull request #2282 from pupil-labs/fix-bg-surface-mapping-windows
papr Nov 16, 2022
8c04ca3
Merge pull request #2283 from pupil-labs/accuracy_import_on_demand
papr Nov 16, 2022
dec80a8
Ignore pyinstaller build/dist location
papr Nov 16, 2022
db0b6eb
Move icons to unified folder
papr Nov 16, 2022
9cf77f4
Build Windows bundle
papr Nov 16, 2022
24678fe
Use Github Actions to create Windows bundles
papr Nov 17, 2022
873ceaa
Fix GA workflow file syntax error
papr Nov 17, 2022
7b7f8c7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 17, 2022
5d7bd64
Use runner.os to check current os
papr Nov 17, 2022
4d31d78
Install Pupil Core dependencies in GA
papr Nov 17, 2022
abf7904
GA: Checkout tags
papr Nov 17, 2022
d84479c
Execute wix commands with full path
papr Nov 17, 2022
2d48c37
Use subprocess.call instead of os.system
papr Nov 17, 2022
8dc5dda
Fix artifact upload name
papr Nov 17, 2022
88b8a67
Merge branch 'spawn-linux' into bundle-refactor
papr Nov 17, 2022
f4f2c07
Adopt bundling process for Linux and macOS
papr Nov 17, 2022
dc68252
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 17, 2022
05beb77
Fix base64 --decode command
papr Nov 17, 2022
1809072
Remove old bundle code
papr Nov 18, 2022
dcb6c04
Ensure x86 package installs on macOS
papr Nov 18, 2022
104d655
Refactor bundle packaging
papr Nov 18, 2022
9520e41
Fix archflags specification
papr Nov 18, 2022
ea4ff0f
Setup linux packaging
papr Nov 18, 2022
91ecd71
Fix setting archflags and pinpoint macos-11 as macOS runner OS
papr Nov 18, 2022
d24dbfe
Add linux udev instructions to readme
papr Nov 18, 2022
b793e6c
Fix path to linux app icons
papr Nov 18, 2022
162c208
Fix windows msi template filling
papr Nov 18, 2022
390cca7
[wip] fix deb packaging patsh
papr Nov 18, 2022
c996c4d
Strip whitespace from msi template
papr Nov 21, 2022
2e4ab82
DEB: Save apps to /opt/ instead of /opt
papr Nov 21, 2022
5b27573
Fix app icon and rm tmp deb tree
papr Nov 21, 2022
e3cf0f5
Revert deb icon file rename
papr Nov 21, 2022
42152a8
Explicitly include OpenGL binaries
papr Nov 21, 2022
51b94df
DEB: Set correct WM class to fix app icon on Linux
papr Nov 21, 2022
1e600f5
Linux: Exclude system binaries for interoperability
papr Nov 21, 2022
0f45069
Exclude unnecessary data files
papr Nov 21, 2022
a2b8812
gitignore build artifacts
papr Nov 21, 2022
cbe487c
Whitelist cv2 python data files
papr Nov 21, 2022
9ccac36
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 21, 2022
d3544c8
Windows: Fix pathing issues
papr Nov 21, 2022
077daef
Fix signing on macOS
papr Nov 22, 2022
e162e35
Only attempt to unlock keychains on macOS
papr Nov 22, 2022
643a2da
Use apple-actions/import-codesign-certs
papr Nov 23, 2022
440ae77
Avoid when sendinc C command to Service
papr Nov 29, 2022
3d187e9
Include pylsl in bundle
papr Nov 29, 2022
d02786f
Require packaging<22
papr Dec 27, 2022
25a97cf
Fix deprecated np.float and np.int instances that are no longer avail…
papr Dec 28, 2022
7e22365
macOS: Bundle custom opencv_python build without ffmpeg
papr Dec 29, 2022
8f119b5
Only bundle custom opencv wheel on macOS
papr Dec 29, 2022
9a48571
Explicitly include sklearn in bundle
papr Dec 29, 2022
05ff94e
Require packaging<22
papr Dec 27, 2022
7789e2b
Test resolving pyglui font paths
papr Dec 29, 2022
a0f3142
README: Specify sounddevice dependency
papr Dec 30, 2022
af61f30
Install Linux-specific dependency libportaudio2
papr Dec 30, 2022
9e68461
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 30, 2022
22282bc
Run apt-get as sudo
papr Dec 30, 2022
fa2a367
Linux: Add runtime hook to find sounddevice
papr Dec 30, 2022
b6c6d54
Notarize macOS bundle
papr Jan 2, 2023
ab04bdd
macOS: Only sign/notarize/create dmg for release commits
papr Jan 2, 2023
49e29c1
MacOS: Always import codesign certs
papr Jan 2, 2023
e0bc4bc
Create Github release draft
papr Jan 2, 2023
ba58f36
Merge pull request #2284 from pupil-labs/bundle-refactor
papr Jan 2, 2023
f46bc25
Merge master into develop
papr Jan 4, 2023
b5494bc
UVC manager may hide cameras based on vendor/product id
papr Sep 27, 2022
fb1f276
wip
papr Sep 27, 2022
5b1c0f6
Auto-install libusbk drivers for Neon on Windows
papr Jan 2, 2023
c3d25b6
wip shared camera process
papr Jan 4, 2023
4a2fe33
Replace removed histrogram2d keyword argument (numpy 1.24)
papr Jan 5, 2023
f020619
Neon backend wip
papr Jan 5, 2023
3b19e43
HMD Streaming Source: Add option to rename menu name and flip eye vid…
papr Jan 6, 2023
a2dfc71
Split implementation, add auto-select plugin
papr Jan 9, 2023
ac28589
Load intrinsics from camera_models
papr Jan 9, 2023
0fb1c2c
Shared camera: Start stream after init
papr Jan 10, 2023
b3ef005
Stop Capture if shared camera process stops unexpectedly
papr Jan 10, 2023
3f239f0
Capture: Cleanup plugins on exception
papr Jan 10, 2023
4eafff2
Expose uvc bandwidth-factor in UI
papr Jan 10, 2023
644b7ec
world: Remove delay when closing eye windows
papr Jan 10, 2023
b0283b4
Reduce default Neon scene cam resolution and bandwidth factor
papr Jan 10, 2023
c041bfa
Neon scene camera: Set default abdnwidth factor to 1.2
papr Jan 10, 2023
21412d3
Only run shared camera process if there are subscribers
papr Jan 10, 2023
e5954f1
Add Neon scene cam intrinsics for 1280x720 and 640x480
papr Jan 11, 2023
20565eb
Don't show "Local USB" in auto-select menu if only Neon is connected
papr Jan 11, 2023
4f1edc6
Set eye frame publisher to gray if Neon is connected
papr Jan 11, 2023
a571061
Shared camera process: Wait 5 seconds for first frame
papr Jan 11, 2023
c176794
Test: Build Linux bundle on quay.io/pypa/manylinux2014_x86_64
papr Jan 11, 2023
c7cdbc6
Trigger on pull-request
papr Jan 11, 2023
755b456
Expose abs exposure time
papr Jan 12, 2023
9a92607
Eye window: Cleanup plugins on unexpected shutdowns
papr Jan 17, 2023
dcbd6fc
World: Re-raise unexpected exceptions
papr Jan 17, 2023
850ccb5
Main: Handle KeyboardInterrupt if there are other processes remaining
papr Jan 17, 2023
52c3107
Regularly announce shared camera state
papr Jan 17, 2023
0c52614
Expose shared cam exposure settings to UI
papr Jan 17, 2023
3192762
Expose shared camera gain in UI
papr Jan 17, 2023
dd728f4
Move bandwidth factor input field lower + format to 2 digits
papr Jan 17, 2023
8396e25
Shared cam: Add option to restart camera via notification
papr Jan 17, 2023
2a5eb16
Build bundle on ubuntu-18.04
papr Jan 18, 2023
0b2a9fa
Revert debug config
papr Jan 19, 2023
c51c713
Merge pull request #2298 from pupil-labs/bundle-refactor
papr Jan 19, 2023
655b731
Merge pull request #2299 from pupil-labs/neon-support
papr Jan 19, 2023
8d4c692
Support release candidates in version parsing
papr Jan 19, 2023
053f2ce
Camera Models: Combine 3 warnings into 1
papr Jan 19, 2023
cf75875
Add option to notarize during workflow_dispatch
papr Jan 19, 2023
a1ca7d7
Strip whitespace from manual MACOS_SHOULD_SIGN_AND_NOTARIZE
papr Jan 19, 2023
399b277
Set UVC exposure mode to auto
papr Jan 19, 2023
ada880e
Neon: Set Gain slider to read-only mode during disconnect
papr Jan 20, 2023
42a2172
Bundling glfw: Use collect_all instead of manual search
papr Jan 20, 2023
db3a55f
Fix glfw paths in bundles
papr Jan 23, 2023
f41aaaa
Bundles: Only package OpenGL.GL
papr Jan 23, 2023
a3ad581
Bundle on Windows + Linux
papr Jan 23, 2023
b6c6f72
Match CameraSpec by name
papr Jan 23, 2023
14feca4
Linux: Bundle GLX+EGL OpenGL platforms
papr Jan 24, 2023
7cfff3d
DEBUG LOGS for hang on no user input issue
papr Jan 24, 2023
b78a6cc
Update debug logs
papr Jan 24, 2023
0f1e68e
Revert debug logs
papr Jan 24, 2023
10d2857
Remove debug code
papr Jan 25, 2023
d92dd44
Merge pull request #2302 from pupil-labs/bundle-refactor
papr Jan 25, 2023
b22ed40
Logging: Only display time, not dates
papr Jan 25, 2023
21a310f
Clearly state that Pupil Player does not support Neon Companion recor…
papr Jan 25, 2023
d8e9f27
Fix loading Pupil Mobile recordings
papr Jan 25, 2023
f366157
Improve error messages when loading Pupil Cloud CSV export/Neon Compa…
papr Jan 30, 2023
d61de1e
Autoupdate pre-commit to fix build
papr Jan 31, 2023
77f900b
CSV Exports: Finish recovery sentence
papr Jan 31, 2023
edea57c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 31, 2023
9ba3779
Require pye3d 0.3.2 or newer (accomodates Neon camera angles)
papr Jan 31, 2023
42b3674
Set correct Neon eye cam UVC control ranges
papr Feb 1, 2023
65d432d
Fix stopping world/service/player process if launcher stops
papr Feb 1, 2023
4ed286f
Apply suggestions from @willpatera's review
papr Feb 2, 2023
55d68ef
Add newlines to error messages
papr Feb 2, 2023
18c7101
Merge pull request #2304 from pupil-labs/neon-support
papr Feb 2, 2023
5fa8714
Expose canny threshold parameter in the 2D detector menu
papr Feb 2, 2023
d24beb8
Add Neon support to Pupil Service
papr Feb 2, 2023
1a0ef3f
Merge pull request #2306 from pupil-labs/neon-service
papr Feb 2, 2023
2aadeeb
Apply improved wording
papr Feb 9, 2023
bcce5bf
Terminate string lietral
papr Feb 9, 2023
d080a59
Merge pull request #2305 from pupil-labs/neon-support
papr Feb 9, 2023
4b2887c
Post-hoc calib: Fix loading calibrations from relative recording folder
papr Feb 9, 2023
d11e523
Add Neon-specific 3d gazer
papr Feb 9, 2023
8b4b5d9
Neon backend: Force background process to terminate if it is hung-up
papr Feb 10, 2023
60351dd
Merge pull request #2309 from pupil-labs/terminate-hung-up-shared-pro…
papr Feb 10, 2023
1877dd4
Apply timebase to shared Neon eye video frames
papr Feb 14, 2023
325a4cc
Merge pull request #2310 from pupil-labs/neon-support
papr Feb 14, 2023
52f9cf1
Merge pull request #2308 from pupil-labs/neon-specific-3d-calib-param
mikelgg93 Feb 16, 2023
847e747
Merge branch 'master' into develop
papr Feb 16, 2023
ebab635
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 16, 2023
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
95 changes: 95 additions & 0 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Bundle Pupil Core

on:
push:
tags:
- "**"
workflow_dispatch:
inputs:
notarize_on_macos:
description: 'Notarize on macOS'
required: true
type: boolean

jobs:
Bundle:
name: Bundle ${{ matrix.platform }}
strategy:
fail-fast: False
matrix:
platform:
- windows-latest
- macOS-11
- ubuntu-18.04
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Pupil Core dependencies
env:
ARCHFLAGS: "-arch x86_64"
run: |
python -m pip install -U pip wheel
python -m pip install -r requirements.txt -r requirements-bundle.txt
- name: Install Linux-specific dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libportaudio2
- name: Bundle on Windows
if: runner.os == 'Windows'
run: .\reproducible_build.ps1
shell: powershell
working-directory: deployment
- name: Import macOS codesign certificates
if: runner.os == 'macOS'
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
- name: Bundle on Unix
if: runner.os != 'Windows'
run: ./reproducible_build.sh
working-directory: deployment
env:
MACOS_SHOULD_SIGN_AND_NOTARIZE: >
${{
inputs.notarize_on_macos ||
(github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
}}
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
MACOS_NOTARYTOOL_APPLE_ID: ${{ secrets.MACOS_NOTARYTOOL_APPLE_ID }}
MACOS_NOTARYTOOL_TEAM_ID: ${{ secrets.MACOS_NOTARYTOOL_TEAM_ID }}
MACOS_NOTARYTOOL_APPSPECIFIC_PASSWORD: ${{ secrets.MACOS_NOTARYTOOL_APPSPECIFIC_PASSWORD }}
- name: Upload build as artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: bundle-${{ matrix.platform }}
path: |
deployment/*.rar
deployment/*.app
deployment/*.dmg
deployment/*.json
deployment/*.zip

draft_release:
name: Draft Github release
needs: Bundle
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
- name: Create Github release draft
uses: softprops/action-gh-release@v1
with:
files: |
*.rar
*.dmg
*.zip
draft: true
name: Pupil Capture, Player, and Service release
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ mprofile_*.dat
*.dmg
*.zip
deployment/pupil_v*
deployment/build/
deployment/dist/
*.pyd
*.dll
win_drv
.vs
.venv
.venv*

# pyenv local config
.python-version
*.exe
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,32 @@ repos:
- id: check-added-large-files
- id: check-ast
- id: check-toml
- id: check-case-conflict
- id: check-merge-conflict
- id: check-yaml
- id: debug-statements
- id: mixed-line-ending

- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
name: PyUpgrade 3.6+
args: ["--py36-plus"]
exclude: ^bin/

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
hooks:
- id: setup-cfg-fmt
48 changes: 39 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,51 @@ There are a number of ways you can interact with Pupil Core software as a develo

All setup and dependency installation instructions are contained in this repo. All other developer documentation is [here](https://docs.pupil-labs.com/developer/core/overview/ "Pupil Core developer docs").

### Installing Dependencies
- [Ubuntu 18.04 LTS](./docs/dependencies-ubuntu18.md "Pupil dependency installation for Ubuntu 18.04") (recommended Linux distribution)
- [Ubuntu 17.10 or lower](./docs/dependencies-ubuntu17.md "Pupil dependency installation for Ubuntu 17.10 or lower")
- [macOS](./docs/dependencies-macos.md "Pupil dependency installation for macOS")
- [Windows 10](./docs/dependencies-windows.md "Pupil dependency installation for Windows 10")
### Installing Dependencies and Code

### Clone the repo
After you have installed all dependencies, clone this repo and start Pupil software.
To run the source code, you will need Python 3.7 or newer!

Note: It is recommended to install the requirements into a
[virtual environment](https://docs.python.org/3/tutorial/venv.html).

Note: On arm64 macs (e.g. M1 MacBook Air), use the `python3.*-intel64` binary to create
the virtual environment. We do not yet provide arm64-native wheels for the Pupil Core
dependencies.

```sh
git clone https://github.com/pupil-labs/pupil.git # or your fork
git clone https://github.com/pupil-labs/pupil.git
cd pupil
git checkout develop
python -m pip install -r requirements.txt
```

If you have trouble installing any of the dependencies, please see the corresponding
code repository for manual installation steps and troubleshooting.

#### Linux

##### USB Access

To grant Pupil Core applications access to the cameras, run

```sh
echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", MODE="0664"' | sudo tee /etc/udev/rules.d/10-libuvc.rules > /dev/null
sudo udevadm trigger
```

_Note_: If you are using Windows, you will have to complete a few more steps after cloning the repo. Please refer to the [Windows 10 dependencies setup guide](./docs/dependencies-windows.md "Pupil dependency installation for Windows 10").
and ensure that your user is part of the `plugdev` group:

```sh
sudo usermod -a -G plugdev $USER
```

##### Audio Playback

The [`sounddevice`](https://python-sounddevice.readthedocs.io/en/0.4.5/installation.html#installation) package depends on the `libportaudio2` library:

```sh
sudo apt install libportaudio2
```

### Run Pupil

Expand Down
5 changes: 5 additions & 0 deletions deployment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deploy_*/
bundle_*
find_opengl_bigsur.py
pupil_core_hooks.py
pupil_core_v*
13 changes: 8 additions & 5 deletions deployment/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
We use `deploy_capture`, `deploy_player`, and `deploy_service` to create application bundles for deployment.
We use `reproducible_build.*` to create application bundles for deployment.

Since pyinstaller does not cross compile the scripts need to work on mac/linux/windows.


This process in __NOT RECOMMENDED OR REQUIRED FOR USERS__! (Adding documented user support for bundling is hard to support and user problems almost impossible to debug.)
This process in __NOT RECOMMENDED OR REQUIRED FOR USERS__! (Adding documented user
support for bundling is hard to support and user problems almost impossible to debug.)

You have a few options:
- Use the runtime plugin-loader and a recent release bundle to customise your app. (the plugin loader will work in the bundle version just as it does when running from source.) <--RECOMMENDED
- If you just need a recent version of the main repo bundled, raise an issue and we will bundle and release ASAP.
- [Recommended] Use the runtime plugin-loader and a recent release bundle to customise
your app. The plugin loader will work in the bundle version just as it does when
running from source.)
- If you just need a recent version of the main repo bundled, raise an issue and we
will bundle and release ASAP.
- Figure out a setup that bundles by your own. (Expect a world of pain.)
35 changes: 35 additions & 0 deletions deployment/_packaging/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import enum

from version_utils import ParsedVersion, pupil_version, write_version_file

from . import linux, macos, windows


class SupportedPlatform(enum.Enum):
macos = "Darwin"
linux = "Linux"
windows = "Windows"


ICON_EXT = {
SupportedPlatform.macos: ".icns",
SupportedPlatform.linux: ".svg",
SupportedPlatform.windows: ".ico",
}
LIB_EXT = {
SupportedPlatform.macos: ".dylib",
SupportedPlatform.linux: ".so",
SupportedPlatform.windows: ".dll",
}

__all__ = [
"ParsedVersion",
"SupportedPlatform",
"ICON_EXT",
"LIB_EXT",
"linux",
"macos",
"pupil_version",
"windows",
"write_version_file",
]
115 changes: 115 additions & 0 deletions deployment/_packaging/linux.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import pathlib
import shutil
import subprocess

from . import ParsedVersion


def create_zipped_deb_packages(dist_root: pathlib.Path, app_version: ParsedVersion):
deb_folder = dist_root / "debs"
deb_folder.mkdir(exist_ok=True)
for folder in dist_root.glob("Pupil */"):
deb_pkg = create_deb_package(dist_root, folder.name, app_version)
deb_pkg.rename(deb_folder / deb_pkg.name)

shutil.make_archive(str(dist_root), "zip", deb_folder)


def create_deb_package(
dist_root: pathlib.Path, app_name: str, app_version: ParsedVersion
) -> pathlib.Path:
# lets build the structure for our deb package_name.

package_name = app_name.lower().replace(" ", "_")
deb_folder = f"{package_name}_v{app_version}"
deb_root = (dist_root / deb_folder).resolve()
if deb_root.exists():
shutil.rmtree(str(deb_root))

control = deb_root / "DEBIAN" / "control"
desktop = deb_root / "usr" / "share" / "applications" / f"{package_name}.desktop"
starter = deb_root / "usr" / "local" / "bin" / package_name
opt_dir = deb_root / "opt"
ico_dir = deb_root / "usr" / "share" / "icons" / "hicolor" / "scalable" / "apps"

control.parent.mkdir(mode=0o755, exist_ok=True, parents=True)
starter.parent.mkdir(mode=0o755, exist_ok=True, parents=True)
desktop.parent.mkdir(mode=0o755, exist_ok=True, parents=True)
ico_dir.mkdir(mode=0o755, exist_ok=True, parents=True)

startup_WM_class = app_name
if startup_WM_class == "Pupil Capture":
startup_WM_class += " - World"

# DEB control file
with control.open("w") as f:
dist_size = sum(f.stat().st_size for f in dist_root.rglob("*"))
content = f"""\
Package: {package_name.replace("_", "-")}
Version: {app_version}
Architecture: amd64
Maintainer: Pupil Labs <info@pupil-labs.com>
Priority: optional
Description: {app_name} - Find more information on https://docs.pupil-labs.com/core/
Installed-Size: {round(dist_size / 1024)}
"""
# See this link regarding the calculation of the Installed-Size field
# https://www.debian.org/doc/debian-policy/ch-controlfields.html#installed-size
f.write(content)
control.chmod(0o644)

# bin_starter script

with starter.open("w") as f:
content = f'''\
#!/bin/sh
exec /opt/{package_name}/{package_name} "$@"'''
f.write(content)
starter.chmod(0o755)

# .desktop entry
# ATTENTION: In order for the bundle icon to display correctly
# two things are necessary:
# 1. Icon needs to be the icon's base name/stem
# 2. The window title must be equivalent to StartupWMClass
with desktop.open("w") as f:
content = f"""\
[Desktop Entry]
Version={app_version}
Type=Application
Name={app_name}
Comment=Preview Pupil Invisible data streams
Exec=/opt/{package_name}/{package_name}
Terminal=false
Icon={package_name.replace('_', '-')}
Categories=Application;
Name[en_US]={app_name}
Actions=Terminal;
StartupWMClass={startup_WM_class}
[Desktop Action Terminal]
Name=Open in Terminal
Exec=x-terminal-emulator -e {package_name}"""
f.write(content)
desktop.chmod(0o644)

svg_file_name = f"{package_name.replace('_', '-')}.svg"
src_path = pathlib.Path("icons", svg_file_name)
dst_path = ico_dir / svg_file_name
shutil.copy(str(src_path), str(dst_path))
dst_path.chmod(0o755)

# copy the actual application
shutil.copytree(str(dist_root / app_name), str(opt_dir / package_name))
for f in opt_dir.rglob("*"):
if f.is_file():
if f.name == package_name:
f.chmod(0o755)
else:
f.chmod(0o644)
elif f.is_dir():
f.chmod(0o755)
opt_dir.chmod(0o755)

subprocess.call(["fakeroot", "dpkg-deb", "--build", deb_root])
shutil.rmtree(str(deb_root))
return deb_root.with_name(deb_root.name + ".deb")
Loading