Skip to content

Commit

Permalink
Debug macOS screen resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSazonov committed Oct 19, 2023
1 parent f2d11d9 commit ba05948
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-12, windows-2022]
os: [ubuntu-20.04, macos-13, windows-2022]

steps:
- name: Check-out repository
Expand Down Expand Up @@ -69,7 +69,6 @@ jobs:
python -m pip install git+https://github.com/ikibalin/cryspy.git@beta
python -m pip install git+https://github.com/easyscience/EasyApp.git@new-easy-app2
- name: Create python resources file
run: |
cd ${{ env.PACKAGE_NAME }}
Expand All @@ -90,10 +89,22 @@ jobs:
Xvfb :0 -screen 0 1920x1080x24 -ac &
echo "DISPLAY=:0" >> $GITHUB_ENV
# Method 1:
# Not working since Oct 2023. VMware is replaced by VirtualBox
# "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080
# system_profiler SPDisplaysDataType | grep Resolution
# Method 2:
# Worked on macOS 12.6.9, but the default resolution already was 1920x1080: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6575129372/job/17861583655
# Fails on macOS 12.7, where default resolution is 1176x885: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6576347514/job/17865526935
# Works on macOS 13.6, where default resolution is again 1920x1080: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6576486407/job/17866007760
# brew install screenresolution
# screenresolution list
# screenresolution get
# screenresolution set 1920x1080x32@30
# screenresolution get
- name: Set up screen (macOS)
if: runner.os == 'macOS'
run: |
"/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080
system_profiler SPDisplaysDataType | grep Resolution
- name: Set up screen (Windows)
Expand Down Expand Up @@ -180,7 +191,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-12, windows-2022]
os: [ubuntu-20.04, macos-13, windows-2022]

steps:
- name: Check-out repository
Expand Down Expand Up @@ -229,10 +240,22 @@ jobs:
Xvfb :0 -screen 0 1920x1080x24 -ac &
echo "DISPLAY=:0" >> $GITHUB_ENV
# Method 1:
# Not working since Oct 2023. VMware is replaced by VirtualBox
# "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080
# system_profiler SPDisplaysDataType | grep Resolution
# Method 2:
# Worked on macOS 12.6.9, but the default resolution already was 1920x1080: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6575129372/job/17861583655
# Fails on macOS 12.7, where default resolution is 1176x885: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6576347514/job/17865526935
# Works on macOS 13.6, where default resolution is again 1920x1080: https://github.com/easyScience/EasyDiffractionBeta/actions/runs/6576486407/job/17866007760
# brew install screenresolution
# screenresolution list
# screenresolution get
# screenresolution set 1920x1080x32@30
# screenresolution get
- name: Set up screen (macOS)
if: runner.os == 'macOS'
run: |
"/Library/Application Support/VMware Tools/vmware-resolutionSet" 1920 1080
system_profiler SPDisplaysDataType | grep Resolution
- name: Set up screen (Windows)
Expand Down
1 change: 1 addition & 0 deletions tools/Scripts/FreezeApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def runPyInstaller():
'--clean', # Clean PyInstaller cache and remove temporary files before building
'--windowed', # Windows and Mac OS X: do not provide a console window for standard i/o.
'--onedir', # Create a one-folder bundle containing an executable (default)
'--target-architecture', 'universal2', # Target architecture (macOS only; valid values: x86_64, arm64, universal2)
#'--specpath', workDirPath(), # Folder to store the generated spec file (default: current directory)
'--distpath', CONFIG.dist_dir, # Where to put the bundled app (default: ./dist)
'--workpath', CONFIG.build_dir, # Where to put all the temporary work files, .log, .pyz and etc. (default: ./build)
Expand Down

0 comments on commit ba05948

Please sign in to comment.