Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Fix: regsvr32 requires path encapsulation if the path contain… #3364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/slic3r/GUI/wxMediaCtrl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ void wxMediaCtrl2::Load(wxURI url)
[dll_path] {
int res = wxMessageBox(_L("BambuSource has not correctly been registered for media playing! Press Yes to re-register it."), _L("Error"), wxYES_NO | wxICON_ERROR);
if (res == wxYES) {
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"open", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE };
std::wstring quoted_path = L"\"" + dll_path + L"\"";
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"open", L"regsvr32", quoted_path.c_str(), SW_HIDE};
::ShellExecuteEx(&info);
}
});
Expand All @@ -112,7 +113,8 @@ void wxMediaCtrl2::Load(wxURI url)
if (!notified) CallAfter([dll_path] {
int res = wxMessageBox(_L("Using a BambuSource from a different install, video play may not work correctly! Press Yes to fix it."), _L("Warning"), wxYES_NO | wxICON_WARNING);
if (res == wxYES) {
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"open", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE};
std::wstring quoted_path = L"\"" + dll_path + L"\"";
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"open", L"regsvr32", quoted_path.c_str(), SW_HIDE};
::ShellExecuteEx(&info);
}
});
Expand Down Expand Up @@ -235,7 +237,7 @@ WXLRESULT wxMediaCtrl2::MSWWindowProc(WXUINT nMsg,
}
}
}
BOOST_LOG_TRIVIAL(info) << msg.ToUTF8().data();
BOOST_LOG_TRIVIAL(trace) << msg.ToUTF8().data();
return 0;
}
return wxMediaCtrl::MSWWindowProc(nMsg, wParam, lParam);
Expand Down