bimg icon indicating copy to clipboard operation
bimg copied to clipboard

Development on Windows 10

Open razorness opened this issue 4 years ago • 2 comments

This is no issue, just information for users who want to use this package in a project while developing in a windows environment:

  • Install Linux Subsystem (Ubuntu)
  • Start Ubuntu Shell
  • Install Go as described on golang.org
  • Install needed packages
    • Ubuntu 18.04: apt install build-essential pkg-config glib2.0-dev libexpat1-dev libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev libexif-dev giflib-tools librsvg2-dev libpoppler-glib-dev libgsf-1-dev libtiff-dev libfftw3-dev liblcms2-dev libpng-dev imagemagick libwebp-dev libgif-dev
    • Ubuntu 20.04: apt install build-essential pkg-config libexpat1-dev libvips-dev
  • For 20.04 not needed: Download current source tarball from https://github.com/libvips/libvips/releases
    • Follow Instructions from Building libvips from a source tarball
    • Most optional dependencies for basic support of common use cases should be already installed
      • libimagequant gets available with Ubuntu 20.04
  • Go to your project path f.e. cd /mnt/c/delve/cool-project/
  • Exec go get -u
  • Exec go build
  • Exec your binary

If you are using Goland, you can just set C:\Windows\System32\bash.exe as Shell path in your terminal settings. For debug sessions, you will have to use Go remote configuration.

razorness avatar May 14 '20 15:05 razorness

there is no way to do without wsl?

fess932 avatar Jun 10 '20 09:06 fess932

You can try out MSYS2 but it will be tricky. I spent hours without success. Using WSL is a very clean and convenient solution. Another solution would be using a normal virtual machine. You can use X2go to open your IDE like a windows application which is actually running in your virtual machine.

razorness avatar Jun 10 '20 09:06 razorness