mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-26 01:31:30 -05:00
commit
1ce3bd4f62
@ -18,7 +18,7 @@ if errorlevel 2 exit /B 2
|
|||||||
if errorlevel 1 goto error_env
|
if errorlevel 1 goto error_env
|
||||||
|
|
||||||
:: Install needed things
|
:: Install needed things
|
||||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-libmicrohttpd mingw-w64-%RsMSYS2Architecture%-xapian-core"
|
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-libmicrohttpd mingw-w64-%RsMSYS2Architecture%-xapian-core mingw-w64-%RsMSYS2Architecture%-cmake mingw-w64-%RsMSYS2Architecture%-rapidjson"
|
||||||
|
|
||||||
:: Plugins
|
:: Plugins
|
||||||
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
|
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
|
||||||
|
@ -99,6 +99,7 @@ copy nul "%RsDeployPath%\portable" %Quite%
|
|||||||
echo copy binaries
|
echo copy binaries
|
||||||
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\RetroShare*.exe" "%RsDeployPath%" %Quite%
|
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\RetroShare*.exe" "%RsDeployPath%" %Quite%
|
||||||
copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe" "%RsDeployPath%" %Quite%
|
copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe" "%RsDeployPath%" %Quite%
|
||||||
|
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
|
||||||
|
|
||||||
echo copy extensions
|
echo copy extensions
|
||||||
for /D %%D in ("%RsBuildPath%\plugins\*") do (
|
for /D %%D in ("%RsBuildPath%\plugins\*") do (
|
||||||
@ -127,6 +128,9 @@ if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" (
|
|||||||
|
|
||||||
copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
||||||
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
||||||
|
for %%D in ("%RsDeployPath%\imageformats\*.dll") do (
|
||||||
|
call :copy_dependencies "%%D" "%RsDeployPath%"
|
||||||
|
)
|
||||||
|
|
||||||
echo copy qss
|
echo copy qss
|
||||||
xcopy /S "%SourcePath%\retroshare-gui\src\qss" "%RsDeployPath%\qss" %Quite%
|
xcopy /S "%SourcePath%\retroshare-gui\src\qss" "%RsDeployPath%\qss" %Quite%
|
||||||
|
@ -1074,26 +1074,22 @@ bool p3PeerMgrIMPL::addFriend(const RsPeerId& input_id, const RsPgpId& input_gpg
|
|||||||
bool p3PeerMgrIMPL::addSslOnlyFriend(
|
bool p3PeerMgrIMPL::addSslOnlyFriend(
|
||||||
const RsPeerId& sslId, const RsPgpId& pgp_id, const RsPeerDetails& dt )
|
const RsPeerId& sslId, const RsPgpId& pgp_id, const RsPeerDetails& dt )
|
||||||
{
|
{
|
||||||
if(sslId.isNull())
|
constexpr auto fname = __PRETTY_FUNCTION__;
|
||||||
|
const auto failure = [&](const std::string& err)
|
||||||
{
|
{
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " Cannot add a null "
|
RsErr() << fname << " " << err << std::endl;
|
||||||
<< "ID as SSL-only friend " << std::endl;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
if(sslId.isNull())
|
||||||
|
return failure("Cannot add a null ID as SSL-only friend");
|
||||||
|
|
||||||
if(pgp_id.isNull())
|
if(pgp_id.isNull())
|
||||||
{
|
return failure( " Cannot add as SSL-only friend a peer with null PGP");
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " Cannot add as SSL-only friend a "
|
|
||||||
<< "peer with null PGP" << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(sslId == getOwnId())
|
if(sslId == getOwnId())
|
||||||
{
|
return failure( "Cannot add yourself as SSL-only friend id:" +
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " Cannot add yourself as SSL-only "
|
sslId.toStdString() );
|
||||||
<< "friend (id=" << sslId << ")" << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool alreadySslFriend = false;
|
bool alreadySslFriend = false;
|
||||||
peerState pstate;
|
peerState pstate;
|
||||||
@ -1116,13 +1112,10 @@ bool p3PeerMgrIMPL::addSslOnlyFriend(
|
|||||||
* PGP id we already know, to avoid nasty tricks with malevolently forged
|
* PGP id we already know, to avoid nasty tricks with malevolently forged
|
||||||
* short invites.*/
|
* short invites.*/
|
||||||
if(alreadySslFriend && pstate.gpg_id != pgp_id)
|
if(alreadySslFriend && pstate.gpg_id != pgp_id)
|
||||||
{
|
return failure( "Cannot SSL-only friend for a pre-existing friend with "
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " Cannot SSL-only friend for "
|
"mismatching PGP-id known: " +
|
||||||
<< "a pre-existing friend with mismatching PGP-id "
|
pstate.gpg_id.toStdString() + " new: " +
|
||||||
<< "known: " << pstate.gpg_id << " new: " << pgp_id
|
pgp_id.toStdString() );
|
||||||
<< std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* It is very important to be expecially carefull setting
|
/* It is very important to be expecially carefull setting
|
||||||
* pstate.skip_pgp_signature_validation to true because this effectively
|
* pstate.skip_pgp_signature_validation to true because this effectively
|
||||||
@ -1137,8 +1130,11 @@ bool p3PeerMgrIMPL::addSslOnlyFriend(
|
|||||||
* connection closed.
|
* connection closed.
|
||||||
* Instead if pstate.skip_pgp_signature_validation would have been
|
* Instead if pstate.skip_pgp_signature_validation would have been
|
||||||
* superficially set to true the PGP signature verification would have been
|
* superficially set to true the PGP signature verification would have been
|
||||||
* skipped and the attacker connection would be accepted. */
|
* skipped and the attacker connection would be accepted.
|
||||||
if(!AuthGPG::getAuthGPG()->isPgpPubKeyAvailable(pgp_id))
|
* If the PGP key is available add it as full friend. */
|
||||||
|
if(AuthGPG::getAuthGPG()->isPgpPubKeyAvailable(pgp_id))
|
||||||
|
AuthGPG::getAuthGPG()->AllowConnection(pgp_id, true);
|
||||||
|
else
|
||||||
pstate.skip_pgp_signature_validation = true;
|
pstate.skip_pgp_signature_validation = true;
|
||||||
|
|
||||||
pstate.gpg_id = pgp_id;
|
pstate.gpg_id = pgp_id;
|
||||||
|
@ -2019,7 +2019,9 @@ QString IdDialog::createUsageString(const RsIdentityUsage& u) const
|
|||||||
case RsIdentityUsage::CHAT_LOBBY_MSG_VALIDATION: // Chat lobby msgs are signed, so each time one comes, or a chat lobby event comes, a signature verificaiton happens.
|
case RsIdentityUsage::CHAT_LOBBY_MSG_VALIDATION: // Chat lobby msgs are signed, so each time one comes, or a chat lobby event comes, a signature verificaiton happens.
|
||||||
{
|
{
|
||||||
ChatId id = ChatId(ChatLobbyId(u.mAdditionalId));
|
ChatId id = ChatId(ChatLobbyId(u.mAdditionalId));
|
||||||
RetroShareLink l = RetroShareLink::createChatRoom(id, QString::fromStdString(id.toStdString()));
|
ChatLobbyInfo linfo ;
|
||||||
|
rsMsgs->getChatLobbyInfo(ChatLobbyId(u.mAdditionalId),linfo);
|
||||||
|
RetroShareLink l = RetroShareLink::createChatRoom(id, QString::fromUtf8(linfo.lobby_name.c_str()));
|
||||||
return tr("Message in chat room %1").arg(l.toHtml()) ;
|
return tr("Message in chat room %1").arg(l.toHtml()) ;
|
||||||
}
|
}
|
||||||
case RsIdentityUsage::GLOBAL_ROUTER_SIGNATURE_CHECK: // Global router message validation
|
case RsIdentityUsage::GLOBAL_ROUTER_SIGNATURE_CHECK: // Global router message validation
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#include "gui/gxs/GxsCommentDialog.h"
|
#include "gui/gxs/GxsCommentDialog.h"
|
||||||
|
#include "gui/gxs/GxsCommentTreeWidget.h"
|
||||||
#include "ui_GxsCommentDialog.h"
|
#include "ui_GxsCommentDialog.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -50,6 +51,7 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic
|
|||||||
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
||||||
connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady()));
|
connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady()));
|
||||||
|
|
||||||
|
connect(ui->commentButton, SIGNAL(clicked()), ui->treeWidget, SLOT(makeComment()));
|
||||||
connect(ui->sortBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortComments(int)));
|
connect(ui->sortBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortComments(int)));
|
||||||
|
|
||||||
// default sort method "HOT".
|
// default sort method "HOT".
|
||||||
|
@ -40,6 +40,32 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout" name="toolBarHLayout">
|
<layout class="QHBoxLayout" name="toolBarHLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="commentButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Comment</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/png/comment.png</normaloff>:/icons/png/comment.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="sortBox">
|
<widget class="QComboBox" name="sortBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -241,6 +241,11 @@ Rshare::Rshare(QStringList args, int &argc, char **argv, const QString &dir)
|
|||||||
localServer= new QLocalServer();
|
localServer= new QLocalServer();
|
||||||
QObject::connect(localServer, SIGNAL(newConnection()), this, SLOT(slotConnectionEstablished()));
|
QObject::connect(localServer, SIGNAL(newConnection()), this, SLOT(slotConnectionEstablished()));
|
||||||
updateLocalServer();
|
updateLocalServer();
|
||||||
|
// clear out any old arguments (race condition?)
|
||||||
|
QSharedMemory newArgs;
|
||||||
|
newArgs.setKey(QString(TARGET) + "_newArgs");
|
||||||
|
if(newArgs.attach(QSharedMemory::ReadWrite))
|
||||||
|
newArgs.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,20 +330,27 @@ Rshare::~Rshare()
|
|||||||
*/
|
*/
|
||||||
void Rshare::slotConnectionEstablished()
|
void Rshare::slotConnectionEstablished()
|
||||||
{
|
{
|
||||||
QLocalSocket *socket = localServer->nextPendingConnection();
|
|
||||||
socket->close();
|
|
||||||
delete socket;
|
|
||||||
|
|
||||||
QSharedMemory newArgs;
|
QSharedMemory newArgs;
|
||||||
newArgs.setKey(QString(TARGET) + "_newArgs");
|
newArgs.setKey(QString(TARGET) + "_newArgs");
|
||||||
|
|
||||||
|
QLocalSocket *socket = localServer->nextPendingConnection();
|
||||||
|
|
||||||
if (!newArgs.attach())
|
if (!newArgs.attach())
|
||||||
{
|
{
|
||||||
std::cerr << "(EE) Rshare::slotConnectionEstablished() Unable to attach to shared memory segment."
|
/* this is not an error. It just means we were notified to check
|
||||||
<< newArgs.errorString().toStdString() << std::endl;
|
newArgs, but none had been set yet.
|
||||||
|
TODO: implement separate ping/take messages
|
||||||
|
std::cerr << "(EE) Rshare::slotConnectionEstablished() Unable to attach to shared memory segment."
|
||||||
|
<< newArgs.errorString().toStdString() << std::endl;
|
||||||
|
*/
|
||||||
|
socket->close();
|
||||||
|
delete socket;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
socket->close();
|
||||||
|
delete socket;
|
||||||
|
|
||||||
QBuffer buffer;
|
QBuffer buffer;
|
||||||
QDataStream in(&buffer);
|
QDataStream in(&buffer);
|
||||||
QStringList args;
|
QStringList args;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user