From 902a35de4b715ce2df136e555f2f4e034719769f Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Thu, 3 Aug 2023 22:40:20 -0500 Subject: [PATCH 01/11] Fix transparency in color table layer and radar product layer --- scwx-qt/source/scwx/qt/map/color_table_layer.cpp | 3 +++ scwx-qt/source/scwx/qt/map/radar_product_layer.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scwx-qt/source/scwx/qt/map/color_table_layer.cpp b/scwx-qt/source/scwx/qt/map/color_table_layer.cpp index 3b0d89e4..f6181b5c 100644 --- a/scwx-qt/source/scwx/qt/map/color_table_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/color_table_layer.cpp @@ -134,6 +134,9 @@ void ColorTableLayer::Render( p->shaderProgram_->Use(); + // Set OpenGL blend mode for transparency + gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gl.glUniformMatrix4fv( p->uMVPMatrixLocation_, 1, GL_FALSE, glm::value_ptr(projection)); diff --git a/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp index 710ca3d6..8fb2bbde 100644 --- a/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp @@ -264,6 +264,9 @@ void RadarProductLayer::Render( p->shaderProgram_->Use(); + // Set OpenGL blend mode for transparency + gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + if (p->colorTableNeedsUpdate_) { UpdateColorTable(); From 66d261c68069dbac8b759c73a6564438177324b8 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Thu, 3 Aug 2023 23:20:23 -0500 Subject: [PATCH 02/11] Respect alpha channel value for warning boxes using line-opacity property --- scwx-qt/source/scwx/qt/map/alert_layer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scwx-qt/source/scwx/qt/map/alert_layer.cpp b/scwx-qt/source/scwx/qt/map/alert_layer.cpp index 02740b02..f769231c 100644 --- a/scwx-qt/source/scwx/qt/map/alert_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/alert_layer.cpp @@ -413,11 +413,14 @@ static void AddAlertLayer(std::shared_ptr map, map->removeLayer(fgLayerId); } + const float opacity = outlineColor[3] / 255.0f; + map->addLayer({{"id", bgLayerId}, {"type", "line"}, {"source", sourceId}}, beforeLayer); map->setLayoutProperty(bgLayerId, "line-join", "round"); map->setLayoutProperty(bgLayerId, "line-cap", "round"); map->setPaintProperty(bgLayerId, "line-color", "rgba(0, 0, 0, 255)"); + map->setPaintProperty(bgLayerId, "line-opacity", QString("%1").arg(opacity)); map->setPaintProperty(bgLayerId, "line-width", "5"); map->addLayer({{"id", fgLayerId}, {"type", "line"}, {"source", sourceId}}, @@ -431,6 +434,7 @@ static void AddAlertLayer(std::shared_ptr map, .arg(outlineColor[1]) .arg(outlineColor[2]) .arg(outlineColor[3])); + map->setPaintProperty(fgLayerId, "line-opacity", QString("%1").arg(opacity)); map->setPaintProperty(fgLayerId, "line-width", "3"); } From c5091a3c4344f47a04303d909973e63b44b3da3b Mon Sep 17 00:00:00 2001 From: Michael <96398274+WXFanatics@users.noreply.github.com> Date: Fri, 1 Sep 2023 20:28:23 -0400 Subject: [PATCH 03/11] Update the README with more information Added the documentation link to help guide users who're new. Re-organized Arch and derivatives under supported operating systems. Added necessary dependencies. Added a short FAQ. --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41e6726f..0bd8d045 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ continuously updating weather data on top of a responsive map, providing the capability to monitor weather events using reflectivity, velocity, and other products. +Please be sure to check out the documentation before getting started: [Supercell-Wx Documentation](https://supercell-wx.rtfd.io/) + ![image](https://supercell-wx.readthedocs.io/en/latest/_images/initial-setup-03-initial-configured-small.png) ## Supported Platforms @@ -20,9 +22,33 @@ Supercell Wx supports the following 64-bit operating systems: - Windows 10 (1809 or later) - Windows 11 - Linux - - EndeavourOS + - Arch Linux (EndeavourOS, SteamOS [Steam Deck], and other Arch derivatives) - Fedora Linux 34+ - openSUSE Tumbleweed - - SteamOS (Steam Deck) - Ubuntu 22.04+ - Most distributions supporting the GCC Standard C++ Library 11+ + +## Linux Dependencies + +Supercell Wx requires the following Linux dependencies: + +- Linux/X11 (Wayland works fine too) with support for GCC 11 and OpenGL +- X11/XCB libraries including xcb-cursor + +## FAQ + +Frequently asked questions: + +- Q: Why is the map black when loading for the first time? + + - A. You must obtain a free API key from either (or both) [MapTiler](https://cloud.maptiler.com/auth/widget?next=https://cloud.maptiler.com/maps/) which reuqires no credit/debit card, or [Mapbox](https://account.mapbox.com/) which does require a credit/debit card, but as of writing, you will get 200K free requests per month, which you will never go over by yourself. + +- Q: How come when I change my color table or API key, nothing happens after hitting apply? + + - A. As of right now, you must restart Supercell-Wx in order to apply these changes. In future iterations, this will no longer be an issue. + +- Q. Is it possible to get dark mode? + + - A. In Windows, make sure to set the flag `-style fusion` at the end of the target path of the .exe + - Example: `C:\Users\Administrator\Desktop\Supercell-Wx\bin\supercell-wx.exe -style fusion` + - A. In Linux, if you're using KDE, it should automatically follow your theme settings. From 9f63c7bd654689190a44783653a864587b21b04f Mon Sep 17 00:00:00 2001 From: Michael <96398274+WXFanatics@users.noreply.github.com> Date: Sun, 3 Sep 2023 10:02:42 -0400 Subject: [PATCH 04/11] Update README Added recommended changes, as well as some other minor fixes throughout the README for quality purposes. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0bd8d045..9c5fe733 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ continuously updating weather data on top of a responsive map, providing the capability to monitor weather events using reflectivity, velocity, and other products. -Please be sure to check out the documentation before getting started: [Supercell-Wx Documentation](https://supercell-wx.rtfd.io/) +Please be sure to check out the documentation before getting started: [Supercell Wx Documentation](https://supercell-wx.rtfd.io/) ![image](https://supercell-wx.readthedocs.io/en/latest/_images/initial-setup-03-initial-configured-small.png) @@ -32,7 +32,7 @@ Supercell Wx supports the following 64-bit operating systems: Supercell Wx requires the following Linux dependencies: -- Linux/X11 (Wayland works fine too) with support for GCC 11 and OpenGL +- Linux/X11 (Wayland works too) with support for GCC 11 and OpenGL 3.3 - X11/XCB libraries including xcb-cursor ## FAQ @@ -41,14 +41,14 @@ Frequently asked questions: - Q: Why is the map black when loading for the first time? - - A. You must obtain a free API key from either (or both) [MapTiler](https://cloud.maptiler.com/auth/widget?next=https://cloud.maptiler.com/maps/) which reuqires no credit/debit card, or [Mapbox](https://account.mapbox.com/) which does require a credit/debit card, but as of writing, you will get 200K free requests per month, which you will never go over by yourself. + - A. You must obtain a free API key from either (or both) [MapTiler](https://cloud.maptiler.com/auth/widget?next=https://cloud.maptiler.com/maps/) which currently does not require a credit/debit card, or [Mapbox](https://account.mapbox.com/) which ***does*** require a credit/debit card, but as of writing, you will receive 200K free requests per month, which should be sufficient for an individual user. -- Q: How come when I change my color table or API key, nothing happens after hitting apply? +- Q: Why is it that when I change my color table, API key, grid width/height settings, nothing happens after hitting apply? - - A. As of right now, you must restart Supercell-Wx in order to apply these changes. In future iterations, this will no longer be an issue. + - A. As of right now, you must restart Supercell Wx in order to apply these changes. In future iterations, this will no longer be an issue. - Q. Is it possible to get dark mode? - A. In Windows, make sure to set the flag `-style fusion` at the end of the target path of the .exe - Example: `C:\Users\Administrator\Desktop\Supercell-Wx\bin\supercell-wx.exe -style fusion` - - A. In Linux, if you're using KDE, it should automatically follow your theme settings. + - A. In Linux, if you're using KDE, Supercell Wx should automatically follow your theme settings. From bb6022e4803c6b7eb6ba807893b5a721d43ffe75 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 10 Sep 2023 00:38:56 -0500 Subject: [PATCH 05/11] Don't specify MSVC toolset, use latest/default --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b12ca16..78b4c217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,6 @@ jobs: env_cxx: '' compiler: msvc msvc_arch: x64 - msvc_toolset: 14.36 msvc_version: 2022 qt_version: 6.5.0 qt_arch: win64_msvc2019_64 @@ -84,7 +83,6 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{ matrix.msvc_arch }} - toolset: ${{ matrix.msvc_toolset }} vsversion: ${{ matrix.msvc_version }} - name: Setup Ubuntu Environment From a114e7c6a9c0e7c3d45aa1474e8caca3ec2002fc Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Fri, 18 Aug 2023 19:09:44 -0500 Subject: [PATCH 06/11] Mask API keys in settings dialog --- scwx-qt/source/scwx/qt/ui/settings_dialog.ui | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scwx-qt/source/scwx/qt/ui/settings_dialog.ui b/scwx-qt/source/scwx/qt/ui/settings_dialog.ui index e12f8909..a4e39411 100644 --- a/scwx-qt/source/scwx/qt/ui/settings_dialog.ui +++ b/scwx-qt/source/scwx/qt/ui/settings_dialog.ui @@ -190,7 +190,11 @@ - + + + QLineEdit::Password + + @@ -225,7 +229,11 @@ - + + + QLineEdit::Password + + From 2f972226add357821c1ec6cbfdb80c2fb591ffa1 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 4 Sep 2023 23:48:36 -0500 Subject: [PATCH 07/11] Update to actions/checkout@v4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78b4c217..a1c48f4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: run: git config --global core.longpaths true - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source submodules: recursive From c8aacd688a624d81278e2d01b7eafc6abb00131e Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Wed, 13 Sep 2023 22:25:29 -0500 Subject: [PATCH 08/11] Update Qt to 6.5.2 --- .github/workflows/ci.yml | 4 ++-- setup-debug.bat | 2 +- setup-debug.sh | 2 +- setup-release.bat | 2 +- setup-release.sh | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1c48f4c..e9c743b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: compiler: msvc msvc_arch: x64 msvc_version: 2022 - qt_version: 6.5.0 + qt_version: 6.5.2 qt_arch: win64_msvc2019_64 qt_modules: qtimageformats qt_tools: '' @@ -44,7 +44,7 @@ jobs: env_cc: gcc-11 env_cxx: g++-11 compiler: gcc - qt_version: 6.5.0 + qt_version: 6.5.2 qt_arch: gcc_64 qt_modules: qtimageformats qt_tools: '' diff --git a/setup-debug.bat b/setup-debug.bat index dcc3f2ba..2102a75e 100644 --- a/setup-debug.bat +++ b/setup-debug.bat @@ -1,5 +1,5 @@ call tools\setup-common.bat mkdir build-debug cd build-debug -cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CONFIGURATION_TYPES=Debug -DCMAKE_PREFIX_PATH=C:/Qt/6.5.0/msvc2019_64 .. +cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CONFIGURATION_TYPES=Debug -DCMAKE_PREFIX_PATH=C:/Qt/6.5.2/msvc2019_64 .. pause diff --git a/setup-debug.sh b/setup-debug.sh index bf55697e..74e4b150 100755 --- a/setup-debug.sh +++ b/setup-debug.sh @@ -2,4 +2,4 @@ ./tools/setup-common.sh mkdir -p build-debug cd build-debug -cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CONFIGURATION_TYPES=Debug -DCMAKE_PREFIX_PATH=/opt/Qt/6.5.0/gcc_64 .. +cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CONFIGURATION_TYPES=Debug -DCMAKE_PREFIX_PATH=/opt/Qt/6.5.2/gcc_64 .. diff --git a/setup-release.bat b/setup-release.bat index da10db7c..593e3b69 100644 --- a/setup-release.bat +++ b/setup-release.bat @@ -1,5 +1,5 @@ call tools\setup-common.bat mkdir build-release cd build-release -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_PREFIX_PATH=C:/Qt/6.5.0/msvc2019_64 .. +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_PREFIX_PATH=C:/Qt/6.5.2/msvc2019_64 .. pause diff --git a/setup-release.sh b/setup-release.sh index 04c7c2d9..f85f1eaf 100755 --- a/setup-release.sh +++ b/setup-release.sh @@ -2,4 +2,4 @@ ./tools/setup-common.sh mkdir -p build-release cd build-release -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_PREFIX_PATH=/opt/Qt/6.5.0/gcc_64 .. +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_PREFIX_PATH=/opt/Qt/6.5.2/gcc_64 .. From a88cd27d8be999dabf668944dc2ae558f8c0c997 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Wed, 13 Sep 2023 22:26:38 -0500 Subject: [PATCH 09/11] Don't use relative paths in .gitmodules, to prevent having to fork multiple repositories --- .gitmodules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 7828c19a..880712a3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/conan-io/cmake-conan.git [submodule "test/data"] path = test/data - url = ../supercell-wx-test-data + url = https://github.com/dpaulat/supercell-wx-test-data [submodule "external/hsluv-c"] path = external/hsluv-c url = https://github.com/hsluv/hsluv-c.git @@ -18,13 +18,13 @@ url = https://github.com/nothings/stb.git [submodule "data"] path = data - url = ../supercell-wx-data + url = https://github.com/dpaulat/supercell-wx-data [submodule "external/imgui"] path = external/imgui url = https://github.com/ocornut/imgui.git [submodule "external/imgui-backend-qt"] path = external/imgui-backend-qt - url = ../imgui-backend-qt + url = https://github.com/dpaulat/imgui-backend-qt [submodule "external/aws-sdk-cpp"] path = external/aws-sdk-cpp url = https://github.com/aws/aws-sdk-cpp.git From 67f74d9ededcbdf1e2cc8db99c2d81c0c8dd1402 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 26 Aug 2023 09:51:06 -0500 Subject: [PATCH 10/11] Address sanitizer options --- CMakeLists.txt | 2 ++ scwx-qt/scwx-qt.cmake | 15 +++++++++++++++ wxdata/wxdata.cmake | 8 ++++++++ 3 files changed, 25 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9b28bf5..e26575bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_ALL_NO_LIB") set(SCWX_DIR ${PROJECT_SOURCE_DIR}) set(SCWX_VERSION "0.2.2") +option(SCWX_ADDRESS_SANITIZER "Build with Address Sanitizer" OFF) + add_subdirectory(external) add_subdirectory(wxdata) add_subdirectory(scwx-qt) diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 225d2b19..96f125ee 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -399,6 +399,21 @@ target_compile_options(supercell-wx PRIVATE $<$>:-Wall -Wextra -Wpedantic -Werror> ) +# Address Sanitizer options +if (SCWX_ADDRESS_SANITIZER) + target_compile_options(scwx-qt PRIVATE + $<$:/fsanitize=address> + $<$>:-fsanitize=address -fsanitize-recover=address> + ) + target_compile_options(supercell-wx PRIVATE + $<$:/fsanitize=address> + $<$>:-fsanitize=address -fsanitize-recover=address> + ) + target_link_options(supercell-wx PRIVATE + $<$>:-fsanitize=address> + ) +endif() + if (MSVC) # Produce PDB file for debug target_compile_options(scwx-qt PRIVATE "$<$:/Zi>") diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake index b6c4fb1c..578f522a 100644 --- a/wxdata/wxdata.cmake +++ b/wxdata/wxdata.cmake @@ -265,3 +265,11 @@ endif() set_target_properties(wxdata PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF) + +# Address Sanitizer options +if (SCWX_ADDRESS_SANITIZER) + target_compile_options(wxdata PRIVATE + $<$:/fsanitize=address> + $<$>:-fsanitize=address -fsanitize-recover=address> + ) +endif() From 0a4cf9a9e71851835ff0c467e6eace96541bb4d7 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 16 Sep 2023 00:05:57 -0500 Subject: [PATCH 11/11] Update AWS SDK for C++ to 1.11.165 --- external/aws-sdk-cpp | 2 +- external/aws-sdk-cpp.cmake | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/external/aws-sdk-cpp b/external/aws-sdk-cpp index 8939373b..197a6dfd 160000 --- a/external/aws-sdk-cpp +++ b/external/aws-sdk-cpp @@ -1 +1 @@ -Subproject commit 8939373bde9cd050708a3b166541e9a9d37e2901 +Subproject commit 197a6dfde08071bec386518eb1aa1631903d198d diff --git a/external/aws-sdk-cpp.cmake b/external/aws-sdk-cpp.cmake index 8e2138c4..1ba641db 100644 --- a/external/aws-sdk-cpp.cmake +++ b/external/aws-sdk-cpp.cmake @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.20) set(PROJECT_NAME scwx-aws-sdk-cpp) +set(AWS_SDK_WARNINGS_ARE_ERRORS OFF) set(BUILD_ONLY "s3") set(BUILD_SHARED_LIBS OFF) set(CPP_STANDARD 17) @@ -9,6 +10,7 @@ set(ENABLE_UNITY_BUILD ON) set(MINIMIZE_SIZE OFF) # Some variables also need set in the cache... set them all! +set(AWS_SDK_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Compiler warning is treated as an error. Try turning this off when observing errors on a new or uncommon compiler") set(BUILD_ONLY "s3" CACHE STRING "A semi-colon delimited list of the projects to build") set(BUILD_SHARED_LIBS OFF CACHE BOOL "If enabled, all aws sdk libraries will be build as shared objects; otherwise all Aws libraries will be built as static objects") set(CPP_STANDARD "17" CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.")