Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #90 from DeadSix27/unicode_yuki
Browse files Browse the repository at this point in the history
Unicode support by Yuki
  • Loading branch information
YukihoAA authored Jan 3, 2019
2 parents ec4ba0a + 8485bea commit 6a8edf9
Show file tree
Hide file tree
Showing 11 changed files with 937 additions and 142 deletions.
4 changes: 4 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ https://github.com/DeadSix27/waifu2x-converter-cpp/releases

Install both SDK's as shown above, but later add "-DFORCE_DUAL=ON" to the cmake command.

#### Building with UNICODE support:

Add "-DBUILD_UNICODE=ON" to the cmake command.

### Building:
##### We will be using `K:/w2x` as our base folder for this guide.
##### If you want to build for both GPU brands, just install both SDKs (see above).
Expand Down
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,17 @@ if(HAVE_OPENCV)
endif()

if(FORCE_AMD)
message("-- -FORCE_AMD=ON is set, not using cuda")
message("-- FORCE_AMD=ON is set, not using cuda")
else()
find_package(CUDA)
endif()

if(BUILD_UNICODE)
add_definitions(-DUNICODE)
add_definitions(-D_UNICODE)
message("-- BUILD_UNICODE=ON is set, Compiles with UNICODE Mode")
endif()

if(WIN32)
if(FORCE_AMD)
set(FindAMDCL_DIR ".")
Expand Down Expand Up @@ -196,7 +202,7 @@ endif()
add_library(w2xc SHARED
src/modelHandler.cpp ${OPT_SOURCES}
src/modelHandler_OpenCL.cpp src/convertRoutine.cpp src/threadPool.cpp
src/modelHandler_CUDA.cpp src/w2xconv.cpp src/common.cpp
src/modelHandler_CUDA.cpp src/w2xconv.cpp src/common.cpp src/wcsfunc.cpp
src/cvwrap.cpp
src/Env.cpp src/Buffer.cpp
)
Expand Down Expand Up @@ -307,7 +313,7 @@ add_custom_target(gensrcs ALL DEPENDS ${GPU_CODE})
enable_testing()

if (${HAVE_OPENCV})
add_executable(waifu2x-converter-cpp src/main.cpp)
add_executable(waifu2x-converter-cpp src/main.cpp src/wcsfunc.cpp)

if(MSVC)
target_link_libraries(waifu2x-converter-cpp LINK_PUBLIC w2xc)
Expand Down
8 changes: 4 additions & 4 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ update_test(const char *dst_path,
const char *src_path)
{
#if (defined _WIN32)
WIN32_FIND_DATA dst_st;
HANDLE finder = FindFirstFile(dst_path, &dst_st);
WIN32_FIND_DATAA dst_st;
HANDLE finder = FindFirstFileA(dst_path, &dst_st);
if (finder == INVALID_HANDLE_VALUE) {
return true;
}

FindClose(finder);

WIN32_FIND_DATA src_st;
finder = FindFirstFile(src_path, &src_st);
WIN32_FIND_DATAA src_st;
finder = FindFirstFileA(src_path, &src_st);
FindClose(finder);

bool old = false;
Expand Down
Loading

0 comments on commit 6a8edf9

Please sign in to comment.