I was thinking about windows installer build #571
Replies: 21 comments 8 replies
-
Would an alternative be to use something like https://installbuilder.com/qt-developers.html? It seems that app packaging ought to be a "solved problem" where we don't have to write too much boilerplate code. (They say they offer free licensing for open source projects: https://installbuilder.com/open-source-licenses.html But of course I'm sure there are lots of alternative products too that do a similar job. I don't know which one would be best for us. InstallBuilder just came up in my search because it mentions Qt.) |
Beta Was this translation helpful? Give feedback.
-
I see your point and we do already have the NSIS installer, with all its quirks, running. My initial thought was that the windows version of Brewtarget needs some DLLs that are present in Windows 10 and NOT present in Windows 7, this is amended by installing the vcredist-package from MSoft, version 14-something-something, this binary is now located in the main project tree and does not provide any functionality to the project other than being included in the NSIS installer when creating it. I like the idea that we could have a "on installer generator to rule them all" kind of thing, but feel like this would turn the whole release/installer "generating"(<-is that a word?) thing up-side-down, bringing with it a ton of refactoring on the build process. The NSIS installer is somewhat tedious to work with and not always that easy to understand how to manipulate to the developers will, and I agree that there must be an easier way to do this. I will study the above installbuilder closer, but at first glance I did not see the c++ support, they wrote a bunch about Java, but I have not read through all the information yet though! 😊 |
Beta Was this translation helpful? Give feedback.
-
After reading through the Installbuilder mentioned above, I do believe it to be a real alternative, need testing though, I may be able to do some initial testing during the holidays but the relatives do poke for attention! 😂🎅 let's keep looking though to find what alternatives there are and I would like to have @mikfire thoughts on the matter as well. |
Beta Was this translation helpful? Give feedback.
-
Yes, +1 for @mikfire input. My main goals would be (a) minimise boilerplate work we have to do to create packages and (b) only have to configure packaging in one place for all platforms. The second one is so that things are less likely to get forgotten. Eg, for compilation, there's an advantage in having a single set of cross-platform cmake files, because when I do a modification for Linux it either works for free on Mac & Windows or there's a reminder in the file that I have to do something different for those platforms. |
Beta Was this translation helpful? Give feedback.
-
NSIS was what we were already using when I started working on it. It is interesting, with some odd wrinkles and a few quirks. If there is something we can use (open source, or at least free) that is easier to configure, I see no issues trying it out. I see we can get a free open source license, but I would like to understand things like who "owns" the license. Will it work for Windows 7 (see below)? Can we fix some problems with the current Windows install ( we really need to force users to select a data directory, or at least do a reasonable default that isn't "c:\program files (x86)" because my mind just cannot handle how Windows ghosts that) easier? Assuming we stick with NSIS or our replacement has a similar configuration, I have no problem with making it a separate project and isolating all the NSIS config and support binaries in it. That makes more sense, and it will stop the other build projects from complaining. With respect to Windows 7. Windows 7 went out of mainstream support in 2015, and it was officially terminated in January 2020. I do not want to spend a lot of time supporting a dead OS. However, I believe many of brewtarget's users are still running Windows 7 and I would hate to do that to them. In short, I am conflicted. |
Beta Was this translation helpful? Give feedback.
-
I completely agree with you @mikfire, although maintaining a build for Windows 7 is not difficult as all you really need to do is install the vcredist_x64.exe package that contains the updated DLLs and off you go. But I would, as you say, like to keep that specific config and binary in a separate repository. What I mean by that is that the installer-generator that @matty0ung suggests, does all the heavy lifting on all the fronts, and as I understand it, given I have not had the time to try it out yet, the program works on a Project file base that could potentially be kept in a separate repository as well for sharing between developer and release managers. You do make a good point though, who will own the License? If you want I can inquire and try to figure out if it is the one person making the request or if it is the Brewtarget Organization on github? |
Beta Was this translation helpful? Give feedback.
-
I would suggest downloading the trial version first and make sure it does what we want in a way we like. If the tech works, then we can decide how to proceed. |
Beta Was this translation helpful? Give feedback.
-
Sounds sensible. Hopefully they don't tie the licence to one person / one email address. If we didn't already, we should also look at https://doc.qt.io/qtinstallerframework/ifw-overview.html, though I don't know quite how much it does in comparison with InstallBuilder. Re Windows 7, I agree we shouldn't spend a lot of time trying to build for an OS that's long out of mainstream support, but I take the point that perhaps there are still a bunch of people still using it. (I remember how long it took for people to stop using Windows XP!) Maybe the compromise is to have a wiki page that says "Here's how to compile and install from source but please consider moving to a supported OS"? |
Beta Was this translation helpful? Give feedback.
-
You have good points, I'll start with essessing the software to see if it does what we expect to do, as @mikfire says. If it does, I'll look into the licensing and how they have solved it. I'll get back to you after christmas wih more info. @matty0ung will look at your sugestion at that time as well. |
Beta Was this translation helpful? Give feedback.
-
I built BT in MXE cross compile toolkit (created docker image for it mxe-qt5-cmake). BT was built with almost no problem - one change for CMakeLists.txt (commit). Main problem is with NSIS installer - script uses some plugins, that are unavailable (Locate and Log). Second problem - get all required libs, but it can be solved using script from mxe. Would it be usefull to dig this way? Maybe you decided to change installer, so I don't need to bother about NSIS plugins. |
Beta Was this translation helpful? Give feedback.
-
I like the idea of cross-compiling if it can really work - ie if I could compile for Windows, Mac and Linux all from one build on, say, a Linux box, that would be really neat. Is this a separate issue from installation though? It seems that build is one thing, but, we also want to ensure that someone who has not got the build environment can install from a single download and not discover that they are missing libraries/DLLs/other dependencies. |
Beta Was this translation helpful? Give feedback.
-
No, not really separate. Having linux box and docker I can prepare binaries for deb, rpm and win. It's already working and is not an issue.
Here is my point - if we stick with NSIS, I can try to solve this issues. If there is plan to change installer I'll not waste time on this issues and just build binaries without installer (for testing purposes it's enough). After desicion on installer is taken, I can continue. My finall aim is to create devbuilds after every push to develop, so everybody can install latest version and test it, even if they don't know how to build it. Github Actions provide VM's with Ubuntu, Mac and Win, so it's not that hard, but needs some scripting. |
Beta Was this translation helpful? Give feedback.
-
Ah, OK, that's brilliant. Let's see what @mattiasmaahl thinks about installers. Originally I suggested to look at another tool to try to save work, and he was going to investigate. However we get there, I'd love us to be in a position where it's a simple job to build Linux, Mac and Windows installers that end users can download. (It feels like we've been trying to get the 2.4 release out the door for a long time, so anything we can do to simplify and document the release process is all to the good in my book.) |
Beta Was this translation helpful? Give feedback.
-
So, here is my successful attempt to build win installer - Action. Only I had to remove part of installer with locating old database, but it doesn't affect clean install. |
Beta Was this translation helpful? Give feedback.
-
Sounds promising. Haven't done a deep-dive on your previous links, but am I right in understanding that the MXE shell script you mention would make it pretty easy to add other dependencies? (The stuff I'm working on needs the Xerces and Xalan libraries to give us access to standard XML features that are not available in Qt. Xerces and Xalan are mainstream multi-platform tools already "known" by CMake, so the CMakeLists changes to get things building for developers were very small. However, I didn't yet get as far as working out what was required for the various install packages for end users.) |
Beta Was this translation helpful? Give feedback.
-
No problems with xerces it is in packages for MXE. Xalan would require some additional work, but I think not much. |
Beta Was this translation helpful? Give feedback.
-
Cool. Let's get input too from @mattiasmaahl and @mikfire. |
Beta Was this translation helpful? Give feedback.
-
Yes. Locate does try to solve the problem of finding a database when upgrading. I don't think it works very well, but Windows is very strange about how it presents the file system. Personally, I would prefer to not use NSIS. It introduces a number of issues, and it hard to maintain. If we are going to replace it, the replacement has to work as well, has to not cause GPL problems and has to show at least enough advantage to justify the risk of swapping out something that works (however distastefully) for something new. |
Beta Was this translation helpful? Give feedback.
-
Sorry for not responding sooner, I'm at home with ny newborn and the baby do poke for some attention! 😊 Above builders, using dockers or cross compiling is not an issue for the installer-generator I'm testing, all it needs is a script or command tonrun for generating/building tje binaries. |
Beta Was this translation helpful? Give feedback.
-
I have been going through the InstallBuilder for Qt a bit, here are my thoughts.
Final thoughts, Yes, this could be used as the packaging tool for Brewtarget, It certainly holds the capability to do what we want. but I think there is an issue in that the packaging for all platforms, although it can be done on windows, is limited to Linux based desktops due to the fact of being able to cross-compile. Yes I know you "can" cross-compile on windows, but it is tricky to set up, and most likely needs a Linux box for the compiling anyway... But if all binaries are already compiled, there is no issue to package on Windows. My recommendation is that we go with the Github actions to do all packaging for us, it relatively easy to setup and maintain and do not need any additional licensing or software to make everything happen. One final note. I have been looking into replacing the NSIS installer with WiX instead based on a few things.
I'll get back to you on WiX at a later date. |
Beta Was this translation helpful? Give feedback.
-
Ok, I will look into WiX setup for Windows packaging. Anyway, I'll stop tinkering with NSIS and start working on moving over to WiX Instead. If Anyone has an opinion or suggestion, please let me know! And before moving to far into this little project I would like to have @mikfire's and @matty0ung's input on making releases int .msi in the future? |
Beta Was this translation helpful? Give feedback.
-
So I was thinking about the windows installer and that this installer need the vcredist package added to the installer to accommodate the "missing" dll's in older windows versions, i.e windows 7.
should we create a project/repository, much like the "debian-package", for the windows installer as well?
my thinking here is that it's not ideal that the vcredist.exe file is included in the main project because it does not provide any functionality to the application other than the installer for windows? so maybe move the windows installer specific stuff into it's own project/repository to separeate them from the source in a much cleaner way?
What is your opinion on the matter? let me know.
I volunteer to maintain and build the windows installer for releases if need be.
Beta Was this translation helpful? Give feedback.
All reactions