deeptagger: give up on Windows altogether

ORT requires MSVC to build.  MSVC can't use MSYS2 libraries.

CMake + clang-cl doesn't work in MSYS2.

GraphicsMagick doesn't provide development packages for Windows.

There is no getopt on Windows.
This commit is contained in:
Přemysl Eric Janouch 2024-01-21 17:47:56 +01:00
parent 05c3687ab1
commit 7300773b96
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 4 additions and 4 deletions

View File

@ -29,8 +29,7 @@ if you plan on using the GPU-enabled options.
$ ./download.sh $ ./download.sh
$ build/deeptagger models/deepdanbooru-v3-20211112-sgd-e28.model image.jpg $ build/deeptagger models/deepdanbooru-v3-20211112-sgd-e28.model image.jpg
Very little effort is made to make the project compatible with non-POSIX The project requires a POSIX-compatible system to build.
systems.
Options Options
------- -------

View File

@ -116,7 +116,8 @@ read_config(Config &config, const char *path)
} }
read_tags( read_tags(
std::filesystem::path(path).replace_extension("tags"), config.tags); std::filesystem::path(path).replace_extension("tags").string(),
config.tags);
} }
// --- Data preparation -------------------------------------------------------- // --- Data preparation --------------------------------------------------------
@ -720,7 +721,7 @@ main(int argc, char *argv[])
// Load batched images in parallel (the first is for GM, the other for IM). // Load batched images in parallel (the first is for GM, the other for IM).
if (g.batch > 1) { if (g.batch > 1) {
auto value = std::to_string( auto value = std::to_string(
std::max(std::thread::hardware_concurrency() / g.batch, 1L)); std::max(long(std::thread::hardware_concurrency()) / g.batch, 1L));
setenv("OMP_NUM_THREADS", value.c_str(), true); setenv("OMP_NUM_THREADS", value.c_str(), true);
setenv("MAGICK_THREAD_LIMIT", value.c_str(), true); setenv("MAGICK_THREAD_LIMIT", value.c_str(), true);
} }