Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rebase glenn/live-dev branch

  • Loading branch information...
commit 659a810331a9d4177db93e6244e3ae79f9ca9cca 1 parent e146c39
@redmunds redmunds authored
Showing with 13 additions and 7 deletions.
  1. +13 −7 appshell/appshell_extensions_win.cpp
View
20 appshell/appshell_extensions_win.cpp
@@ -327,13 +327,18 @@ static bool ConvertToShortPathName(std::wstring & path)
int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
{
- std::wstring appPath = GetPathToLiveBrowser();
+ std::wstring appPath = L"/c start chrome ";
std::wstring args = appPath;
- if (enableRemoteDebugging)
- args += L" --remote-debugging-port=9222 --allow-file-access-from-files ";
- else
+ if (enableRemoteDebugging) {
+ std::wstring profilePath(ClientApp::AppGetSupportDirectory());
+ profilePath += L"\\live-dev-profile";
+ args += L" --user-data-dir=\"";
+ args += profilePath;
+ args += L"\" --no-first-run --no-default-browser-check --allow-file-access-from-files --remote-debugging-port=9222 ";
+ } else {
args += L" ";
+ }
args += argURL;
// Args must be mutable
@@ -343,11 +348,12 @@ int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
STARTUPINFO si = {0};
si.cb = sizeof(si);
+ si.dwFlags = STARTF_USESHOWWINDOW;
+ si.wShowWindow = SW_HIDE;
PROCESS_INFORMATION pi = {0};
- //Send the whole command in through the args param. Windows will parse the first token up to a space
- //as the processes and feed the rest in as the argument string.
- if (!CreateProcess(NULL, argsBuf.get(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ // Launch cmd.exe and pass in the arguments
+ if (!CreateProcess(_wgetenv(L"COMSPEC"), argsBuf.get(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
return ConvertWinErrorCode(GetLastError());
}
Please sign in to comment.
Something went wrong with that request. Please try again.