compile:tss-http win8及以下不支持且不支持mingw,对于此环境不生成目标文件
This commit is contained in:
parent
8f54951a28
commit
64d4255ca3
@ -63,7 +63,12 @@ add_subdirectory(server)
|
|||||||
add_subdirectory(client)
|
add_subdirectory(client)
|
||||||
add_subdirectory(filecomplete)
|
add_subdirectory(filecomplete)
|
||||||
add_subdirectory(tinyaes)
|
add_subdirectory(tinyaes)
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
|
message(STATUS "tss-http can't support mingw, will not compile.")
|
||||||
|
else()
|
||||||
add_subdirectory(http-server)
|
add_subdirectory(http-server)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DEFINED USE_TRANSM_TEST)
|
if (DEFINED USE_TRANSM_TEST)
|
||||||
message(STATUS "USE USE_TRANSM_TEST ${USE_TRANSM_TEST}")
|
message(STATUS "USE USE_TRANSM_TEST ${USE_TRANSM_TEST}")
|
||||||
@ -92,7 +97,12 @@ message(STATUS "VERSION_GIT_HASH: ${VERSION_GIT_HASH}")
|
|||||||
|
|
||||||
install(TARGETS tsc DESTINATION bin)
|
install(TARGETS tsc DESTINATION bin)
|
||||||
install(TARGETS tss DESTINATION bin)
|
install(TARGETS tss DESTINATION bin)
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
|
message(STATUS "tss-http can't support mingw, will not pack.")
|
||||||
|
else()
|
||||||
install(TARGETS tss-http DESTINATION bin)
|
install(TARGETS tss-http DESTINATION bin)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DEFINED USE_BOOST)
|
if (DEFINED USE_BOOST)
|
||||||
install(FILES ${MINGW32_DLLS} DESTINATION bin)
|
install(FILES ${MINGW32_DLLS} DESTINATION bin)
|
||||||
|
@ -98,6 +98,8 @@ Data verification: PASSED
|
|||||||
|
|
||||||
- `v1.5.2`及其以后的代码版本:新增了`tss-http`服务端,简单用于某些时候,客户机上没有`tsc`和`tss`程序时,通过`http`协议传输文件。
|
- `v1.5.2`及其以后的代码版本:新增了`tss-http`服务端,简单用于某些时候,客户机上没有`tsc`和`tss`程序时,通过`http`协议传输文件。
|
||||||
|
|
||||||
|
> 关于`tss-http`编译:不支持`mingw`编译,因此`win8`及以下没有此程序支持。
|
||||||
|
|
||||||
> 示例启动:`tss-http 8080 D:/files`(参数为端口、根目录)。
|
> 示例启动:`tss-http 8080 D:/files`(参数为端口、根目录)。
|
||||||
|
|
||||||
# 三、编译
|
# 三、编译
|
||||||
|
@ -9,8 +9,3 @@ if (MSVC)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(tss-http main.cpp)
|
add_executable(tss-http main.cpp)
|
||||||
|
|
||||||
if(DEFINED USE_BOOST)
|
|
||||||
target_link_directories(tss-http PRIVATE ${MBOOST_LIB_DIR})
|
|
||||||
target_link_libraries(tss-http PRIVATE ${MBOOST_LIBS})
|
|
||||||
endif()
|
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <httplib.h>
|
#include <httplib.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -8,13 +9,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_BOOST
|
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
namespace fs = boost::filesystem;
|
|
||||||
#else
|
|
||||||
#include <filesystem>
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::string u8_to_ansi(const std::string& str)
|
std::string u8_to_ansi(const std::string& str)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user