From b6687f56490bc8e26394dfe0543b20c3237421e1 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Fri, 25 Apr 2025 02:35:35 -0600 Subject: [PATCH 1/9] updates to c++20 for or-tools compatibility on Windows --- src/dview/dvfilereader.cpp | 2 +- src/ole/iehtmlwin.cpp | 2 +- src/registration.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dview/dvfilereader.cpp b/src/dview/dvfilereader.cpp index cf013dec..76bd4ef8 100644 --- a/src/dview/dvfilereader.cpp +++ b/src/dview/dvfilereader.cpp @@ -1013,7 +1013,7 @@ bool wxDVFileReader::ReadSQLFile(wxDVPlotCtrl *plotWin, const wxString &filename dictionaryIndex = sqlite3_column_int(sqlStmtPtr, 0); name = ColumnText(sqlite3_column_text(sqlStmtPtr, 1)); keyValue = ColumnText(sqlite3_column_text(sqlStmtPtr, 2)).length() ? ColumnText( - sqlite3_column_text(sqlStmtPtr, 2)) : "Site"; + sqlite3_column_text(sqlStmtPtr, 2)) : wxString("Site"); rf = ColumnText(sqlite3_column_text(sqlStmtPtr, 3)); units = ColumnText(sqlite3_column_text(sqlStmtPtr, 4)); diff --git a/src/ole/iehtmlwin.cpp b/src/ole/iehtmlwin.cpp index 1aa0d355..5446ed16 100644 --- a/src/ole/iehtmlwin.cpp +++ b/src/ole/iehtmlwin.cpp @@ -120,7 +120,7 @@ void wxIEHtmlWin::SetupBrowser() { m_webBrowser->put_RegisterAsBrowser(VARIANT_TRUE); m_webBrowser->put_RegisterAsDropTarget(VARIANT_TRUE); - m_webBrowser->Navigate(L"about:blank", NULL, NULL, NULL, NULL); + m_webBrowser->Navigate((BSTR)"about:blank", NULL, NULL, NULL, NULL); } diff --git a/src/registration.cpp b/src/registration.cpp index 5ce936f3..ea566c14 100644 --- a/src/registration.cpp +++ b/src/registration.cpp @@ -289,7 +289,7 @@ END_EVENT_TABLE() wxOnlineRegistration::wxOnlineRegistration(wxWindow *parent) : wxDialog(parent, wxID_ANY, - gs_regData ? gs_regData->GetAppName() + " Registration" : "Software Registration", + gs_regData ? gs_regData->GetAppName() + wxString(" Registration") : wxString("Software Registration"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE) { wxFont font(wxMetroTheme::Font(wxMT_LIGHT, 12)); SetBackgroundColour(wxMetroTheme::Colour(wxMT_FOREGROUND)); From c905c01aa99e3fd85bc3d8532a0bac6358738b42 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Thu, 4 Sep 2025 04:25:15 -0600 Subject: [PATCH 2/9] testing using release versions of wxWidgets --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index add9b59d..32ab2a8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ if (UNIX) endif () else () set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) + set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () From 89cec77f984110df4c987ad6dff5642d8ae9372d Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Wed, 10 Sep 2025 00:14:58 -0600 Subject: [PATCH 3/9] Working on release versions for wxWidgets libraries --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 32ab2a8e..45f13c7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,15 +69,15 @@ endif () if (UNIX) if (EXISTS /usr/local/bin/wx-config-3) set(wxWidgets_CONFIG_EXECUTABLE /usr/local/bin/wx-config-3) - find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) + find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) else () set(wxWidgets_CONFIG_EXECUTABLE $ENV{WXMSW3}/bin/wx-config) - find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) + find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () else () set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) - find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () include(${wxWidgets_USE_FILE}) From 717ca60749bdc4411cbedd217f9316fb678f8ede Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Thu, 11 Sep 2025 03:56:35 -0600 Subject: [PATCH 4/9] wxWidgets in top level - all but export_config building on Windows --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45f13c7f..65dab213 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,9 +75,9 @@ if (UNIX) find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () else () - set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) - set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) - find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) +# set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) +# set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) +# find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () include(${wxWidgets_USE_FILE}) From 7b873389809b12b913ff8fb64751d3f7ecfb10a9 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Sun, 4 Jan 2026 02:28:53 -0700 Subject: [PATCH 5/9] fix issue with wex runner for Windows CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65dab213..b307ba69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,9 +75,9 @@ if (UNIX) find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () else () -# set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) + set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) # set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) -# find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () include(${wxWidgets_USE_FILE}) From b292efc6fb418e06e5a6d1db55fd4622bb78e8b3 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Wed, 4 Feb 2026 01:54:59 -0700 Subject: [PATCH 6/9] Fix broken wexsandbox and DView debug version build on Windows --- CMakeLists.txt | 6 +++--- tools/CMakeLists.txt | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b307ba69..704333e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,10 +74,10 @@ if (UNIX) set(wxWidgets_CONFIG_EXECUTABLE $ENV{WXMSW3}/bin/wx-config) find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () -else () - set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) +#else () +# set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) # set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) - find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) +# find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () include(${wxWidgets_USE_FILE}) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 51816fba..e6b7745d 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -90,6 +90,11 @@ else () target_link_libraries(wexsandbox optimized ${LK_LIB}) endif() endif () + +include(${wxWidgets_USE_FILE}) +add_compile_options(${wxWidgets_CXX_FLAGS}) +add_definitions(-DLK_USE_WXWIDGETS ) + if (UNIX AND NOT APPLE) target_link_libraries(wexsandbox wex ${wxWidgets_LIBRARIES} ${FONTCONFIG_LIBRARY}) else () From 65ea9fbb67ffe757d009325fce54daa52b293bb5 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Wed, 4 Feb 2026 02:23:12 -0700 Subject: [PATCH 7/9] Fix issue with wex GA Windows runner --- CMakeLists.txt | 4 +++- tools/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 704333e3..7afd316b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,7 +80,9 @@ if (UNIX) # find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () -include(${wxWidgets_USE_FILE}) +if (wxWidgets_FOUND) + include(${wxWidgets_USE_FILE}) +endif () set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}") if (UNIX AND NOT APPLE) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index e6b7745d..c14871e0 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -91,7 +91,9 @@ else () endif() endif () -include(${wxWidgets_USE_FILE}) +if (wxWidgets_FOUND) + include(${wxWidgets_USE_FILE}) +endif () add_compile_options(${wxWidgets_CXX_FLAGS}) add_definitions(-DLK_USE_WXWIDGETS ) From 3ea9d0784736d9898df6d774da3a81214feb8bf8 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Thu, 5 Feb 2026 01:19:17 -0700 Subject: [PATCH 8/9] Updates for Windows debug build for GA runners --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7afd316b..74d9020e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,10 +74,10 @@ if (UNIX) set(wxWidgets_CONFIG_EXECUTABLE $ENV{WXMSW3}/bin/wx-config) find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () -#else () -# set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) +else () + set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) # set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) -# find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) endif () if (wxWidgets_FOUND) From b853d5f03a3036bb16aff9aa158a356856fe5953 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 16 Feb 2026 02:24:44 -0700 Subject: [PATCH 9/9] Update all c++ cmake commands to be consistent with ortools v9.14 if(MSVC) set(CMAKE_CXX_STANDARD 20) else() set(CMAKE_CXX_STANDARD 17) endif() --- CMakeLists.txt | 9 +++++---- tools/CMakeLists.txt | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74d9020e..52fd937f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,11 @@ Project(wex C CXX) # Compile Options per Platform # ##################################################################################################################### +if(MSVC) + set(CMAKE_CXX_STANDARD 20) +else() + set(CMAKE_CXX_STANDARD 17) +endif() if (MSVC) add_compile_options(/W3 /MP) @@ -44,10 +49,6 @@ if (MSVC) set(${flag_var} "${${flag_var}} /D_DEBUG" CACHE STRING "compile flags" FORCE) endforeach () else () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -# if (APPLE) -# add_compile_options( -arch x86_64 -arch arm64 ) -# endif () add_compile_options(-Wall -Wno-unknown-pragmas -Wno-strict-aliasing) add_compile_options(-fno-common ${wxWidgets_CXX_FLAGS}) add_definitions(-DLK_USE_WXWIDGETS -D_CRT_SECURE_NO_WARNINGS -D_MBCS -DFT2_BUILD_LIBRARY -DOPJ_STATIC -DFT_CONFIG_MODULES_H=\"slimftmodules.h\" -DFT_CONFIG_OPTIONS_H=\"slimftoptions.h\") diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index c14871e0..afdc5498 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -19,6 +19,11 @@ set(DVIEW_SRC # CMake Targets # ##################################################################################################################### +if(MSVC) + set(CMAKE_CXX_STANDARD 20) +else() + set(CMAKE_CXX_STANDARD 17) +endif() # wexsandbox add_executable(wexsandbox ${WEX_SRC} ${wexsandbox_SRC})