Re: GTK+ 2.0/3.0 Windows runtimes
Thank you David. > The procedure was: on Linux development machine, unzip the gtk Windows bundle > in a directory > with the C source, set up a Makefile with the appropriate CFLAGS and LDFLAGS, > 'make mingw' > and deploy the EXE. This procedure suited my development style. > That is the 'start'. There are always additional pieces you may need to > install like any additional needed build dependencies like, e.g. gtksourcview, > libxml, etc.. This GTK+ program has had a well-defined job in the overall solution (quickly generating greyscale comma-delimited text files and printed output). The rest is done by some Python scripts. But there is always the chance that the user will have some new requirement which fits better in the GTK+ program. > Then I just open the good ole windows command prompt (cmd.exe) and build. > Remember if you are using mingw-TDM, the binaries are named, e.g. mingw32-make > (for make), etc... > ... > You should be able to, but I have not set up the cross-compile chain on Linux > to test. I just used the windows gtk2 binaries and it works fine for my > purposes. It's good to know that the GTK+ build could be done on the Windows target. For now, though, I've grown used to the Linux ecosystem. 'Deployment' is done by a bash script which runs 'make mingw' (one of my Makefile targets) and copies the EXE and .py files to a folder ready for copying to the target Windows machine via sneakernet(TM). This is all that's required for this one-off custom solution. Once I understood the naming of the mingw tools and set the compiler to i686-w64-mingw32-gcc-5.3-win32 to match the bitness of the runtimes, it was plain sailing. Thanks John Mills ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+ 2.0/3.0 Windows runtimes
On 10/23/2018 02:16 AM, John Mills wrote: > I have been developing a C-language GTK+ 2.0 application for MS Windows 10 > using mingw > cross-compilation on Linux, and deploying it by installing the Windows GTK+ > 2.0 runtime > bundle on the Windows machine. > http://ftp.gnome.org/pub/gnome/binaries/win32/ > Those are fine. > The procedure was: on Linux development machine, unzip the gtk Windows bundle > in a directory > with the C source, set up a Makefile with the appropriate CFLAGS and LDFLAGS, > 'make mingw' > and deploy the EXE. This procedure suited my development style. > That is the 'start'. There are always additional pieces you may need to install like any additional needed build dependencies like, e.g. gtksourcview, libxml, etc.. When I set this up, I simply create a base /opt directory at c:\opt and then install the various packages for gtk2 under c:\opt\gtk2. You then simply add the the directory containing your the libraries to your PATH. > Do I now need to port to GTK+ 3? No, not unless you simply want to. It depends on the size of the source and how much time you want to devote to it. I still build gtk+2 with the binaries you are using on Win10 without issue. > Is MSYS2 now the best/only way to deploy the dependencies to Windows? No, not needed. Simply install the dependencies wherever you like (as my c:\opt\gtk2) and then add the path to the libraries (e.g. c:\opt\gtk2\bin) to your User (not system) PATH variable. You will also need the path to the mingw\bin directory in your path as well. Then I just open the good ole windows command prompt (cmd.exe) and build. Remember if you are using mingw-TDM, the binaries are named, e.g. mingw32-make (for make), etc... I have additional mingw/gtk2/windows build information at https://github.com/drankinatty/gtkwrite > Using the binaries available through MSYS2/pacman, can I still develop on > Linux and deploy > mingw executables to Windows? You should be able to, but I have not set up the cross-compile chain on Linux to test. I just used the windows gtk2 binaries and it works fine for my purposes. > Can anyone point me to a guide for doing that? Somebody else will have to fill this in... Good luck. -- David C. Rankin, J.D.,P.E. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+ 2.0/3.0 Windows runtimes
Hello Thank you for your explanations Dov and Emmanuele. My program is fairly simple - it samples colour from an image and builds a greyscale matrix, which is viewed on a GtkImage with a GtkEventBox for rubberbanding/cropping and a GtkPrintOperation for hard copy output. It's a custom application, deployed to only one user, so having the runtimes in place on the Windows machine and deploying only the dynamically-linked Windows executable is a very convenient workflow. > > ...you can keep using GTK 2.24; it's not going to go away. That's good news. I'm continuing with my workflow. Thanks again, and thank you Emmanuele and the other devs for GTK+. John Mills ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+ 2.0/3.0 Windows runtimes
Hi; On Tue, 23 Oct 2018 at 08:26, John Mills wrote: > Hello list > > If this question should be raised on another list, please let me know. > > I have been developing a C-language GTK+ 2.0 application for MS Windows 10 > using mingw > cross-compilation on Linux, and deploying it by installing the Windows > GTK+ 2.0 runtime > bundle on the Windows machine. > http://ftp.gnome.org/pub/gnome/binaries/win32/ > > The procedure was: on Linux development machine, unzip the gtk Windows > bundle in a directory > with the C source, set up a Makefile with the appropriate CFLAGS and > LDFLAGS, 'make mingw' > and deploy the EXE. This procedure suited my development style. > > Do I now need to port to GTK+ 3? > Considering that GTK 2.x is now in deep maintenance mode, you're strongly encouraged to migrate to GTK 3.24 — if and only if you're interested and have enough design and maintenance effort for the migration, and if you need functionality that is just never going to happen in the GTK 2.x branch. If you don't have any particular requirement, and you don't have enough bandwidth to migrate, then you can keep using GTK 2.24; it's not going to go away. Is MSYS2 now the best/only way to deploy the dependencies to Windows? > MSYS2 is the recommended way to *develop* an application using GTK 3.24 on Windows, natively. GTK developers are not going to ship binary builds for you, as we don't have the resources to do so—on any platform, in any case, not just on Windows. In order to ship GTK applications on Windows to your users you're strongly encouraged to take the builds you made and put them into an installer binary; your users do not need MSYS2. > Using the binaries available through MSYS2/pacman, can I still develop on > Linux and deploy > mingw executables to Windows? > You can still cross-compile on Linux for Windows; many Linux distributions have mingw packages to accomplish just that. The recommendation is still to package up your binary builds into an installer, and ship the installer to your users. > Can anyone point me to a guide for doing that? > There are various GTK applications that have build and release scripts for Windows; gedit and hexchat come to mind: - https://gitlab.gnome.org/GNOME/gedit/tree/master/win32 - https://github.com/hexchat/hexchat/tree/master/win32 For Linux/Windows cross-compilation there are distro-specific tutorials: - Fedora: https://fedoraproject.org/wiki/MinGW/Tutorial - Debian: https://wiki.debian.org/Mingw-W64 Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com] ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK+ 2.0/3.0 Windows runtimes
John, I am maintaining several gtk2 applications for windows that I'm cross compiling from Linux. I'm using Fedora for the cross compilation and the way I'm working is as follows: - Install the necessary mingw64 packages through dnf - Install mingw32-nsis for the generation of a windows Installer for your application on Linux. Compile with the cross compilation environment of your choice. E.g. you can use automake through the script mingw64-configure . Personally I'm using scons where I manually set up all the compilation and linkage environments, etc. For an example see my image viewer giv at https://github.com/dov/giv/blob/master/SConstruct . Regarding gtk3 and gtk2, nobody is removing gtk2 for the foreseeable future, and you can continue using it as long as you see fit. One of the "big" cross platform gtk applications, inkscape, is still using gtk2. On the other hand if you want the new functionality of gtk3, go ahead and port, and you can cross compile for Windows in the same method. Regards, On Tue, Oct 23, 2018 at 10:26 AM John Mills wrote: > Hello list > > If this question should be raised on another list, please let me know. > > I have been developing a C-language GTK+ 2.0 application for MS Windows 10 > using mingw > cross-compilation on Linux, and deploying it by installing the Windows > GTK+ 2.0 runtime > bundle on the Windows machine. > http://ftp.gnome.org/pub/gnome/binaries/win32/ > > The procedure was: on Linux development machine, unzip the gtk Windows > bundle in a directory > with the C source, set up a Makefile with the appropriate CFLAGS and > LDFLAGS, 'make mingw' > and deploy the EXE. This procedure suited my development style. > > Do I now need to port to GTK+ 3? > Is MSYS2 now the best/only way to deploy the dependencies to Windows? > Using the binaries available through MSYS2/pacman, can I still develop on > Linux and deploy > mingw executables to Windows? > Can anyone point me to a guide for doing that? > > Thank you > John Mills > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list