From 99fd6ad9503ca907353681f94ccd7bbe6802a585 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 15 Jul 2013 20:01:25 +0000 Subject: [PATCH] Must get m_bMultipleOK from readSettings() before checking whether to kill running instances of jt9.exe. Note, however, that multiple instances still won't work, because each wsjtx-jt9 pair needs its own shared memory region. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3485 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 21 +++++++++++---------- wsjtx.iss | 28 +++++++++++----------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 5f36e349b..2abb8cde8 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -197,16 +197,6 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) : ui->labAz->setStyleSheet("border: 0px;"); ui->labDist->setStyleSheet("border: 0px;"); -#ifdef WIN32 - if(!m_bMultipleOK) { - while(true) { - int iret=killbyname("jt9.exe"); - if(iret == 603) break; - if(iret != 0) msgBox("KillByName return code: " + - QString::number(iret)); - } - } -#endif mem_jt9 = shdmem; readSettings(); //Restore user's setup params if(m_dFreq.length()<=1) { //Use the startup default frequencies @@ -218,6 +208,17 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) : } } +#ifdef WIN32 + if(!m_bMultipleOK) { + while(true) { + int iret=killbyname("jt9.exe"); + if(iret == 603) break; + if(iret != 0) msgBox("KillByName return code: " + + QString::number(iret)); + } + } +#endif + QFile lockFile(m_appDir + "/.lock"); //Create .lock so jt9 will wait lockFile.open(QIODevice::ReadWrite); //QFile quitFile(m_appDir + "/.lock"); diff --git a/wsjtx.iss b/wsjtx.iss index 654ddcfd4..54dec6042 100644 --- a/wsjtx.iss +++ b/wsjtx.iss @@ -1,27 +1,21 @@ [Setup] AppName=wsjtx -AppVerName=wsjtx Version 1.0.0 r3461 +AppVerName=wsjtx Version 1.1.0 r3482 AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT DefaultDirName=c:\wsjtx2 DefaultGroupName=wsjtx2 [Files] -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\wsjtx.exe"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\jt9.exe"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx\lib\jt9code.exe"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\rigctl.exe"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\kvasd.exe"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\wsjt.ico"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\afmhot.dat"; DestDir: "{app}"; -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\blue.dat"; DestDir: "{app}"; -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\CALL3.TXT"; DestDir: "{app}"; Flags: onlyifdoesntexist -Source: "c:\Users\joe\wsjt\QtSupport\*.dll"; DestDir: "{app}"; -Source: "c:\Users\joe\wsjt_k1jt\wsjtx\shortcuts.txt"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx\mouse_commands.txt"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt\wsjtx\WSJT-X_Users_Guide.pdf"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx\WSJT-X_1.1_Quick_Start.pdf"; DestDir: "{app}" -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\save\Samples\130418_1742.wav"; DestDir: "{app}\save\Samples"; -Source: "c:\Users\joe\wsjt_k1jt\wsjtx_install\save\Samples\130610_2343.wav"; DestDir: "{app}\save\Samples"; +Source: "c:\Users\joe\wsjt\wsjtx_install\*.exe"; DestDir: "{app}" +Source: "c:\Users\joe\wsjt\wsjtx_install\*.dll"; DestDir: "{app}"; +Source: "c:\Users\joe\wsjt\wsjtx_install\*.dat"; DestDir: "{app}"; +Source: "c:\Users\joe\wsjt\wsjtx_install\wsjt.ico"; DestDir: "{app}"; +Source: "c:\Users\joe\wsjt\wsjtx_install\CALL3.TXT"; DestDir: "{app}"; Flags: onlyifdoesntexist +Source: "c:\Users\joe\wsjt\wsjtx\shortcuts.txt"; DestDir: "{app}" +Source: "c:\Users\joe\wsjt\wsjtx\mouse_commands.txt"; DestDir: "{app}" +Source: "c:\Users\joe\wsjt\wsjtx\WSJT-X_Users_Guide_v1.1.pdf"; DestDir: "{app}" +Source: "c:\Users\joe\wsjt\wsjtx_install\save\Samples\130418_1742.wav"; DestDir: "{app}\save\Samples"; +Source: "c:\Users\joe\wsjt\wsjtx_install\save\Samples\130610_2343.wav"; DestDir: "{app}\save\Samples"; [Icons] Name: "{group}\wsjtx2"; Filename: "{app}\wsjtx.exe"; WorkingDir: {app}; IconFilename: {app}\wsjt.ico