Skip to content

Commit 3884e75

Browse files
committed
change opencv paths in windows
1 parent 913bec1 commit 3884e75

File tree

5 files changed

+28
-30
lines changed

5 files changed

+28
-30
lines changed

.github/workflows/windows.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
OPENCV_VERSION: "4.11.0"
12+
OPENCV_FILES_TAG: "4.11.0.20250505"
1213
TESSERACT_RELEASE_VERSION: "2024.08.19"
1314

1415
jobs:
@@ -44,14 +45,12 @@ jobs:
4445
env:
4546
GH_TOKEN: ${{ github.token }}
4647
run: |
47-
$OPENCV_FILES_TAG = "4.11.0.20250505"
48-
$OPENCV_VERSION = "4110"
49-
gh release download --repo shimat/opencv_files $OPENCV_FILES_TAG --pattern "opencv${OPENCV_VERSION}_win_x64.zip"
50-
gh release download --repo shimat/opencv_files $OPENCV_FILES_TAG --pattern "opencv${OPENCV_VERSION}_win_x86.zip"
51-
Expand-Archive -Path opencv${OPENCV_VERSION}_win_x64.zip -DestinationPath opencv_files/opencv${OPENCV_VERSION}_win_x64 -Force -ErrorAction Stop
52-
Expand-Archive -Path opencv${OPENCV_VERSION}_win_x86.zip -DestinationPath opencv_files/opencv${OPENCV_VERSION}_win_x86 -Force -ErrorAction Stop
48+
gh release download --repo shimat/opencv_files ${env:OPENCV_FILES_TAG} --pattern "opencv_win_x64.zip"
49+
gh release download --repo shimat/opencv_files ${env:OPENCV_FILES_TAG} --pattern "opencv_win_x86.zip"
50+
Expand-Archive -Path opencv_win_x64.zip -DestinationPath opencv_files/opencv_win_x64 -Force -ErrorAction Stop
51+
Expand-Archive -Path opencv_win_x86.zip -DestinationPath opencv_files/opencv_win_x86 -Force -ErrorAction Stop
5352
ls opencv_files
54-
ls opencv_files/opencv${OPENCV_VERSION}_win_x64
53+
ls opencv_files/opencv_win_x64
5554
5655
- name: Cache Tesseract binaries
5756
id: cache_tesseract

download_opencv_windows.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
$tag = "4.11.0.20250505"
2-
$version = "4110"
32
$uriArray = @(
4-
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_win_x64.zip"
5-
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_win_x86.zip"
3+
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv_win_x64.zip"
4+
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv_win_x86.zip"
65
)
76

87
function Download($uri, $outFile) {

nuget/OpenCvSharp4.runtime.uwp.nuspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
<file src="..\src\Release\uwpOpenCvSharpExtern\x64\OpenCvSharpExtern.dll" target="runtimes\win-x64\native" />
2727
<file src="..\src\Release\uwpOpenCvSharpExtern\Win32\OpenCvSharpExtern.dll" target="runtimes\win-x86\native" />
2828
<file src="..\src\Release\uwpOpenCvSharpExtern\ARM\OpenCvSharpExtern.dll" target="runtimes\win-arm\native" />
29-
<file src="..\opencv_files\opencv490_uwp_x64\x64\vc17\bin\opencv_world490.dll" target="runtimes\win-x64\native" />
30-
<file src="..\opencv_files\opencv490_uwp_x86\x86\vc17\bin\opencv_world490.dll" target="runtimes\win-x86\native" />
31-
<file src="..\opencv_files\opencv490_uwp_arm\x86\vc17\bin\opencv_world490.dll" target="runtimes\win-arm\native" />
32-
<file src="..\opencv_files\opencv490_uwp_x64\x64\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-x64\native" />
33-
<file src="..\opencv_files\opencv490_uwp_x86\x86\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-x86\native" />
34-
<file src="..\opencv_files\opencv490_uwp_arm\x86\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-arm\native" />
29+
<file src="..\opencv_files\opencv_uwp_x64\x64\vc17\bin\opencv_world490.dll" target="runtimes\win-x64\native" />
30+
<file src="..\opencv_files\opencv_uwp_x86\x86\vc17\bin\opencv_world490.dll" target="runtimes\win-x86\native" />
31+
<file src="..\opencv_files\opencv_uwp_arm\x86\vc17\bin\opencv_world490.dll" target="runtimes\win-arm\native" />
32+
<file src="..\opencv_files\opencv_uwp_x64\x64\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-x64\native" />
33+
<file src="..\opencv_files\opencv_uwp_x86\x86\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-x86\native" />
34+
<file src="..\opencv_files\opencv_uwp_arm\x86\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-arm\native" />
3535
</files>
3636
</package>

nuget/OpenCvSharp4.runtime.win.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<files>
2828
<file src="..\src\Release\x64\OpenCvSharpExtern.dll" target="runtimes\win-x64\native" />
2929
<file src="..\src\Release\Win32\OpenCvSharpExtern.dll" target="runtimes\win-x86\native" />
30-
<file src="..\opencv_files\opencv4110_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg4110_64.dll" target="runtimes\win-x64\native" />
31-
<file src="..\opencv_files\opencv4110_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg4110.dll" target="runtimes\win-x86\native" />
30+
<file src="..\opencv_files\opencv_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg4110_64.dll" target="runtimes\win-x64\native" />
31+
<file src="..\opencv_files\opencv_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg4110.dll" target="runtimes\win-x86\native" />
3232
<file src="OpenCvSharp4.runtime.win.props" target="build\net48\OpenCvSharp4.runtime.win.props" />
3333
<file src="OpenCvSharp4.runtime.win.props" target="build\netstandard\OpenCvSharp4.runtime.win.props" />
3434
<file src="OpenCvSharp4.runtime.win.props" target="build\netcoreapp\OpenCvSharp4.runtime.win.props" />

src/OpenCvSharpExtern/OpenCvSharpExtern.vcxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@
7979
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)src\$(Configuration)\$(PlatformName)\</OutDir>
8080
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">src\$(Platform)\$(Configuration)\</IntDir>
8181
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
82-
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\opencv_files\opencv4100_win_x64\include;$(IncludePath)</IncludePath>
83-
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\opencv_files\opencv4110_win_x64\include;$(IncludePath)</IncludePath>
84-
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\opencv_files\opencv4100_win_x64\x64\vc16\staticlib;$(LibraryPath)</LibraryPath>
85-
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\opencv_files\opencv4110_win_x64\x64\vc17\staticlib;$(SolutionDir)\tesseract_files\tesseract_vcpkg\x64-windows-static\lib;$(LibraryPath)</LibraryPath>
86-
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\opencv_files\opencv4100_win_x86\include;$(IncludePath)</IncludePath>
87-
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\opencv_files\opencv4110_win_x86\include;$(IncludePath)</IncludePath>
88-
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\opencv_files\opencv4110_win_x86\x86\vc17\staticlib;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib;$(SolutionDir)\tesseract_files\tesseract_vcpkg\x86-windows-static\lib;$(LibraryPath)</LibraryPath>
89-
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\opencv_files\opencv4100_win_x86\x86\vc16\staticlib;$(LibraryPath)</LibraryPath>
82+
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\opencv_files\opencv_win_x64\include;$(IncludePath)</IncludePath>
83+
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\opencv_files\opencv_win_x64\include;$(IncludePath)</IncludePath>
84+
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\opencv_files\opencv_win_x64\x64\vc16\staticlib;$(LibraryPath)</LibraryPath>
85+
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\opencv_files\opencv_win_x64\x64\vc17\staticlib;$(SolutionDir)\tesseract_files\tesseract_vcpkg\x64-windows-static\lib;$(LibraryPath)</LibraryPath>
86+
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\opencv_files\opencv_win_x86\include;$(IncludePath)</IncludePath>
87+
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\opencv_files\opencv_win_x86\include;$(IncludePath)</IncludePath>
88+
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\opencv_files\opencv_win_x86\x86\vc17\staticlib;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib;$(SolutionDir)\tesseract_files\tesseract_vcpkg\x86-windows-static\lib;$(LibraryPath)</LibraryPath>
89+
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\opencv_files\opencv_win_x86\x86\vc16\staticlib;$(LibraryPath)</LibraryPath>
9090
</PropertyGroup>
9191
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
9292
<ClCompile>
@@ -179,8 +179,8 @@
179179
<PostBuildEvent>
180180
<Command>copy "$(LocalDebuggerCommand)" "$(SolutionDir)test\OpenCvSharp.Tests\dll\x86\$(TargetFileName)"
181181
copy "$(LocalDebuggerCommand)" "$(SolutionDir)test\OpenCvSharp.Tests\$(TargetFileName)"
182-
copy "$(SolutionDir)opencv_files\opencv4110_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg4110.dll" "$(SolutionDir)test\OpenCvSharp.Tests\dll\x86\opencv_videoio_ffmpeg4110.dll"
183-
copy "$(SolutionDir)opencv_files\opencv4110_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg4110.dll" "$(SolutionDir)test\OpenCvSharp.Tests\opencv_videoio_ffmpeg4110.dll"
182+
copy "$(SolutionDir)opencv_files\opencv_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg4110.dll" "$(SolutionDir)test\OpenCvSharp.Tests\dll\x86\opencv_videoio_ffmpeg4110.dll"
183+
copy "$(SolutionDir)opencv_files\opencv_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg4110.dll" "$(SolutionDir)test\OpenCvSharp.Tests\opencv_videoio_ffmpeg4110.dll"
184184
</Command>
185185
</PostBuildEvent>
186186
</ItemDefinitionGroup>
@@ -222,8 +222,8 @@ copy "$(SolutionDir)opencv_files\opencv4110_win_x86\x86\vc17\bin\opencv_videoio_
222222
<PostBuildEvent>
223223
<Command>copy "$(LocalDebuggerCommand)" "$(SolutionDir)test\OpenCvSharp.Tests\dll\x64\$(TargetFileName)"
224224
copy "$(LocalDebuggerCommand)" "$(SolutionDir)test\OpenCvSharp.Tests\$(TargetFileName)"
225-
copy "$(SolutionDir)opencv_files\opencv4110_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg4110_64.dll" "$(SolutionDir)test\OpenCvSharp.Tests\opencv_videoio_ffmpeg4110_64.dll"
226-
copy "$(SolutionDir)opencv_files\opencv4110_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg4110_64.dll" "$(SolutionDir)test\OpenCvSharp.Tests\dll\x64\opencv_videoio_ffmpeg4110_64.dll"</Command>
225+
copy "$(SolutionDir)opencv_files\opencv_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg4110_64.dll" "$(SolutionDir)test\OpenCvSharp.Tests\opencv_videoio_ffmpeg4110_64.dll"
226+
copy "$(SolutionDir)opencv_files\opencv_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg4110_64.dll" "$(SolutionDir)test\OpenCvSharp.Tests\dll\x64\opencv_videoio_ffmpeg4110_64.dll"</Command>
227227
</PostBuildEvent>
228228
</ItemDefinitionGroup>
229229
<ItemGroup>

0 commit comments

Comments
 (0)