mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Use boost::nowide
directly from boost (#9037)
* Use `boost::nowide` directly from boost Cherry-picked from prusa3d/PrusaSlicer@bffa3f8578 Co-authored-by: tamasmeszaros <meszaros.q@gmail.com> * Replaced all occurrences of boost::nowide::narrow for wxStrings with into_u8 Cherry-picked from prusa3d/PrusaSlicer@8d6497297a Co-authored-by: tamasmeszaros <meszaros.q@gmail.com> * Fix flatpak build
This commit is contained in:
parent
45221a2bea
commit
ed45bf425e
39 changed files with 36 additions and 2506 deletions
|
@ -117,7 +117,7 @@ void resolve_path_from_var(const std::string& var, std::vector<std::string>& pat
|
|||
wxString wxdirs;
|
||||
if (! wxGetEnv(boost::nowide::widen(var), &wxdirs) || wxdirs.empty() )
|
||||
return;
|
||||
std::string dirs = boost::nowide::narrow(wxdirs);
|
||||
std::string dirs = into_u8(wxdirs);
|
||||
for (size_t i = dirs.find(':'); i != std::string::npos; i = dirs.find(':'))
|
||||
{
|
||||
paths.push_back(dirs.substr(0, i));
|
||||
|
@ -302,7 +302,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
|||
// if all failed - try creating default home folder
|
||||
if (i == target_candidates.size() - 1) {
|
||||
// create $HOME/.local/share
|
||||
create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/icons" + icon_theme_dirs);
|
||||
create_path(into_u8(wxFileName::GetHomeDir()), ".local/share/icons" + icon_theme_dirs);
|
||||
// copy icon
|
||||
target_dir_icons = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
||||
std::string icon_path = GUI::format("%1%/images/OrcaSlicer.png",resources_dir());
|
||||
|
@ -354,7 +354,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
|||
// if all failed - try creating default home folder
|
||||
if (i == target_candidates.size() - 1) {
|
||||
// create $HOME/.local/share
|
||||
create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/applications");
|
||||
create_path(into_u8(wxFileName::GetHomeDir()), ".local/share/applications");
|
||||
// create desktop file
|
||||
target_dir_desktop = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
||||
std::string path = GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
||||
|
@ -562,7 +562,7 @@ void DesktopIntegrationDialog::perform_downloader_desktop_integration(std::strin
|
|||
// if all failed - try creating default home folder
|
||||
if (!candidate_found) {
|
||||
// create $HOME/.local/share
|
||||
create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/applications");
|
||||
create_path(into_u8(wxFileName::GetHomeDir()), ".local/share/applications");
|
||||
// create desktop file
|
||||
target_dir_desktop = GUI::format("%1%/.local/share", wxFileName::GetHomeDir());
|
||||
std::string path = GUI::format("%1%/applications/OrcaSlicerURLProtocol-%2%%3%.desktop", target_dir_desktop, url_prefix, version_suffix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue