瀏覽代碼

Add README.md for examples/qt

hewei.it 4 年之前
父節點
當前提交
425efb1444
共有 3 個文件被更改,包括 44 次插入0 次删除
  1. 38 0
      examples/qt/README.md
  2. 3 0
      examples/qt/client/client.pro
  3. 3 0
      examples/qt/server/server.pro

+ 38 - 0
examples/qt/README.md

@@ -0,0 +1,38 @@
+# Build
+
+## Install Qt
+Download from <https://download.qt.io/archive/qt/> and install.
+
+Add qmake and mingw toolchain to the environment variable PATH, for example:<br>
+`C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin`,
+`C:\Qt\Qt5.14.2\Tools\mingw730_64\bin`
+
+
+## Install cmake
+Download from <https://cmake.org/download/> and install.
+
+Add cmake/bin to the environment variable PATH, for example:<br>
+`C:\Program Files\CMake\bin`
+
+## Build libhv
+```shell
+git clone https://github.com/ithewei/libhv
+cd libhv
+cmake . -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -Bbuild/mingw64
+cmake --build build/mingw64
+```
+
+## Build examples/qt
+```shell
+cd examples/qt/server
+qmake
+mingw32-make
+windeployqt.exe release
+```
+
+```shell
+cd examples/qt/client
+qmake
+mingw32-make
+windeployqt.exe release
+```

+ 3 - 0
examples/qt/client/client.pro

@@ -15,6 +15,9 @@ DEFINES += QT_DEPRECATED_WARNINGS
 # You can also select to disable deprecated APIs only up to a certain version of Qt.
 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
+MOC_DIR     = tmp/moc
+OBJECTS_DIR = tmp/obj
+
 SOURCES += \
     main.cpp \
     mainwindow.cpp \

+ 3 - 0
examples/qt/server/server.pro

@@ -15,6 +15,9 @@ DEFINES += QT_DEPRECATED_WARNINGS
 # You can also select to disable deprecated APIs only up to a certain version of Qt.
 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
+MOC_DIR     = tmp/moc
+OBJECTS_DIR = tmp/obj
+
 SOURCES += \
     main.cpp \
     mainwindow.cpp \