mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
[fix] Fixed Windows build
This commit is contained in:
parent
1053c72b85
commit
4e142e3e01
6
.github/workflows/build-release.yml
vendored
6
.github/workflows/build-release.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
uses: lhy0403/install-qt-action@v2
|
||||
with:
|
||||
arch: win64_mingw73
|
||||
modules: qtcharts
|
||||
@ -68,7 +68,7 @@ jobs:
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
uses: lhy0403/install-qt-action@v2
|
||||
with:
|
||||
modules: qtcharts
|
||||
# --------------------------------------------------------
|
||||
@ -113,7 +113,7 @@ jobs:
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
uses: lhy0403/install-qt-action@v2
|
||||
with:
|
||||
modules: qtcharts
|
||||
# --------------------------------------------------------
|
||||
|
@ -1 +1 @@
|
||||
1678
|
||||
1687
|
||||
|
@ -189,8 +189,8 @@ win32 {
|
||||
message(" --> Linking against gRPC and protobuf library.")
|
||||
LIBS += -L$$PWD/libs/gRPC-win32/lib/ -llibgrpc++.dll -llibprotobuf.dll
|
||||
|
||||
message(" --> Linking against winHTTP.")
|
||||
LIBS += -lwinhttp -lwininet
|
||||
message(" --> Linking against winHTTP and winSock2.")
|
||||
LIBS += -lwinhttp -lwininet -lws2_32
|
||||
|
||||
INCLUDEPATH += $$PWD/libs/gRPC-win32/include
|
||||
DEPENDPATH += $$PWD/libs/gRPC-win32/include
|
||||
|
@ -39,7 +39,11 @@ namespace Qv2ray
|
||||
int errcode;
|
||||
|
||||
if ((errcode = resolveHost(data.hostName.toStdString(), data.port, &resolved)) != 0) {
|
||||
#if defined (__WIN32) && defined (UNICODE)
|
||||
data.errorMessage = QString::fromStdWString(gai_strerror(errcode));
|
||||
#else
|
||||
data.errorMessage = QSTRING(gai_strerror(errcode));
|
||||
#endif
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <winsock.h>
|
||||
#include <ws2def.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
|
@ -329,9 +329,9 @@ int main(int argc, char *argv[])
|
||||
LOG(MODULE_INIT " " MODULE_UI, "Setting Qv2ray UI themes: " + confObject.uiConfig.theme)
|
||||
}
|
||||
|
||||
#endif
|
||||
// Show MainWindow
|
||||
MainWindow w;
|
||||
#endif
|
||||
#ifndef QT_DEBUG
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user