File tree Expand file tree Collapse file tree 6 files changed +17
-19
lines changed
Expand file tree Collapse file tree 6 files changed +17
-19
lines changed Original file line number Diff line number Diff line change 6161
6262 target_link_libraries (a2lexplorer PRIVATE EXPAT::EXPAT)
6363 target_link_libraries (a2lexplorer PRIVATE ${wxWidgets_LIBRARIES} )
64- target_link_libraries (a2lexplorer PRIVATE ${wxWidgets_LIB_DIR} /wxscintillad.lib)
65- target_link_libraries (a2lexplorer PRIVATE ${wxWidgets_LIB_DIR} /wxlexillad.lib)
6664 target_link_libraries (a2lexplorer PRIVATE ${Boost_LIBRARIES} )
6765endif ()
6866
Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: MIT
44 */
55#include < sstream>
6-
76#include < filesystem>
8- #include < boost/process.hpp>
9- #if (_MSC_VER)
10- #include < boost/process/windows.hpp>
11- #endif
12- #include < boost/filesystem.hpp>
137
148#include < wx/msgdlg.h>
159
1610#include < util/logstream.h>
11+
1712#include " a2ldocument.h"
18- #include " windowid.h"
1913#include " a2lexplorer.h"
2014
2115using namespace util ::log;
Original file line number Diff line number Diff line change 55#include < filesystem>
66#include < codecvt>
77#define BOOST_LOCALE_HIDE_AUTO_PTR
8+
9+ #include < boost/asio.hpp>
810#include < boost/process.hpp>
911#include < boost/filesystem.hpp>
1012#include < boost/locale.hpp>
@@ -28,6 +30,10 @@ using namespace a2l;
2830
2931wxIMPLEMENT_APP (a2lgui::A2lExplorer);
3032
33+ namespace {
34+ boost::asio::io_context kIoContext ;
35+ }
36+
3137namespace a2lgui {
3238
3339wxBEGIN_EVENT_TABLE (A2lExplorer, wxApp)
@@ -119,12 +125,10 @@ void A2lExplorer::OnUpdateOpenLogFile(wxUpdateUIEvent &event) {
119125}
120126
121127
122- // utf8
123128void A2lExplorer::OpenFile (const std::string& filename) const {
124129 if (!notepad_.empty ()) {
125- std::wstring_convert<std::codecvt_utf8_utf16<char16_t >, char16_t > convert;
126- const auto utf16 = convert.from_bytes (filename);
127- boost::process::spawn (notepad_, std::wstring (utf16.begin (), utf16.end ()));
130+ boost::process::process proc (kIoContext , notepad_, {filename} );
131+ proc.detach ();
128132 }
129133}
130134
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ if (NOT Boost_FOUND)
77 set (Boost_ARCHITECTURE -x64)
88 set (Boost_NO_WARN_NEW_VERSIONS ON )
99 set (Boost_DEBUG OFF )
10-
11- find_package (Boost COMPONENTS locale filesystem system )
10+ if (POLICY CMP0167)
11+ cmake_policy (SET CMP0167 OLD)
12+ endif ()
13+ find_package (Boost COMPONENTS locale filesystem system process)
1214 message (STATUS "Boost Found (Try 1): " ${Boost_FOUND} )
1315 message (STATUS "Boost Version: " ${Boost_VERSION_STRING} )
1416 message (STATUS "Boost Include Dirs: " ${Boost_INCLUDE_DIRS} )
@@ -17,7 +19,7 @@ if (NOT Boost_FOUND)
1719 message (STATUS "Boost Root: " ${Boost_ROOT} )
1820 if (NOT Boost_FOUND)
1921 set (Boost_ROOT ${COMP_DIR} /boost/latest)
20- find_package (Boost REQUIRED COMPONENTS locale filesystem system )
22+ find_package (Boost REQUIRED COMPONENTS locale filesystem system process )
2123
2224 message (STATUS "Boost Found (Try 2): " ${Boost_FOUND} )
2325 message (STATUS "Boost Version: " ${Boost_VERSION_STRING} )
Original file line number Diff line number Diff line change 22# SPDX-License-Identifier: MIT
33
44if (NOT wxWidgets_FOUND )
5- find_package (wxWidgets COMPONENTS stc richtext html xml propgrid adv core base)
5+ find_package (wxWidgets COMPONENTS propgrid adv core base)
66endif ()
77
88if (wxWidgets_FOUND)
@@ -29,7 +29,7 @@ if (NOT wxWidgets_FOUND)
2929 endif ()
3030 set (wxWidgets_USE_UNIVERSAL OFF )
3131 endif ()
32- find_package (wxWidgets COMPONENTS stc richtext html xml propgrid adv core base )
32+ find_package (wxWidgets COMPONENTS propgrid adv core base )
3333 include (${wxWidgets_USE_FILE} )
3434
3535endif ()
Original file line number Diff line number Diff line change 44 "dependencies" : [
55 " boost-locale" ,
66 " boost-endian" ,
7+ " boost-asio" ,
78 " boost-process" ,
89 " boost-filesystem"
910 ],
1011 "features" : {
1112 "tools" : {
1213 "description" : " Build GUI and daemons" ,
1314 "dependencies" : [
14- " boost-asio" ,
1515 " wxwidgets"
1616 ]
1717 }
You can’t perform that action at this time.
0 commit comments