void startUp() { char thisfile[_MAX_PATH + 1]; char *p; int len; if (!GetModuleFileNameA(gInstance, thisfile, _MAX_PATH)) { FATALERROR("System error - unable to load!"); return; } // fill in here (directory of thisfile) //GetModuleFileName returns an absolute path strcpy(here, thisfile); for (p=here+strlen(here); *p != '\\' && p >= here+2; --p); *++p = '\0'; len = p - here; //VS(here); //VS(&thisfile[len]); launch(here, &thisfile[len]); LoadPythonCom(); // Now Python is up and running (any scripts have run) }
void startUp() { ARCHIVE_STATUS *archive_status; char thisfile[PATH_MAX]; char *p; int len; memset(archive_status, 0, sizeof(ARCHIVE_STATUS *)); if (!GetModuleFileNameA(gInstance, thisfile, PATH_MAX)) { FATALERROR("System error - unable to load!"); return; } // fill in here (directory of thisfile) //GetModuleFileName returns an absolute path strcpy(here, thisfile); for (p=here+strlen(here); *p != '\\' && p >= here+2; --p); *++p = '\0'; len = p - here; //VS(here); //VS(&thisfile[len]); launch(archive_status, here, &thisfile[len]); LoadPythonCom(archive_status); // Now Python is up and running (any scripts have run) }