Skip to content

Commit

Permalink
update qt version hoping to fix layout bug, and pick big size for app…
Browse files Browse the repository at this point in the history
… init
  • Loading branch information
toloudis committed Feb 15, 2024
1 parent af06b92 commit f30f513
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
version: 6.5.3
modules: qtwebsockets qtimageformats
- name: macos install deps
if: matrix.os == 'macos-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tagged_master_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
version: 6.5.3
modules: qtwebsockets qtimageformats
- name: macos install deps
if: matrix.os == 'macos-latest'
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if(DEFINED ENV{Qt6_DIR})
list(INSERT CMAKE_PREFIX_PATH 0 $ENV{Qt6_DIR})
endif()

set(AGAVE_QT_VERSION 6.5.1)
set(AGAVE_QT_VERSION 6.5.3)

if(WIN32)
set(GUESS_Qt6_DIR C:/Qt/${AGAVE_QT_VERSION}/msvc2019_64 CACHE STRING "Qt6 directory")
Expand Down Expand Up @@ -137,12 +137,12 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/CMake/conf.py.cmake ${CMAKE_SOURCE_DIR}/docs/
# #####################
# CPack
# #####################
find_package(Qt6QTiffPlugin 6.5.1 REQUIRED PATHS ${Qt6Gui_DIR})
find_package(Qt6QTiffPlugin 6.5.3 REQUIRED PATHS ${Qt6Gui_DIR})

# copy all dlls into place.
if(WIN32)
# find_package(Qt6QWindowsIntegrationPlugin 6.5.1 REQUIRED PATHS ${Qt6Gui_DIR})
# find_package(Qt6QWindowsVistaStylePlugin 6.5.1 REQUIRED PATHS ${Qt6Gui_DIR})
# find_package(Qt6QWindowsIntegrationPlugin 6.5.3 REQUIRED PATHS ${Qt6Gui_DIR})
# find_package(Qt6QWindowsVistaStylePlugin 6.5.3 REQUIRED PATHS ${Qt6Gui_DIR})

# assuming vcpkg has done some work already to get dlls in here
install(
Expand Down Expand Up @@ -212,8 +212,8 @@ if(WIN32)

# ###############
elseif(APPLE)
find_package(Qt6QCocoaIntegrationPlugin 6.5.1 REQUIRED PATHS ${Qt6Gui_DIR})
find_package(Qt6QMacStylePlugin 6.5.1 REQUIRED PATHS ${Qt6Widgets_DIR})
find_package(Qt6QCocoaIntegrationPlugin 6.5.3 REQUIRED PATHS ${Qt6Gui_DIR})
find_package(Qt6QMacStylePlugin 6.5.3 REQUIRED PATHS ${Qt6Widgets_DIR})

# ###############
set(PACKAGE_OSX_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
Expand Down Expand Up @@ -305,7 +305,7 @@ elseif(APPLE)
include(CPack)

else() # Linux
find_package(Qt6QXcbIntegrationPlugin 6.5.1 REQUIRED PATHS ${Qt6Gui_DIR})
find_package(Qt6QXcbIntegrationPlugin 6.5.3 REQUIRED PATHS ${Qt6Gui_DIR})

install(FILES
${PROJECT_SOURCE_DIR}/LICENSE.txt
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN apt-get install -y python3-pip
RUN pip3 install --upgrade pip

# get Qt installed
ENV QT_VERSION=6.5.1
ENV QT_VERSION=6.5.3
RUN pip3 install aqtinstall
RUN aqt install-qt --outputdir /qt linux desktop ${QT_VERSION} -m qtwebsockets qtimageformats
# required for qt offscreen platform plugin
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,60 @@ git submodule update --init
```

### For WINDOWS:

Make sure you are in an environment where vsvarsall has been run, e.g. a "VS2022 x64 Native Tools Command Prompt"

**tensorstore** requires:

- Python 3.7 or later
- CMake 3.24 or later
- Perl, for building libaom from source (default). Must be in PATH. Not required if -DTENSORSTORE_USE_SYSTEM_LIBAOM=ON is specified.
- NASM, for building libjpeg-turbo, libaom, and dav1d from source (default). Must be in PATH.Not required if -DTENSORSTORE*USE_SYSTEM*{JPEG,LIBAOM,DAV1D}=ON is specified.
- GNU Patch or equivalent. Must be in PATH.

A convenient way to install Perl, NASM, and GNU Patch is with chocolatey.

```
choco install strawberryperl nasm patch
```

**Install Qt LTS 6.5.1.**
**Install Qt LTS 6.5.3.**
In your favorite Python virtual environment:

```
pip install aqtinstall
aqt install-qt --outputdir C:\Qt windows desktop 6.5.1 win64_msvc2019_64 -m qtwebsockets qtimageformats
aqt install-qt --outputdir C:\Qt windows desktop 6.5.3 win64_msvc2019_64 -m qtwebsockets qtimageformats
```

Use vcpkg (must use target triplet x64-windows) to install the following:

```
vcpkg install spdlog glm zlib libjpeg-turbo liblzma tiff zstd --triplet x64-windows
```

**Build AGAVE**

```
mkdir build
cd build
# (vs 2022)
cmake -DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake -G "Visual Studio 17 2022" -A x64 -DVCPKG_TARGET_TRIPLET=x64-windows ..
cmake --build .
```

You may need to adjust the vcpkg path depending on your configuration.

If you encounter issues during your build, check that all of your dependencies are installed and try again. You can also build to the INSTALL target with Visual Studio by opening the project solution (`agave.sln`).


### For MAC OS: (using homebrew)

In your favorite Python virtual environment:

```
pip install aqtinstall
aqt install-qt --outputdir ~/Qt mac desktop 6.5.1 -m qtwebsockets qtimageformats
export Qt6_DIR=~/Qt/6.5.1/macos
aqt install-qt --outputdir ~/Qt mac desktop 6.5.3 -m qtwebsockets qtimageformats
export Qt6_DIR=~/Qt/6.5.3/macos
# and then:
brew install spdlog glm libtiff
Expand All @@ -79,15 +85,15 @@ sudo make install

### For LINUX:

Install Qt 6.5.1 in your directory of choice and tell the build where to find it.
Install Qt 6.5.3 in your directory of choice and tell the build where to find it.
In your favorite Python virtual environment:

```
pip install aqtinstall
aqt install-qt --outputdir ~/Qt linux desktop 6.5.1 -m qtwebsockets qtimageformats
aqt install-qt --outputdir ~/Qt linux desktop 6.5.3 -m qtwebsockets qtimageformats
# the next line is needed for CMake
export Qt6_DIR=~/Qt/6.5.1/gcc_64
export Qt6_DIR=~/Qt/6.5.3/gcc_64
```

- sudo apt install libtiff-dev
Expand Down
8 changes: 7 additions & 1 deletion agave_app/agaveGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ agaveGui::agaveGui(QWidget* parent)

m_appScene.initLights();

resize(1280, 720);
// find a nice size to init agave
QScreen* screen = QApplication::primaryScreen();
QRect screenGeometry = screen->geometry();
int height = screenGeometry.height();
int width = screenGeometry.width();
resize(width * 0.8, height * 0.8);
// consider resizeDocks to widen the appearance dock
}

void
Expand Down

0 comments on commit f30f513

Please sign in to comment.