-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation and execution of NetVips #3
Comments
Hello @roganjoshua, It looks like you tried to run $env:VIPS_VERSION = "8.6.3"
$env:VIPS_ZIP_VERSION = "dev-w64-all-8.6.3-1"
$env:VIPS_HOME = "C:\vips-dev-$env:VIPS_VERSION"
$env:PATH = "$env:VIPS_HOME\bin;$env:PATH"
.\build.ps1 However, the Cake Build script is only used for the continuous integration builds, so it's not needed to run it. When you want to use NetVips in your project(s) I can recommend installing it with NuGet. In the NuGet Package Manager Console it can be installed like this: Install-Package NetVips You'll only need the libvips shared library on your library search path, see for more info: |
Thanks for such a quick reply. My problem is finding the vips dlls. On windows what is the library search path? I don't where to put it for the tests to run. Apologies for my idiocy. NetVips.Tests.ArithmeticTests.TestAbs [FAIL] |
I copied them into Test bin\debug folder and now get System.TypeInitializationException : The type initializer for '' threw an exception. |
You don't need to copy libvips in the For Windows:
Let me know if something is unclear. |
I think 'TypeInitializationException' is because you are using 32bit, and libvips bin is win64, mine works fine. Just use x64 instead of AnyCpu @roganjoshua |
Ah, I overlooked the |
The libvips binary The |
@RyanYANG52 , Many thanks, saved the day!. |
I've been thinking whether there is a better solution to prevent users from downloading the libvips binaries and the need to set their I could set-up the NuGet package to bundle the latest pre-compiled libvips binaries (this can be done through making a Unfortunately there a disadvantages to this approach:
The advantage of this approach is that users can install NetVips easier without the need to set-up libvips first. I weigh the pros and cons and I think we have to stick to the current installation / packaging behavior. Only on Windows it's slightly more difficult to install. On MacOS libvips is on Homebrew, MacPorts and Fink. On Linux it's in included in the package manager (for example Debian, Ubuntu, CentOS, RHEL, Fedora, Alpine, SuSE, FreeBSD, etc. have libvips in their package manager). For Windows, I think vcpkg can help with this in the future, see these open issues: |
Yes, a NuGet package that installed libvips would be useful. Could NetVips depend on it and have it pulled in automatically? |
I've packed the latest Windows libvips web binary ( It's semi-automatic, for packaging / publishing only a few variables needs to be set (in PowerShell). $env:VIPS_VERSION = "8.6.3"
$env:VIPS_ZIP_VERSION = "dev-w64-web-8.6.3-1"
$env:VIPS_HOME = "C:\vips-dev-$env:VIPS_VERSION"
$env:PATH = "$env:VIPS_HOME\bin;$env:PATH"
.\build.ps1 --target=Pack If someone want to test this, use the nightly version of NetVips. Add the
And update NetVips to 1.0.2.69. @jcupitt Is it maybe possible to merge all dependencies (except GLib and GObject) into one DLL in build-win64? That will also solve the problem with wrong versions of DLL's being included, like this issue what I had a while ago. |
Merged to master. I will try to make a new release within a few days. Making one DLL of libvips would be ideal, but I'm not sure how difficult this is. I'll investigate whether it is possible to do this in https://github.com/jcupitt/build-win64. |
Could a merged DLL be a licence violation? The LGPL says users need to be able to replace shared libraries, and libvips has a lot of LGPL dependencies. |
I've created libvips/build-win64#21 in order to keep this issue clean. |
I've just released version 1.0.3 on NuGet. The pre-compiled libvips Windows binary is bundled with this version. It's therefore no longer necessary to download the pre-compiled binary and to set the The readme has some remarks about how to disable the bundled libvips and use a different version of libvips. I'm sorry it took so long, I had some busy weeks on my university. I'll close this issue for now, please feel free to re-open if there's still a problem. |
wow. successed. thx |
Hi I am trying to get netvips working here on windows.Will this work?
Do I need to set up Environment Variables first?
I get this
ibvips zip file not in download directory. Downloading now ...
Downloading file: https://github.com/jcupitt/libvips/releases/download/v/vips-.zip
which of course fails
All the tests fail.
Not sure where to put the downloaded vips folder?
System.TypeInitializationException : The type initializer for '' threw an exception.
[02/05/2018 13:30:36 Informational] [xUnit.net 00:00:01.3574786] ---- System.DllNotFoundException : Unable to load DLL 'libvips-42.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
[02/05/2018 13:30:36 Informational] [xUnit.net 00:00:01.3575698] Stack Trace:
[02/05/2018 13:30:36 Informational] [xUnit.net 00:00:01.3576566] at NetVips.Tests.TestsFixture..ctor()
[02/05/2018 13:30:36 Informational] [xUnit.net 00:00:01.3577459] ----- Inner Stack Trace -----
[02/05/2018 13:30:36 Informational] [xUnit.net 00:00:01.3578316] at NetVips.Internal.Vips.VipsInit(String argv0)
[02/05/2018 13:30:36 Informational] [xUnit.net 00:00:01.3579297] C:\Users\Martin_Sarosi\Downloads\net-vips-master\src\NetVips\ModuleInitializer.cs(13,0): at NetVips.ModuleInitializer.Initialize()
[02/05/2018 13:30:36 Informational] [xUnit.net 00:00:01.3580023] at .cctor()
Any help
The text was updated successfully, but these errors were encountered: