svn path=/trunk/boinc/; revision=12960

This commit is contained in:
David Anderson 2007-06-19 15:46:53 +00:00
parent f1f81d6431
commit b7fad32d14
4 changed files with 18 additions and 17 deletions

View File

@ -6363,3 +6363,11 @@ Rom 19 June 2007
/
configure.ac
version.h
David 19 June 2007
- manager: v6 graphics fixes. doesn't work yet
clientgui/
ViewWork.cpp
lib/
util.C,h

View File

@ -300,29 +300,22 @@ void CViewWork::OnWorkShowGraphicsNew( wxCommandEvent& WXUNUSED(event) ) {
if (wxYES == iAnswer) {
RESULT* result = pDoc->result(m_pListPane->GetFirstSelected());
if (!result->graphics_exec_path.empty()) {
wxString strCurrentDirectory = wxGetCwd();
wxString strSlotDirectory = result->slot_path.c_str();
char buf[512];
char* argv[2];
argv[0] = "graphics";
argv[1] = 0;
#ifdef __WXMSW__
HANDLE id;
#else
int id;
#endif
wxSetWorkingDirectory(strSlotDirectory);
boinc_resolve_filename("v6graphics", buf, sizeof(buf));
run_program(
(char*)result->slot_path.c_str(),
buf,
result->graphics_exec_path.c_str(),
1,
argv,
0,
NULL,
5,
id
);
wxSetWorkingDirectory(strCurrentDirectory);
}
}

View File

@ -411,7 +411,7 @@ int lookup_group(char* name, gid_t& gid) {
//
#ifdef _WIN32
int run_program(
char* dir, char* file, int argc, char** argv, double nsecs, HANDLE& id
const char* dir, const char* file, int argc, char** argv, double nsecs, HANDLE& id
) {
int retval;
PROCESS_INFORMATION process_info;
@ -455,7 +455,7 @@ int run_program(
}
#else
int run_program(
char* dir, char* file, int argc, char** argv, double nsecs, int& id
const char* dir, const char* file, int argc, char** argv, double nsecs, int& id
) {
int retval;
int pid = fork();

View File

@ -88,13 +88,13 @@ extern pthread_mutex_t getrusage_mutex;
#ifdef _WIN32
extern int run_program(
char* path, char* cdir, int argc, char** argv, double, HANDLE&
const char* path, const char* cdir, int argc, char** argv, double, HANDLE&
);
extern void kill_program(HANDLE);
extern int get_exit_status(HANDLE);
#else
extern int run_program(
char* path, char* cdir, int argc, char** argv, double, int&
const char* path, const char* cdir, int argc, char** argv, double, int&
);
extern void kill_program(int);
extern int get_exit_status(int);