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
msys2 bundle script: Rework for less typo fragility, and add more pac… #560
Conversation
cairo: $CAIRO | ||
adwaita $ADW | ||
$gtk: $GTK | ||
read -d' ' pkgs <<EOF |
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.
instead of read, you could also simply use
pkgs="
libwinpthread
gcc-libs
libiconv
...
"
Works the same in the for loop.
But if you like the read better I don't mind.
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.
I wasnt sure if multi line variables isnt some bash extension
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.
Doesn't seem to be (dash likes it just fine too)
LGTM |
As noted by @eht16 there's still two packages missing |
I changed the pkg= assignment, but left the files variable alone. Also: post_install message is only shown when actually doing it. |
Now we've got all necessary DLLs for the runtime. |
We should merge this soon as the time slot to the next release is again getting smaller. I noticed we need even more packages in order to be able to run Geany from the created GTK bundle: For GTK2 and GTK3: And for GTK3 additionally: Not sure why we didn't need or notice these ones last time, maybe they are new dependencies due to changed builds or versions or whatever. Furthermore, I changed the script slightly to operate more explicitly when moving the extracted package contents: @@ -109,9 +115,14 @@
if [ -d mingw32 ]; then
for d in bin etc include lib locale share; do
- rm -rf $d
- mv mingw32/$d .
+ if [ -d "mingw32/$d" ]; then
+ rm -rf $d
+ mv mingw32/$d .
+ fi
done
+ rm -rf mingw32/var/cache/fontconfig
+ rmdir mingw32/var/cache
+ rmdir mingw32/var
rmdir mingw32
fi The first part is just checking whether the subdirectories (etc include lib locale share) actually exist before trying to The second part is to remove the |
…kages The packags are neded due to recursive dependencies
@b4n @eht16 @sardemff7 Here's an update. The commits add another script, get-pacman-pkg-deps.py, which just parses the "pactree -g" output (that command outputs a hierarchical dependency graph). The point is to get the dependencies of gtk (2 or 3) right (all of them), in the right order. The right order is necessary so that upon extracting the package files, their post_install commands can be run in the right order. Again, the post_install commands have to be run, otherwise the gtk bundle is incomplete. One effect of an incomplete bundle is easily visible: gtk's file open dialog outright crashes (easily reproduced with ctrl+o on a geany that runs on an incomplete bundle). Yes, it's ugly, but I'm not seeing alternative solutions. |
Why does it crash though? This sounds more like a bug in MSYS/Pacman. |
Are you sure |
Some gsettings schema is missing which created by the post_install
Yes, pretty sure |
I didn't test the new script yet but will do in the next few days. I'm excited. @kugel- any reason why you ignored my changes without any comment? Also, I wonder whether you have also a left .BUILDINFO file from glib2 laying around? On my system this file is left-over after INSTALL .MTREE .PKGINFO have been deleted. |
@eht16 I didn't ignore your change. However, I added var to the directories added to the bundle so it's moved out of the temp directory. I didn't notice .BUILDINFO yet, sorry. |
There must be some differences between your and my system, I get the following output when trying to create a GTK2 bundle:
My MSYS2 system is up2date (according to However, besides those smaller problems mentioned above, the dependency handling seems like the real issue to me:
I'd prefer to keep the hand-written package list and extend it as necessary. It's not that the package dependencies change five times a month, I guess. I also started already writing some code to strip the created bundle when a ZIP archive is requested (deleting gtk-doc stuff, headers, manpages, static libraries, ...) but I would wait for the dependency issue until I finish this. |
I suggest stripping the bundle only afterwards. Since the post_install scripts have to be run more dependencies might be required than runtime dependencies |
Of course, stripping would be the very last step. To be clear: I did not run the stripping code yet. The above mentioned issues happen with the unmodified scripts from this PR. |
I understand that. I meant (regarding the numerous dependencies): Rather than maintain the package list by hand strip the bundle afterwards, to make sure new dependencies aren't unseen. |
Well, that would make the stripping just more complex. I guess we will detect new dependencies which were missing by a fixed list quite quickly when testing the created bundle. What about the other issues? |
You want to strip either way so I don't see the point. Anyway, feel free to compile the list of packages a ignore my script. Regarding adwaita, I don't think it's pulled in for GTK2. I'll try to have a look at the other issues this week. |
Just as a note/reminder, IMO I don't think we should ship official GTK+ 3 Windows release until we find an theme that at least makes an attempt to look "native". The Adwaita theme is completely intolerable in Windows, IMO. For icons, I think we can just bundle the Tango theme, which looks like what is being used in GTK+ 2 already. |
@kugel- Adwaita is pulled in as you can see in my pastebin. @codebrainz fine with me. The less builds we ship, less work. And for the user on Windows it probably doesn't matter if Geany is built against GTK2 or GTK3 as long as it works. |
I guess we need to resolve this for the upcoming 1.27 release. |
Indeed. |
My latest version of the script: Changes:
|
My latest version of the script: Revision 3 improves some cleanup stuff and adds download_and_extract_grep_and_sort to embed grep.exe and sort.exe from UnxUtils into the GTK bundle which we used to distribute with Geany for users' convenience. |
Thanks for the reminder of #789. Another option would be @codebrainz in #789 you said, you built your own |
@eht16 IIRC it was very straight-forward to build Grep from source on MSYS2. I guess it will have some normal deps (libgcc, etc), but probably nothing that won't already be there from our other deps. |
Yeah, compiling Now the question is: would it be ok to include a pre-compiled grep.exe in this script or add a few lines to the script to download, unpack and build |
There are also GPL issues if we actually compile grep too. just saying. |
@kugel- WAT? |
@kugel- why is there a license problem? grep is gpl3 so we can distribute it, though we might have to point to its source. |
In theory we'd have to keep the same source we used for compiling in case someone asks for it. Re-distributing an existing binary distribution doesn't have this problem (though it's also some kind of a grey area). |
Isn't the source available online, where did we get it to compile? We don't have to actually make the copy available ourselves. |
Yes, we have to. Just because we made no modification doesnt mean we don't have to provide the source we used to compile the binary. Pointing to another repository isn't sufficient, as far as the GPL is concerned. |
The GPL v3 explicitly allows the source to be on a third parties server. |
Interesting. I didn't know that. |
My latest version of the script: I added creation of a bundle information file What do you think? I would do the same for the Geany-Plugins bundle create script afterwards. |
I thought we're going to compile grep. The script download the binary, unless I'm missing something?
|
My latest version of the script: Example In #560 (comment) I asked whether to compile Since we are seriously running out of time here, please hurry up with any feedback. |
As discussed in geany/geany#560.
geany/geany-plugins#375 (bundle script for Geany-Plugins) updated to create a bundle info file for Geany-Plugins. |
Update the list of dependencies, include sort.exe and grep.exe, create a information file with all download links of included binaries and re-structure the script for better readability. See geany#560 for details.
As said before, I created a new PR with my version of the script which I'm going to use for the release tomorrow: #959 |
Update the list of dependencies, include sort.exe and grep.exe, create a information file with all download links of included binaries and re-structure the script for better readability. See geany#560 for details.
#959 has been merged. |
…kages
The packags are neded due to recursive dependencies