tWin32 uninstaller thread synchronisation problem fixed; configuration files added to start menu shortcuts - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d9cf98ef94f58e7d0914a85a526529b809cd5321
 (DIR) parent cc778bf8f88790111dea11d6900d055e6ebdfbe4
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Fri,  5 Oct 2001 18:10:27 +0000
       
       Win32 uninstaller thread synchronisation problem fixed; configuration files
       added to start menu shortcuts
       
       
       Diffstat:
         M win32/filelist                      |       6 ++++++
         M win32/uninstall.c                   |      10 ++++++++--
       
       2 files changed, 14 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/win32/filelist b/win32/filelist
       t@@ -46,6 +46,12 @@ dopewars.exe
        dopewars help.lnk
        index.html
        
       +dopewars configuration file.lnk
       +dopewars-config.txt
       +
       +dopewars example config.lnk
       +example-cfg.txt
       +
        
        [desktop]
        dopewars.lnk
 (DIR) diff --git a/win32/uninstall.c b/win32/uninstall.c
       t@@ -81,7 +81,7 @@ InstFiles *ReadFileList(HANDLE fin) {
        char *GetProduct(void) {
          char *product;
          product = strrchr(GetCommandLine(),' ');
       -  if (product) return bstrdup(++product);
       +  if (product && strlen(product+1)>0) return bstrdup(++product);
          else {
            DisplayError("This program should be called with a product ID",FALSE,TRUE);
            ExitProcess(1);
       t@@ -268,9 +268,15 @@ DWORD WINAPI DoUninstall(LPVOID lpParam) {
        BOOL CALLBACK MainDlgProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) {
          HANDLE hThread;
          DWORD threadID;
       +  static BOOL startedun=FALSE;
          switch(msg) {
            case WM_INITDIALOG:
       -      hThread = CreateThread(NULL,0,DoUninstall,NULL,0,&threadID);
       +      return TRUE;
       +    case WM_SHOWWINDOW:
       +      if (wParam && !startedun) {
       +        startedun=TRUE;
       +        hThread = CreateThread(NULL,0,DoUninstall,NULL,0,&threadID);
       +      }
              return TRUE;
            case WM_COMMAND:
              if (HIWORD(wParam)==BN_CLICKED && LOWORD(wParam)==BT_DELOK && lParam) {