-
Notifications
You must be signed in to change notification settings - Fork 347
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: generate Windows installers #1773
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, the idea is nice, since it allows users not to install MSYS2 explicitly. However, I'm afraid it is an incomplete approach. It seems that you are creating an installer from the content of the pkg
directory created during the build on MINGW32/MINGW64. The content of that directory is only guaranteed to work on an MSYS2 environment. The build with an mcode backend might work by chance, because it's built statically. However, the same approach will fail for the LLVM backend. Please, see #1560 and #1599 for further info about the challenge.
I tried to find somewhere in the *.nsi
files that the required DLLs are copied, but I couln't find it. Am I missing something?
@@ -242,6 +242,15 @@ jobs: | |||
cd scripts/msys2-${{ matrix.pkg }} | |||
makepkg-mingw --noconfirm --noprogressbar -sCLf | |||
|
|||
- name: 'Prepare NSIS build' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, create the NSIS installer in a separated job, after win-test
. See https://github.com/ghdl/ghdl/actions/runs/868960417.
We want to first build GHDL, then test it, and generate the installer only if the tests are successful.
Launching the GHDL alone is not enough testing. You should run the testsuite, or some of the tests at least, for ensuring that no dependencies are missing.
The 64 bit version is very different because mcode backend is not supported on Windows x86-64. Therefore, a completely different backend is used. mcode is a in-memory statically built-in backend. LLVM is an external compiled solution, which is not built statically.
Note that GTKWave uses MSYS2 in CI and then generates standalone zipfiles by copying additional files from manually maintained lists. See https://github.com/gtkwave/gtkwave/tree/master/MSYS2, gtkwave/gtkwave#20 and gtkwave/gtkwave#18. I did discuss with @Paebbels about using a similar solution for GHDL. So, copy the With regard to combining multiple tools in one installer, see the comment about "something similar to Ninite" in #1599 (comment). |
Oof, that's a lot more complicated than I had hoped for. Now, 64-bit with llvm looks way more complicated than 32-bit mcode, and I don't even have a need for it nor do I expect a lot of people who might just want to try learning VHDL without too much obstacles on the way to have. If we decreased the scope of this PR to just create installer for the mcode x86 binary, how should I go around testing that the install works on a fairly bare system? So far I've only succesfully manually run the installed binary on two very simple designs, both time utilizing only the |
Yeah, "(...) software is hard. It's harder than anything else I've ever had to do." (https://en.wikiquote.org/wiki/Donald_Knuth)
See #1785. That's a fair point. Still, mcode has dependencies which are not included in the tarball. See https://github.com/ghdl/ghdl/blob/master/scripts/msys2-mcode/PKGBUILD#L10-L14 and #1560. So, even if you want to install the 32 bit mcode version only, you need to at least include zlib, libgnat, gcc_s_seh and libwinpthread. Moreover, we cannot guarantee that those DLLs will not conflict with others in the system. Alternatively, you could enhance the build plumbing, for generating a completely static binary. Last, you could try using AdaCore's GNAT, instead of the MSYS2 recipes.
Create an additional That is currently done for MSYS2. There is a |
Some long time ago, GHDL had NSIS support to create MSI installer files. The problem with NSIS is - and I think it's not solved yet or ever - it doesn't create correct installations. Mainly adding GHDL to PATH was completely broken. And if I remember correctly, it only GHDL wasn't added correctly, it fucked up the PATH variable for the whole system ... Is this problem now solved with latest NSIS? |
See this very very old ticket started in 2014: https://sourceforge.net/p/ghdl-updates/tickets/10/ |
While NSIS 2 is a dead end (latest version 2016). There is a new NSIS 3 ... Looking at the list of bugs (quite long with 179 issues), the PATH bug is still listed: This might be also interesting to see:
|
Description
Added a CI job steps to generate windows NSIS installers from the built windows binaries. This serves mainly as a way to decrease entry barrier for learning to write VHDL on windows, but should be generally useful for everyone running windows.
馃毃 This has not been thoroughly tested, as I don't have any windows machine currently on hand, and don't have enough free disk space for a 64-bit windows virtual machine. I did however at least test that the 32-bit installer installs and uninstalls correctly, and that the
ghdl
binary can be launched fromcmd
after installation, and there should not be anything too different in the 64 bit version to cause breakage.Further comments
This is a fairly simple and primitive installer, currently serving as a proof of concept for me for another ghdl-related project, but should be mergeable nevertheless. If that other thing comes through and this gets merged, I will probably create another PR trying to simplify the
.nsi
scripts to reduce code duplication, and probably to include option to somehow also installgtkWave
alongsideghdl
as optional component.