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
This commit is contained in:
Joe Taylor 2013-07-15 20:01:25 +00:00
parent 2f75a60a26
commit 99fd6ad950
2 changed files with 22 additions and 27 deletions

View File

@ -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");

View File

@ -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