Ticket #461: spawn_fix.diff

File spawn_fix.diff, 1.3 KB (added by tryagain, 10 years ago)

Fixes spawn() command (for OSD button) and speech_cmdline on desktop Windows. I've got it compiling and working on desktop Windows with built-in glib, compiled with MSYS/mingw.

  • navit/util.c

     
    538538                dbg(0, "CreateProcess(%s,%s), PID=%i\n",argv[0],cmdline,r->pr.dwProcessId);
    539539                g_free(cmd);
    540540#else
     541                STARTUPINFO startupInfo;
     542                memset(&startupInfo, 0, sizeof(startupInfo));
     543                startupInfo.cb = sizeof(startupInfo);
    541544                cmdline=spawn_process_compose_cmdline(argv);
    542545                args=newSysString(cmdline);
    543                 dwRet=CreateProcess(NULL, args, NULL, NULL, 0, 0, NULL, NULL, NULL, &(r->pr));
     546                dwRet=CreateProcess(NULL, args, NULL, NULL, 0, 0, NULL, NULL, &startupInfo, &(r->pr));
    544547                dbg(0, "CreateProcess(%s), PID=%i\n",cmdline,r->pr.dwProcessId);
    545548#endif
    546549                g_free(cmdline);
  • CMakeLists.txt

     
    134134else(Glib_FOUND)
    135135   set_with_reason(support/glib "Glib not found" TRUE ${INTL_LIBS})
    136136   # speech/cmdline doesn't build with our glib anymore
    137    set_with_reason(speech/cmdline "does not build with support/glib" FALSE)
     137   #set_with_reason(speech/cmdline "does not build with support/glib" FALSE)
    138138endif(Glib_FOUND)
    139139if (Gmodule_FOUND)
    140140   set(HAVE_GMODULE 1)