Changes from G4KLA, required to make latest code play on MacOSX.

It's necessary to convey "appDir" from the GUI to jt9, so that jt9
can find the .lock and .quit files.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3551 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-08-15 17:32:46 +00:00
parent d4242734f4
commit 852159d1b1
3 changed files with 12 additions and 7 deletions

View File

@ -7,7 +7,7 @@ program jt9
integer*4 ihdr(11) integer*4 ihdr(11)
real*4 s(NSMAX) real*4 s(NSMAX)
integer*2 id2 integer*2 id2
character*80 arg,infile character*80 arg,ldir,infile
common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat,ntr, & common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat,ntr, &
mousefqso,newdat,nfa,nfsplit,nfb,ntol,kin,nzhsym,nsynced,ndecoded mousefqso,newdat,nfa,nfsplit,nfb,ntol,kin,nzhsym,nsynced,ndecoded
common/tracer/limtrace,lu common/tracer/limtrace,lu
@ -25,7 +25,8 @@ program jt9
if(arg(1:2).eq.'-s') then if(arg(1:2).eq.'-s') then
! Multiple instances: ! Multiple instances:
call getarg(2,arg) call getarg(2,arg)
call jt9a(trim(arg)) call getarg(3,ldir)
call jt9a(trim(arg),trim(ldir))
go to 999 go to 999
endif endif
read(arg,*) ntrperiod read(arg,*) ntrperiod

View File

@ -1,6 +1,7 @@
subroutine jt9a(thekey) subroutine jt9a(thekey,ldir)
character(len=*), intent(in):: thekey character(len=*), intent(in):: thekey
character(len=*), intent(in):: ldir
! These routines connect the shared memory region to the decoder. ! These routines connect the shared memory region to the decoder.
interface interface
@ -36,13 +37,13 @@ subroutine jt9a(thekey)
i1=attach_jt9() i1=attach_jt9()
10 inquire(file=trim(cwd)//'/.lock',exist=fileExists) 10 inquire(file=trim(ldir)//'/.lock',exist=fileExists)
if(fileExists) then if(fileExists) then
call sleep_msec(100) call sleep_msec(100)
go to 10 go to 10
endif endif
inquire(file=trim(cwd)//'/.quit',exist=fileExists) inquire(file=trim(ldir)//'/.quit',exist=fileExists)
if(fileExists) then if(fileExists) then
! call ftnquit ! call ftnquit
i1=detach_jt9() i1=detach_jt9()
@ -61,7 +62,7 @@ subroutine jt9a(thekey)
call jt9b(p_jt9,nbytes) call jt9b(p_jt9,nbytes)
call timer('jt9b ',1) call timer('jt9b ',1)
100 inquire(file=trim(cwd)//'/.lock',exist=fileExists) 100 inquire(file=trim(ldir)//'/.lock',exist=fileExists)
if(fileExists) go to 10 if(fileExists) go to 10
call sleep_msec(100) call sleep_msec(100)
go to 100 go to 100

View File

@ -321,7 +321,10 @@ MainWindow::MainWindow(QSettings * settings, QSharedMemory *shdmem, QString *the
// Multiple instances: start "jt9 -s <thekey>" // Multiple instances: start "jt9 -s <thekey>"
QByteArray ba = mykey_jt9->toLocal8Bit(); QByteArray ba = mykey_jt9->toLocal8Bit();
const char *bc = ba.data(); const char *bc = ba.data();
proc_jt9.start(QDir::toNativeSeparators('"' + m_appDir + '"' + "/jt9 -s " + bc)); // proc_jt9.start(QDir::toNativeSeparators('"' + m_appDir + '"' + "/jt9 -s " + bc));
QByteArray lda = m_appDir.toLocal8Bit();
const char *ldir = lda.data();
proc_jt9.start(QDir::toNativeSeparators('"' + m_appDir + '"' + "/jt9 -s " + bc + " " + ldir));
m_pbdecoding_style1="QPushButton{background-color: cyan; \ m_pbdecoding_style1="QPushButton{background-color: cyan; \
border-style: outset; border-width: 1px; border-radius: 5px; \ border-style: outset; border-width: 1px; border-radius: 5px; \