ubarsc / tuiview

TuiView is a lightweight raster GIS with powerful raster attribute table manipulation abilities
http://tuiview.org/
GNU General Public License v2.0
26 stars 13 forks source link

Add a Windows installer #82

Closed howff closed 2 months ago

howff commented 3 months ago

Create a standalone Windows installer using conda 'constructor' with the option to add a python wheel including the most recent code from the git repo

gillins commented 3 months ago

Sorry for slow response - I've been travelling interstate. I'm going to close this @howff - I've had all sorts of problems with pip packages and whls over the years especially with GDAL dependent packages. I only officially support conda-forge and Spack, I'd strongly recommend using either of these 2 for installing tuiview. I'm happy for you to maintain something like this but it would have to be in a separate repo and I would not be recommending this for users.

Having an all in one installer for tuiview sounds attractive. And for many years I did maintain a py2exe installer for Windows. However it didn't take long before people wanted to be able to access the tuiview python api, so needed a "proper" Python install. They also had scripts that needed a bunch of other packages. With conda-forge it is so easy to install tuiview plus anything else and it is all there and just works.

I'll get a new release out soon so hopefully we are all up to date.

gillins commented 3 months ago

And also, I'm very nervous about creating an install that isn't tied to a known (and tested) release...

gillins commented 3 months ago

I think I'd be more open to this once we've got the new release out and the whole pip/wheel business is removed... Let's talk then.

gillins commented 2 months ago

@howff I think I understand a bit more what you are trying to do now, sorry was a bit muddled when I came back. I'm going to re-open this and feel free to update with latest release. I'm a bit confused why the .bat files are needed and why the TUIVIEW_ALLOW_NOGEO=YES is set - geolinking (and probably a few other things) won't work - do you often use TuiView with files without georeference?

howff commented 2 months ago

Thank you!

The ALLOW_NONGEO was when I wanted to test it with some PNG images. I didn't realise that it had negative consequences. I've commented it out now.

The .bat files are really only needed to set the default directory (and possibly to set environment variables) but could also be useful for adding to a Windows Start menu (although I've not got around to configuring that in the yaml yet).

I've pushed some changes which simplify things a bit and document it slightly better.

If you had a CI pipeline you might consider running conda constructor to create a Windows installer that you can add to your release assets but I wouldn't blame you if you thought that too much trouble. I think it's handy to have it documented for other people to do though.

gillins commented 2 months ago

Thanks @howff and sorry this has taken me so long to look at this stuff.

I'm still a bit uncertain about the whole .whl stuff - perhaps anyone doing this on Windows should have MSVC installed so they can build from source?

Yes, creating a Windows installer (and ideally installers for all platforms) using conda constructor would be nice. I don't think I have the energy to look into this, but I'd support you if you wanted to do this. Although, we wouldn't want installers built each time we update the code - just when a new release is made. Perhaps it would live in a separate repo that would only get updated when a new release is made?

howff commented 2 months ago

Thanks for your help. I don't want to divert you from the core work on tuiview so feel free to ignore it for now.

The wheel stuff has been removed so you don't need to worry about that.

At some point I'll finish off the windows installer by adding the ability to create a start menu entry.