Skip to content

Commit 58d6739

Browse files
authored
Fix ver2 (#3300)
* Fix win version
1 parent ec18428 commit 58d6739

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

windows_set_ovms_version.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import subprocess
2020

2121
WIN_OV_VERSION_REGEX = re.compile(r'[0-9]{4}.[0-9].[0-9].[^_]+')
22+
WIN_OV_ZIP_PACKAGE_DIR = "openvino_genai_windows_"
2223
VERSION_FILE = "src\\version.hpp"
2324
OVMS_PROJECT_VERSION="2025.2"
2425

@@ -48,14 +49,15 @@ def get_openvino_name(openvino_dir):
4849
# Start searching from directories with biggest version numbers
4950
dirs = sorted(dirs, reverse=True)
5051
for dir in dirs:
51-
matches = WIN_OV_VERSION_REGEX.findall(dir)
52-
if len(matches) > 1:
53-
print("[ERROR] Multiple openvino versions detected in " + os.path.join(root, dir))
54-
exit(-1)
55-
if len(matches) == 1:
56-
print("[INFO] Openvino detected in " + os.path.join(root, dir))
57-
openvino_name = matches[0]
58-
break
52+
if WIN_OV_ZIP_PACKAGE_DIR in dir:
53+
matches = WIN_OV_VERSION_REGEX.findall(dir)
54+
if len(matches) > 1:
55+
print("[ERROR] Multiple openvino versions detected in " + os.path.join(root, dir))
56+
exit(-1)
57+
if len(matches) == 1:
58+
print("[INFO] Openvino detected in " + os.path.join(root, dir))
59+
openvino_name = matches[0]
60+
break
5961

6062
# we search only 1 directory level deep
6163
break

0 commit comments

Comments
 (0)