Add support for specifying child process cwd and env to wxExecute().

Add an optional wxExecuteEnv parameter to wxExecute() which allows to specify
the initial working directory and custom environment for the child process.

Closes #12163.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-10-24 22:40:11 +00:00
parent fab8784c71
commit 164db92c14
11 changed files with 424 additions and 43 deletions

View File

@@ -128,7 +128,8 @@ MRESULT APIENTRY wxExecuteWindowCbk( HWND hWnd,
long wxExecute( const wxString& rCommand,
int flags,
wxProcess* pHandler)
wxProcess* pHandler,
const wxExecuteEnv *env)
{
if (rCommand.empty())
{
@@ -219,6 +220,7 @@ long wxExecute(
char** ppArgv
, int flags
, wxProcess* pHandler
, const wxExecuteEnv *env
)
{
wxString sCommand;
@@ -234,6 +236,7 @@ long wxExecute(
return wxExecute( sCommand
,flags
,pHandler
, env
);
}