This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 5f5b49cfd6537fe27708e53113add0a142bd745a Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Thu Jul 28 11:27:37 2022 -0500 support for recent cygwin binaries and nxproxy 3.5.99.x all cygwin binaries and DLLs should be moved into the INSTDIR/bin directory by Windows installer. --- debian/changelog | 3 +++ src/onmainwindow.cpp | 21 +++++++++++---------- src/wapi.cpp | 18 ++++++++++++++++-- src/wapi.h | 2 +- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index 83a50ed..b00a51d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -45,6 +45,9 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium - create default export directory if not exists. - send to broker xdmcpserver in command option when starting xdmcp session. - improve processing stderr from nxproxy. + - support for recent cygwin binaries and nxproxy 3.5.99.x + all cygwin binaries and DLLs should be moved into the + INSTDIR/bin directory by Windows installer. [ Ryan Schmidt ] * New upstream version (4.1.2.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 7b1df5b..666b042 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -6297,10 +6297,11 @@ void ONMainWindow::slotTunnelOk(int) SLOT ( slotProxyStderr() ) ); connect ( nxproxy,SIGNAL ( readyReadStandardOutput() ),this, SLOT ( slotProxyStdout() ) ); - QString proxyCmd="nxproxy -S nx/nx,options="+dirpath+"/options:"+ resumingSession.display; - +#ifdef Q_OS_WIN + proxyCmd="bin\\"+proxyCmd; +#endif #ifdef Q_OS_DARWIN //run nxproxy from bundle QDir dir ( appDir ); @@ -11147,15 +11148,11 @@ void ONMainWindow::generateEtcFiles() #endif /* defined (Q_OS_WIN) */ QTextStream out ( &file ); out<<"StrictModes no\n"<< -#ifdef Q_OS_WIN - "StrictKeyModes no\n" << -#endif - "UsePrivilegeSeparation no\n"<< "PidFile \"" + varDir + "/sshd.pid\"\n" << "AuthorizedKeysFile \"" << authKeyPath << "\"\n"; #ifdef Q_OS_WIN - out << "Subsystem shell "<< wapiShortFileName ( appDir) +"/sh"+"\n"<< - "Subsystem sftp "<< wapiShortFileName ( appDir) +"/sftp-server"+"\n"; + out << "Subsystem shell "<< wapiShortFileName ( appDir) +"/bin/bash"+"\n"<< + "Subsystem sftp "<< wapiShortFileName ( appDir) +"/bin/sftp-server"+"\n"; #else /* * We need to find the sftp-server binary. @@ -11403,7 +11400,11 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k << "-f" << private_key_file; +#ifdef Q_OS_WIN + const int keygen_ret = QProcess::execute ("bin\\ssh-keygen", args); +#else const int keygen_ret = QProcess::execute ("ssh-keygen", args); +#endif if (-2 == keygen_ret) { QMessageBox::critical (this, tr ("ssh-keygen launching error"), @@ -11585,7 +11586,7 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type) x2goDebug<<"Logging cygwin sshd to: "<<sshLog; } - strm<<clientdir<<"\\sshd.exe -D -p "<<clientSshPort.toInt()<<" -f "<< config <<" -h "<<key; + strm<<clientdir<<"\\bin\\sshd.exe -D -p "<<clientSshPort.toInt()<<" -f "<< config <<" -h "<<key; if (debugging){ strm<<" -E "<<"\""<<sshLog.toStdString()<<"\""; } @@ -13619,7 +13620,7 @@ long ONMainWindow::findWindow ( QString text ) return X11FindWindow ( text ); #endif #ifdef Q_OS_WIN - return ( long ) wapiFindWindow ( 0,text.utf16() ); + return ( long ) wapiFindWindow (text); #endif return 0; } diff --git a/src/wapi.cpp b/src/wapi.cpp index c610b19..e7ded94 100644 --- a/src/wapi.cpp +++ b/src/wapi.cpp @@ -206,9 +206,23 @@ bool wapiMoveWindow ( HWND wnd, int x, int y, int width, int height, return MoveWindow ( wnd, x, y, width, height, repaint ); } -HWND wapiFindWindow ( const ushort * className, const ushort * text ) +HWND wapiFindWindow (const QString& text ) { - return FindWindowEx ( 0,0, ( LPCTSTR ) className, ( LPCTSTR ) text ); + HWND w=GetTopWindow(NULL); + char caption[512]; + while (w) + { + if(GetWindowTextA(w, caption, 512)) + { + QString c(caption); + if(c.indexOf(text)!=-1) + { + return w; + } + } + w=GetNextWindow(w,GW_HWNDNEXT); + } + return 0; } bool wapiSetWindowText( HWND wnd, const QString& text) diff --git a/src/wapi.h b/src/wapi.h index bd15a1c..588b58d 100644 --- a/src/wapi.h +++ b/src/wapi.h @@ -61,7 +61,7 @@ bool wapiMoveWindow ( HWND wnd, int x, int y, int width, int height, bool wapiGetBorders ( HWND wnd, int& vBorder, int& hBorder, int& barHeight ); void wapiSetCallBackProc ( void ( *prc ) ( wapiBtnEvent, QPoint ) ); void wapiHideFromTaskBar ( HWND wnd ); -HWND wapiFindWindow ( const ushort * className, const ushort * text ); +HWND wapiFindWindow ( const QString& text); QString wapiShortFileName ( const QString& longName ); bool wapiAccountInfo ( QString* retSid, QString* retUname, QString* primaryGroupSID, QString* primaryGroupName, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git