Skip to content

Commit

Permalink
Updated NuGet packages in samples
Browse files Browse the repository at this point in the history
  • Loading branch information
shimat committed May 23, 2014
1 parent d9b8d76 commit f0ebe87
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 159 deletions.
92 changes: 46 additions & 46 deletions nuget/OpenCvSharp-AnyCPU.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,52 @@
</frameworkAssemblies>
</metadata>
<files>
<file src="..\lib\vc++\x64\msvcp110.dll" target="Content\x64\msvcp110.dll" />
<file src="..\lib\vc++\x64\msvcr110.dll" target="Content\x64\msvcr110.dll" />
<file src="..\src\Release\x64\OpenCvSharpExtern.dll" target="Content\x64\OpenCvSharpExtern.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_calib3d248.dll" target="Content\x64\opencv_calib3d248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_contrib248.dll" target="Content\x64\opencv_contrib248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_core248.dll" target="Content\x64\opencv_core248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_features2d248.dll" target="Content\x64\opencv_features2d248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_ffmpeg248_64.dll" target="Content\x64\opencv_ffmpeg248_64.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_flann248.dll" target="Content\x64\opencv_flann248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_gpu248.dll" target="Content\x64\opencv_gpu248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_highgui248.dll" target="Content\x64\opencv_highgui248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_highgui248d.dll" target="Content\x64\opencv_highgui248d.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_imgproc248.dll" target="Content\x64\opencv_imgproc248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_legacy248.dll" target="Content\x64\opencv_legacy248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_ml248.dll" target="Content\x64\opencv_ml248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_nonfree248.dll" target="Content\x64\opencv_nonfree248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_objdetect248.dll" target="Content\x64\opencv_objdetect248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_ocl248.dll" target="Content\x64\opencv_ocl248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_photo248.dll" target="Content\x64\opencv_photo248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_stitching248.dll" target="Content\x64\opencv_stitching248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_stitching248d.dll" target="Content\x64\opencv_stitching248d.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_superres248.dll" target="Content\x64\opencv_superres248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_video248.dll" target="Content\x64\opencv_video248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_videostab248.dll" target="Content\x64\opencv_videostab248.dll" />
<file src="..\lib\vc++\x86\msvcp110.dll" target="Content\x86\msvcp110.dll" />
<file src="..\lib\vc++\x86\msvcr110.dll" target="Content\x86\msvcr110.dll" />
<file src="..\src\Release\Win32\OpenCvSharpExtern.dll" target="Content\x86\OpenCvSharpExtern.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_calib3d248.dll" target="Content\x86\opencv_calib3d248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_contrib248.dll" target="Content\x86\opencv_contrib248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_core248.dll" target="Content\x86\opencv_core248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_features2d248.dll" target="Content\x86\opencv_features2d248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_ffmpeg248.dll" target="Content\x86\opencv_ffmpeg248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_flann248.dll" target="Content\x86\opencv_flann248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_gpu248.dll" target="Content\x86\opencv_gpu248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_highgui248.dll" target="Content\x86\opencv_highgui248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_imgproc248.dll" target="Content\x86\opencv_imgproc248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_legacy248.dll" target="Content\x86\opencv_legacy248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_ml248.dll" target="Content\x86\opencv_ml248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_nonfree248.dll" target="Content\x86\opencv_nonfree248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_objdetect248.dll" target="Content\x86\opencv_objdetect248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_ocl248.dll" target="Content\x86\opencv_ocl248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_photo248.dll" target="Content\x86\opencv_photo248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_stitching248.dll" target="Content\x86\opencv_stitching248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_superres248.dll" target="Content\x86\opencv_superres248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_video248.dll" target="Content\x86\opencv_video248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_videostab248.dll" target="Content\x86\opencv_videostab248.dll" />
<file src="..\lib\vc++\x64\msvcp110.dll" target="Content\dll\x64\msvcp110.dll" />
<file src="..\lib\vc++\x64\msvcr110.dll" target="Content\dll\x64\msvcr110.dll" />
<file src="..\src\Release\x64\OpenCvSharpExtern.dll" target="Content\dll\x64\OpenCvSharpExtern.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_calib3d248.dll" target="Content\dll\x64\opencv_calib3d248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_contrib248.dll" target="Content\dll\x64\opencv_contrib248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_core248.dll" target="Content\dll\x64\opencv_core248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_features2d248.dll" target="Content\dll\x64\opencv_features2d248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_ffmpeg248_64.dll" target="Content\dll\x64\opencv_ffmpeg248_64.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_flann248.dll" target="Content\dll\x64\opencv_flann248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_gpu248.dll" target="Content\dll\x64\opencv_gpu248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_highgui248.dll" target="Content\dll\x64\opencv_highgui248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_highgui248d.dll" target="Content\dll\x64\opencv_highgui248d.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_imgproc248.dll" target="Content\dll\x64\opencv_imgproc248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_legacy248.dll" target="Content\dll\x64\opencv_legacy248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_ml248.dll" target="Content\dll\x64\opencv_ml248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_nonfree248.dll" target="Content\dll\x64\opencv_nonfree248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_objdetect248.dll" target="Content\dll\x64\opencv_objdetect248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_ocl248.dll" target="Content\dll\x64\opencv_ocl248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_photo248.dll" target="Content\dll\x64\opencv_photo248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_stitching248.dll" target="Content\dll\x64\opencv_stitching248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_stitching248d.dll" target="Content\dll\x64\opencv_stitching248d.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_superres248.dll" target="Content\dll\x64\opencv_superres248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_video248.dll" target="Content\dll\x64\opencv_video248.dll" />
<file src="..\lib\opencv\x64\vc11\opencv_videostab248.dll" target="Content\dll\x64\opencv_videostab248.dll" />
<file src="..\lib\vc++\x86\msvcp110.dll" target="Content\dll\x86\msvcp110.dll" />
<file src="..\lib\vc++\x86\msvcr110.dll" target="Content\dll\x86\msvcr110.dll" />
<file src="..\src\Release\Win32\OpenCvSharpExtern.dll" target="Content\dll\x86\OpenCvSharpExtern.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_calib3d248.dll" target="Content\dll\x86\opencv_calib3d248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_contrib248.dll" target="Content\dll\x86\opencv_contrib248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_core248.dll" target="Content\dll\x86\opencv_core248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_features2d248.dll" target="Content\dll\x86\opencv_features2d248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_ffmpeg248.dll" target="Content\dll\x86\opencv_ffmpeg248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_flann248.dll" target="Content\dll\x86\opencv_flann248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_gpu248.dll" target="Content\dll\x86\opencv_gpu248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_highgui248.dll" target="Content\dll\x86\opencv_highgui248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_imgproc248.dll" target="Content\dll\x86\opencv_imgproc248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_legacy248.dll" target="Content\dll\x86\opencv_legacy248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_ml248.dll" target="Content\dll\x86\opencv_ml248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_nonfree248.dll" target="Content\dll\x86\opencv_nonfree248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_objdetect248.dll" target="Content\dll\x86\opencv_objdetect248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_ocl248.dll" target="Content\dll\x86\opencv_ocl248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_photo248.dll" target="Content\dll\x86\opencv_photo248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_stitching248.dll" target="Content\dll\x86\opencv_stitching248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_superres248.dll" target="Content\dll\x86\opencv_superres248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_video248.dll" target="Content\dll\x86\opencv_video248.dll" />
<file src="..\lib\opencv\x86\vc11\opencv_videostab248.dll" target="Content\dll\x86\opencv_videostab248.dll" />
<file src="..\src\OpenCvSharp.Blob\bin\Release\OpenCvSharp.Blob.dll" target="lib\net20\OpenCvSharp.Blob.dll" />
<file src="..\src\OpenCvSharp.Blob\bin\Release\OpenCvSharp.Blob.dll.config" target="lib\net20\OpenCvSharp.Blob.dll.config" />
<file src="..\src\OpenCvSharp.CPlusPlus\bin\Release\OpenCvSharp.CPlusPlus.dll" target="lib\net20\OpenCvSharp.CPlusPlus.dll" />
Expand Down
Binary file modified nuget/icon/Girl.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 45 additions & 15 deletions nuget/tools-x86/install.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
param($installPath, $toolsPath, $package, $project)

$platform = "x86"

# 指定したディレクトリを「新しい場合はコピー」にする
function MarkDirectoryAsCopy($item)
{
Expand All @@ -26,7 +24,7 @@ $platforms = @(
"x86";
"x64";
)
$copyFiles = @(
$copyFilesX86 = @(
"msvcp110.dll";
"msvcr110.dll";
"OpenCvSharpExtern.dll";
Expand All @@ -35,6 +33,29 @@ $copyFiles = @(
"opencv_core248.dll";
"opencv_features2d248.dll";
"opencv_ffmpeg248.dll";
"opencv_gpu248.dll";
"opencv_flann248.dll";
"opencv_highgui248.dll";
"opencv_imgproc248.dll";
"opencv_legacy248.dll";
"opencv_ml248.dll";
"opencv_nonfree248.dll";
"opencv_ocl248.dll";
"opencv_objdetect248.dll";
"opencv_photo248.dll";
"opencv_stitching248.dll";
"opencv_superres248.dll";
"opencv_video248.dll";
"opencv_videostab248.dll";
)
$copyFilesX64 = @(
"msvcp110.dll";
"msvcr110.dll";
"OpenCvSharpExtern.dll";
"opencv_calib3d248.dll";
"opencv_contrib248.dll";
"opencv_core248.dll";
"opencv_features2d248.dll";
"opencv_ffmpeg248_64.dll";
"opencv_gpu248.dll";
"opencv_flann248.dll";
Expand All @@ -52,34 +73,43 @@ $copyFiles = @(
"opencv_videostab248.dll";
)

foreach ( $platform in $platforms )
# x86
foreach ($file in $copyFilesX86)
{
foreach ( $file in $copyFiles )
{
$path = [System::IO::Path]::Combine($platform, $file)
MarkFileAsCopy($project.ProjectItems.Item($path))
}
$dllDir = $project.ProjectItems.Item("dll")
$platFormDir = $dllDir.ProjectItems.Item("x86")
MarkFileAsCopy($platFormDir.ProjectItems.Item($file))
}
# x64
foreach ($file in $copyFilesX64)
{
$dllDir = $project.ProjectItems.Item("dll")
$platFormDir = $dllDir.ProjectItems.Item("x64")
MarkFileAsCopy($platFormDir.ProjectItems.Item($file))
}



function HasPlatform($manager, $platformName)
{
$platforms = [Array] $manager.PlatformNames
$index = [System.Array]::IndexOf($platforms, $platformName)
$myPlatforms = [Array] $manager.PlatformNames
$index = [System.Array]::IndexOf($myPlatforms, $platformName)
$index -ge 0
}

$manager = $project.ConfigurationManager
$configs = [Array] $manager.PlatformNames
$hasPlatform = HasPlatform $manager $platform
if(-not $hasPlatform)

foreach ($p in $platforms)
{
[void]$manager.AddPlatform($platform, "Any CPU", $true)
$hasPlatform = HasPlatform $manager $p
if(-not $hasPlatform)
{
[void]$manager.AddPlatform($p, "Any CPU", $true)
}
}



#foreach ($config in $configs)
#{
# [System.Windows.Forms.MessageBox]::Show(HasPlatform)
Expand Down
1 change: 0 additions & 1 deletion src/OpenCvSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ Global
{8E7279F8-F801-4672-B42F-1ED2C68B16A4}.Release JP|x86.ActiveCfg = Release|Win32
{8E7279F8-F801-4672-B42F-1ED2C68B16A4}.Release JP|x86.Build.0 = Release|Win32
{8E7279F8-F801-4672-B42F-1ED2C68B16A4}.Release|Any CPU.ActiveCfg = Release|Win32
{8E7279F8-F801-4672-B42F-1ED2C68B16A4}.Release|Any CPU.Build.0 = Release|Win32
{8E7279F8-F801-4672-B42F-1ED2C68B16A4}.Release|Mixed Platforms.ActiveCfg = Release|x64
{8E7279F8-F801-4672-B42F-1ED2C68B16A4}.Release|Mixed Platforms.Build.0 = Release|x64
{8E7279F8-F801-4672-B42F-1ED2C68B16A4}.Release|Win32.ActiveCfg = Release|Win32
Expand Down
23 changes: 22 additions & 1 deletion src/OpenCvSharp/Src/PInvoke/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static NativeMethods()
/// </summary>
public static void LoadLibraries()
{
if (IsMono())
if (IsUnix())
return;

// core:
Expand Down Expand Up @@ -123,6 +123,27 @@ public static void LoadLibraries()
WindowsLibraryLoader.Instance.LoadLibrary(DllLegacy);
}

/// <summary>
/// Returns whether the OS is Windows or not
/// </summary>
/// <returns></returns>
private static bool IsWindows()
{
return !IsUnix();
}

/// <summary>
/// Returns whether the OS is *nix or not
/// </summary>
/// <returns></returns>
private static bool IsUnix()
{
var p = Environment.OSVersion.Platform;
return (p == PlatformID.Unix ||
p == PlatformID.MacOSX ||
(int)p == 128);
}

/// <summary>
/// Returns whether the runtime is Mono or not
/// </summary>
Expand Down
Loading

0 comments on commit f0ebe87

Please sign in to comment.