[fix] Fixed something wrong on Windows platform

Former-commit-id: 07c24d0706
This commit is contained in:
Leroy.H.Y 2019-10-25 14:13:48 +08:00
parent b8917aee68
commit b96a73317b
7 changed files with 19 additions and 15 deletions

View File

@ -29,14 +29,11 @@ jobs:
- name: Make release package
run: |
cd build
mkdir package
cd package
copy ..\release\Qv2ray.exe .\
copy ..\..\libs\libcrypto-1_1.dll .\
copy ..\..\libs\libssl-1_1.dll .\
cd release
del *.cpp *.h *.o *.qrc *.qm
windeployqt ./Qv2ray.exe --compiler-runtime
cd ..
..\tools\7z.exe a Qv2ray.zip .\package
..\tools\7z.exe a Qv2ray.zip .\release
- name: Upload Artifact
uses: actions/upload-artifact@master
with:

View File

@ -1 +1 @@
0
15

View File

@ -50,6 +50,10 @@
#define NEWLINE "\r\n"
#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
namespace Qv2ray
{
namespace QvConfigModels

View File

@ -74,13 +74,9 @@ namespace Qv2ray
case 7: {
QString path;
#ifdef _WIN32
path = QV2RAY_DEFAULT_VCORE_PATH + ".exe";
#else
path = QV2RAY_DEFAULT_VCORE_PATH;
#endif
root["v2CorePath"] = path;
UPDATELOG("Added ")
UPDATELOG("Added v2CorePath to the config file.")
break;
}
}

View File

@ -62,11 +62,13 @@ namespace Qv2ray
QString StringFromFile(QFile *source)
{
source->open(QIODevice::OpenModeFlag::ReadOnly);
auto str = source->readAll();
source->open(QFile::ReadOnly);
QTextStream stream(source);
QString str = stream.readAll();
source->close();
return str;
}
bool StringToFile(const QString *text, QFile *targetFile)
{
bool override = targetFile->exists();

View File

@ -39,7 +39,7 @@ namespace Qv2ray
BOOL fConnected = FALSE;
DWORD dwThreadId = 0;
HANDLE hPipe = INVALID_HANDLE_VALUE;
auto lpszPipename = QString().toStdWString();
auto lpszPipename = QString(QV2RAY_NETSPEED_PLUGIN_PIPE_NAME_WIN).toStdWString();
while (!isExiting) {
//printf("Pipe Server: Main thread awaiting client connection on %s\n", lpszPipename.c_str());

View File

@ -417,6 +417,11 @@
</item>
<item row="1" column="0">
<widget class="QTextBrowser" name="logText">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>