windows compilation
Yili Zhao
ylzhao at vip.sina.com
Thu Oct 2 18:11:57 BST 2003
On Thu, 02 Oct 2003 Pablo wrote:
>Yili, you seemd to have written something under windows before, do you
>know how I can get the tempdir?
I have queryed wxWindows documentation, but did not find the class
whose method can obtain system temporary directory. Maybe we can ask
wxWindows team for this question. In windows, the tempdir can be
(for me is: D:\DOCUME~1\ylzhao\LOCALS~1\Temp) obtained by using
win32 SDK function. Or Hugin can let user select their tempdir then
save to congifure now.
>Its really strange, because PTOptimizer usually opens a progress window
>by itself. I don't know why this doesn't happen.
In "RunOptimzerFrame.cpp",
---------------------------------------------------
// create our process
m_process = new wxProcess(this);
m_process->Redirect(); // Does this method lead to optimize window doesn't appear?
m_pid = wxExecute(cmd, wxEXEC_ASYNC, m_process);
---------------------------------------------------
In wxWindows documentation,
---------------------------------------------------
::wxExecute
long wxExecute(const wxString& command, int sync = wxEXEC_ASYNC, wxProcess *callback = NULL)
If callback isn't NULL and if execution is asynchronous, wxProcess::OnTerminate will be called when the process finishes. Specifying this parameter also allows you to redirect the standard input and/or output of the process being launched by calling Redirect. ***If the child process IO is redirected, under Windows the process window is not shown by default (this avoids having to flush an unnecessary console for the processes which don't create any windows anyhow) but a wxEXEC_NOHIDE flag can be used to prevent this from happening, i.e. with this flag the child process window will be shown normally.***
---------------------------------------------------
Pablo, do you note the statements with asterisk?
Yili
More information about the ptX
mailing list