Skip to content

Commit

Permalink
Update build for newer OS versions (GollyGang#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
timhutton authored Jun 10, 2024
1 parent cabbbc8 commit ed570bd
Show file tree
Hide file tree
Showing 82 changed files with 1,849 additions and 1,818 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-12]
os: [macos-14, macos-13, macos-12]
build_type: [Debug, Release]
runs-on: ${{ matrix.os }}

Expand All @@ -33,33 +33,42 @@ jobs:
- name: Install dependencies
run: |
brew install vtk wxmac
echo "MACOS_QT5_HINT=$(brew --prefix qt5)" >> $GITHUB_ENV
brew install vtk wxwidgets
echo "MACOS_QT5_HINT=$(brew --prefix qt@5)" >> $GITHUB_ENV
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
- name: Configure CMake (macOS 12, 13)
if: ${{ (matrix.os == 'macos-12') || (matrix.os == 'macos-13') }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_PREFIX_PATH=${{ env.MACOS_QT5_HINT }}
- name: Configure CMake (macOS 14)
if: matrix.os == 'macos-14'
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_PREFIX_PATH=${{ env.MACOS_QT5_HINT }} -DUSE_SSE=False
- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.build_type}}

- name: Test (with OpenCL)
if: matrix.build_type == 'Release'
if: ${{ (matrix.build_type == 'Release') && (matrix.os != 'macos-14') }}
# Run the full suite of tests since OpenCL is available
# Since macOS 14, OpenCL is no longer supported. :(
shell: bash
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.build_type}}
run: ctest --output-on-failure -C ${{matrix.build_type}}

- name: Test (without OpenCL)
if: matrix.build_type == 'Debug'
if: ${{ (matrix.build_type == 'Debug') || (matrix.os == 'macos-14') }}
# Run a restricted suite of tests (OpenCL is available but the tests are slow on Debug)
shell: bash
working-directory: ${{runner.workspace}}/build
run: ctest -R rdy -C ${{matrix.build_type}}
run: ctest --output-on-failure -R rdy -C ${{matrix.build_type}}
9 changes: 8 additions & 1 deletion .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ jobs:
- name: git clone
uses: actions/checkout@v4

- name: Install dependencies
- name: Install dependencies (24.04)
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt-get update
sudo apt-get install libvtk9-dev ocl-icd-opencl-dev libgtk-3-dev libwxgtk3.2-dev libpocl2 qtbase5-dev qtdeclarative5-dev
- name: Install dependencies (22.04, 20.04)
if: ${{ (matrix.os == 'ubuntu-22.04') || (matrix.os == 'ubuntu-20.04') }}
run: |
sudo apt-get update
sudo apt-get install libvtk7-dev ocl-icd-opencl-dev libgtk-3-dev libwxgtk3.0-gtk3-dev libpocl2
Expand Down
4 changes: 3 additions & 1 deletion BUILD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ C) Build Ready:
A) Dependencies:

On Debian/Ubuntu:
sudo apt-get install libgtk-3-dev libxt-dev ocl-icd-opencl-dev libglu1-mesa-dev libvtk7-dev libwxgtk3.0-gtk3-dev cmake-curses-gui build-essential git
sudo apt-get install libgtk-3-dev libxt-dev ocl-icd-opencl-dev libglu1-mesa-dev libvtk9-dev libwxgtk3.2-dev cmake-curses-gui build-essential git

(Or look at .github/workflows/build_ubuntu.yml)

On Fedora:
sudo dnf install vtk-devel wxGTK3-devel ocl-icd-devel opencl-headers gcc-c++
Expand Down
22 changes: 7 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2011-2021 The Ready Bunch
# Copyright 2011-2024 The Ready Bunch
#
# This file is part of Ready.
#
Expand Down Expand Up @@ -411,9 +411,9 @@ endif()
#-------------------------------------------wxWidgets----------------------------------------------

if( APPLE )
# on macOS it's best to use locally installed wxWidgets headers and libs
set( wxWidgets_CONFIG_EXECUTABLE /usr/local/bin/wx-config )
set( wxWidgets_wxrc_EXECUTABLE /usr/local/bin/wxrc ) # not used, but no harm leaving it in
# on macOS you might want to to use locally installed wxWidgets headers and libs:
# set( wxWidgets_CONFIG_EXECUTABLE /usr/local/bin/wx-config )
# set( wxWidgets_wxrc_EXECUTABLE /usr/local/bin/wxrc ) # not used, but no harm leaving it in
elseif(UNIX)
# remove -rdynamic from link options on Linux to reduce size by about 1.2MB
set( CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "" )
Expand Down Expand Up @@ -448,17 +448,9 @@ else()
ENDIF(VTK_USE_COCOA)
else()
find_package(PkgConfig)
if("-lwx_gtk2u_core-3.0" IN_LIST wxWidgets_LIBRARIES)
pkg_check_modules(GTK2 REQUIRED gtk+-2.0)
include_directories(${GTK2_INCLUDE_DIRS})
link_libraries(${GTK2_LIBRARIES})
elseif("-lwx_gtk3u_core-3.0" IN_LIST wxWidgets_LIBRARIES)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
include_directories(${GTK3_INCLUDE_DIRS})
link_libraries(${GTK3_LIBRARIES})
else()
message(FATAL_ERROR "Didn't find -lwx_gtk2u_core-3.0 or -lwx_gtk3u_core-3.0 in wxWidgets_LIBRARIES - unable to detect GTK version to use: ${wxWidgets_LIBRARIES}")
endif()
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
include_directories(${GTK3_INCLUDE_DIRS})
link_libraries(${GTK3_LIBRARIES})
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion Help/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<font size=+1><br><br><b>Ready, version 0.11.0</b><br> <!-- check matches CMakeLists.txt -->
</font>
<font size=-1>
<br>Copyright 2011-2021 The Ready Bunch:<br>
<br>Copyright 2011-2024 The Ready Bunch:<br>
Tim Hutton, Robert Munafo, Andrew Trevorrow,<br>
Tom Rokicki, Dan Wills.<br>
<br><img src="about.gif"><br>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Ready supports 1D, 2D and 3D data, as well as polygonal and polyhedral meshes.

<b>Linux:</b>
```
sudo apt-get install libgtk-3-dev libxt-dev ocl-icd-opencl-dev libglu1-mesa-dev libvtk7-dev libwxgtk3.0-gtk3-dev cmake-curses-gui build-essential git
sudo apt-get install libgtk-3-dev libxt-dev ocl-icd-opencl-dev libglu1-mesa-dev libvtk9-dev libwxgtk3.2-dev cmake-curses-gui build-essential git
git clone https://github.com/GollyGang/ready.git
cd ready
cmake -DCMAKE_BUILD_TYPE=Release .
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See Help/credits.html for a list of credits and acknowledgements.
License
---------------------------------------------------------------------------------

Copyright 2011-2021 The Ready Bunch
Copyright 2011-2024 The Ready Bunch

The Ready Bunch is: Tim Hutton, Robert Munafo, Andrew Trevorrow, Tom Rokicki, Dan Wills

Expand Down
2 changes: 1 addition & 1 deletion resources/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>CFBundleShortVersionString</key>
<string>VERSION</string>
<key>CFBundleGetInfoString</key>
<string>Ready version VERSION, Copyright 2011-2021 The Ready Bunch</string>
<string>Ready version VERSION, Copyright 2011-2024 The Ready Bunch</string>
<key>LSRequiresCarbon</key>
<true/>
<key>NSRequiresAquaSystemAppearance</key>
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/HelpPanel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/HelpPanel.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/HtmlInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/HtmlInfo.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/IDs.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ImportImageDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ImportImageDialog.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/InfoPanel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/InfoPanel.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/InteractorStylePainter.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/InteractorStylePainter.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/MakeNewSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/MakeNewSystem.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/PatternsPanel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/PatternsPanel.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/RecordingDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/RecordingDialog.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/app.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/app.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
16 changes: 8 additions & 8 deletions src/gui/frame.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down Expand Up @@ -327,7 +327,7 @@ MyFrame::MyFrame(const wxString& title)
s->SetModified(false);
s->SetFilename("untitled");
s->GenerateInitialPattern();
this->SetCurrentRDSystem(move(s));
this->SetCurrentRDSystem(std::move(s));
}
}

Expand Down Expand Up @@ -988,7 +988,7 @@ void MyFrame::OnAddMyPatterns(wxCommandEvent& event)

void MyFrame::SetCurrentRDSystem(unique_ptr<AbstractRD> sys)
{
this->system = move(sys);
this->system = std::move(sys);
int iChem = IndexFromChemicalName(this->render_settings.GetProperty("active_chemical").GetChemical());
iChem = min(iChem,this->system->GetNumberOfChemicals()-1); // ensure is in valid range
this->render_settings.GetProperty("active_chemical").SetChemical(GetChemicalName(iChem));
Expand Down Expand Up @@ -1608,7 +1608,7 @@ void MyFrame::OnNewPattern(wxCommandEvent& event)
this->SetStatusText(_("Generating data values..."));
sys->CreateDefaultInitialPatternGenerator(sys->GetNumberOfChemicals());
sys->GenerateInitialPattern();
this->SetCurrentRDSystem(move(sys));
this->SetCurrentRDSystem(std::move(sys));

this->system->SetFilename("untitled");
this->system->SetModified(false);
Expand Down Expand Up @@ -1680,7 +1680,7 @@ void MyFrame::OpenFile(const wxString& raw_path, bool remember)
SetDefaultRenderSettings(this->render_settings);
target_system = SystemFactory::CreateFromFile(path.mb_str(),this->is_opencl_available,opencl_platform,opencl_device,this->render_settings,warn_to_update);
this->patterns_panel->SelectPath(path);
this->SetCurrentRDSystem(move(target_system));
this->SetCurrentRDSystem(std::move(target_system));
}
catch(const exception& e)
{
Expand Down Expand Up @@ -2715,7 +2715,7 @@ void MyFrame::MakeDefaultImageSystemFromMesh(vtkUnstructuredGrid* ug)
image_sys->CreateDefaultInitialPatternGenerator(2);
image_sys->GenerateInitialPattern();
this->render_settings.GetProperty("timesteps_per_render").SetInt(16);
this->SetCurrentRDSystem(move(image_sys));
this->SetCurrentRDSystem(std::move(image_sys));
}

// ---------------------------------------------------------------------
Expand All @@ -2734,7 +2734,7 @@ void MyFrame::MakeDefaultMeshSystemFromMesh(vtkUnstructuredGrid* ug)
mesh_sys->SetNumberOfChemicals(2);
mesh_sys->CreateDefaultInitialPatternGenerator(2);
mesh_sys->GenerateInitialPattern();
this->SetCurrentRDSystem(move(mesh_sys));
this->SetCurrentRDSystem(std::move(mesh_sys));
}

// ---------------------------------------------------------------------
Expand Down Expand Up @@ -3515,7 +3515,7 @@ void MyFrame::OnConvertToFullKernel(wxCommandEvent& event)
wxMessageBox(wxString::Format(_T("Error converting rule: %s"),e.what()));
return;
}
this->SetCurrentRDSystem(move(sys));
this->SetCurrentRDSystem(std::move(sys));
}

// ---------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/gui/frame.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/prefs.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/prefs.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/vtk_pipeline.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/vtk_pipeline.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/wxutils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2011-2021 The Ready Bunch
/* Copyright 2011-2024 The Ready Bunch
This file is part of Ready.
Expand Down
Loading

0 comments on commit ed570bd

Please sign in to comment.