Re: Cross platform development
On 03/18/2017 04:07 AM, Michael Torrie wrote: > I think some programs stick their binary and libraries in a bin folder, > and GTK can still find it's files. It's more typical for windows apps > to put the EXE in the toplevel folder though. > gedit deploys msys2 but removes a bunch of files it does not need. This way, the binary will end up in a bin/ directory though. Of course you can make a link or a bat script for launching it in the main directory. https://git.gnome.org/browse/gedit/tree/win32 By the way, if you don’t download the sources of LGPL-licensed libraries e.g. with msys2’s pacman, you rely on them still being available on-line, because any user has the right to get the sources from you, so if you don’t have them and cannot get them you can’t distribute your app anymore. For commonly used libraries the sources will remain available at least on the Internet Archive anyway though. Regards, Florian ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 08:07 AM, pelzflorian (Florian Pelz) wrote: > gedit deploys msys2 but removes a bunch of files it does not need. This > way, the binary will end up in a bin/ directory though. Of course you > can make a link or a bat script for launching it in the main directory. > > https://git.gnome.org/browse/gedit/tree/win32 > Note that this may become easier with Guix in the future https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00525.html ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
Le 17 mars 2017, à 23:02, Dirk Gottschalk via gtk-app-devel-list a écrit : I'm developing a multi platform application with GTK+ for Windows and Linux. IIRC is GTK+ and it's dependencies not linkable statically, which i would prefer. Yes, they are! I use this http://mxe.cc/ for my GTK2 app, but it has GTK3 also and many, many more libs! http://mxe.cc/#packages As you can guess, with a statically linked exe, no more headache with lib distribution, installers and so on... -- Lucas Levrel ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 11:25 AM, Lucas Levrel via gtk-app-devel-list wrote: > Le 17 mars 2017, à 23:02, Dirk Gottschalk via gtk-app-devel-list a écrit : > >> I'm developing a multi platform application with GTK+ for Windows and >> Linux. >> >> >> IIRC is GTK+ and it's dependencies not linkable statically, which i >> would prefer. > > Yes, they are! I use this http://mxe.cc/ for my GTK2 app, but it has > GTK3 also and many, many more libs! http://mxe.cc/#packages > > As you can guess, with a statically linked exe, no more headache with > lib distribution, installers and so on... > Note that if your application is not libre software (it should be, please make it libre!), then static linking means you need to provide your application’s source code or compiled object files upon user request so it can be relinked with another version of the LGPL’d libraries. You will also still need to provide the other resources like GTK’s schemas etc. But I have no experience with mxe. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
Hi Florian, Am Samstag, den 18.03.2017, 11:42 +0100 schrieb pelzflorian (Florian Pelz): > Note that if your application is not libre software (it should be, > please make it libre!), then static linking means you need to provide > your application’s source code or compiled object files upon user > request so it can be relinked with another version of the LGPL’d > libraries. You will also still need to provide the other resources > like > GTK’s schemas etc. But I have no experience with mxe. Thanks, this is a point I totally forgot. So no statically linking is possible. Making the project open is no option. The protocol of the devices we communicate with is covered by various NDAs. The only chance is, to grab the DLLs from MinGW via objdump ore some similar, like recommended and pack them into the applications working directory, because Windows searches DLLs in its System, System32 subfolders and in the working directory of the app. This is tested. I only want to copy just the needed files, not the complete DLL set Mingw has on my systems, these are real much. Thanks for mentioning the LGPL-Problem. Regards, Dirk -- Dirk Gottschalk, Aachen Tel.: 01573 / 1152350 eMail: dirk.gottschalk1...@googlemail.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 07:37 AM, Dirk Gottschalk via gtk-app-devel-list wrote: > The only chance is, to grab the DLLs from MinGW via objdump ore some > similar, like recommended and pack them into the applications working > directory, because Windows searches DLLs in its System, System32 > subfolders and in the working directory of the app. This is tested. I > only want to copy just the needed files, not the complete DLL set Mingw > has on my systems, these are real much. If you could find the msys2 binary packages, you could just grab the ones you need and unzip them into your app's custom tree. I'm not sure where to get them, though. msys2's web site is very sparse and only shows the installers and the git source repos. If I can find them I'll post here. As for Windows searching DLLs, if I'm not mistaken, Windows always looks first in the same directory as the .exe file. After that it searches its system folders. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: on screen keyboard error with gtk_main_do_event
Someone could help me? Thanks On 16-03-2017 16:54, Ruben ROdrigues wrote: > HI guys, > > I have a on-screen keyboard that was made for gtk2. Now in gtk3 i get > this errors: > > Gdk-CRITICAL **: gdk_window_get_user_data: assertion 'GDK_IS_WINDOW > (window)' failed > > Gdk-CRITICAL **: gdk_window_get_display: assertion 'GDK_IS_WINDOW > (window)' failed > > Gdk-WARNING **: Event with type 8 not holding a GdkDevice. It is most > likely synthesized outside Gdk/GTK+ > > > Gdk-CRITICAL **: gdk_window_get_display: assertion 'GDK_IS_WINDOW > (window)' failed > > Gdk-CRITICAL **: gdk_display_get_device_manager: assertion > 'GDK_IS_DISPLAY (display)' failed > > Gdk-CRITICAL **: gdk_device_manager_get_client_pointer: assertion > 'GDK_IS_DEVICE_MANAGER (device_manager)' failed > > Gdk-CRITICAL **: gdk_device_get_associated_device: assertion > 'GDK_IS_DEVICE (device)' failed > > Gdk-CRITICAL **: gdk_device_grab_info_libgtk_only: assertion > 'GDK_IS_DISPLAY (display)' failed > > > This appears in this line of code : gtk_main_do_event(pxEvent); > > Here is complete code: > > > void on_Keypad_button_clicked(GtkButton *button, gpointer data) > { > GdkEvent*pxEvent = NULL; > > GdkKeymapKey*keys; > gintiNkeys; > > guintcKey; > > GtkEntryBuffer*pxBuffer; > > > struct xParam_Widget_Keycode*pxData; > > pxData = (struct xParam_Widget_Keycode *)data; > > switch(cKey = pxData->iKeyCode) { > case GDK_KEY_BackSpace: > pxBuffer = gtk_entry_get_buffer(GTK_ENTRY(pxData->pxWidget)); > gtk_entry_buffer_delete_text(pxBuffer, > gtk_entry_buffer_get_length(pxBuffer) - 1, -1); > break; > default: > pxEvent = gdk_event_new(GDK_KEY_PRESS); > if(gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), cKey, > &keys, &iNkeys)) { > pxEvent->key.hardware_keycode = keys[0].keycode; > pxEvent->key.group = keys[0].group; > g_free(keys); > pxEvent->key.keyval = gdk_unicode_to_keyval(cKey); > } else { > pxEvent->key.keyval = cKey; > } > > pxEvent->key.window = g_object_ref(gtk_widget_get_screen > (pxData->pxWidget)); > pxEvent->key.state = 0; > > pxEvent->key.send_event = FALSE; > pxEvent->key.time = GDK_CURRENT_TIME; > > gtk_main_do_event(pxEvent); > pxEvent->key.type = GDK_KEY_RELEASE; > gtk_main_do_event(pxEvent); > gdk_event_free(pxEvent); > } > } > > Thanks > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 04:03 PM, Michael Torrie wrote: > On 03/18/2017 07:37 AM, Dirk Gottschalk via gtk-app-devel-list wrote: >> The only chance is, to grab the DLLs from MinGW via objdump ore some >> similar, like recommended and pack them into the applications working >> directory, because Windows searches DLLs in its System, System32 >> subfolders and in the working directory of the app. This is tested. I >> only want to copy just the needed files, not the complete DLL set Mingw >> has on my systems, these are real much. > > If you could find the msys2 binary packages, you could just grab the > ones you need and unzip them into your app's custom tree. I'm not sure > where to get them, though. msys2's web site is very sparse and only > shows the installers and the git source repos. If I can find them I'll > post here. > MSYS2 ships with the pacman package manager. After you have followed the instructions on the website, launch the MSYS2 shell from the MSYS2 folder and then this command installs everything you need to run gedit into a filesystem tree inside your msys2 folder. $ pacman -Syu --needed base-devel git mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gtk3 mingw-w64-x86_64-gedit gedit ships this filesystem tree from msys2 but removes some files needed only for building. It is somewhat large but a third of gedit’s size is due to shipping python. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 09:16 AM, pelzflorian (Florian Pelz) wrote: > MSYS2 ships with the pacman package manager. After you have followed the > instructions on the website, launch the MSYS2 shell from the MSYS2 > folder and then this command installs everything you need to run gedit > into a filesystem tree inside your msys2 folder. But the OP already has an MSYS2 installation that has more than just GTK3 in it. He wants to put just the GTK3 dependencies in a tree somewhere. To do that simply, he could unpack the GTK3 (and glib2) binary pacman packages if they could be located. > > $ pacman -Syu --needed base-devel git > mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc > mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gtk3 > mingw-w64-x86_64-gedit > > gedit ships this filesystem tree from msys2 but removes some files > needed only for building. It is somewhat large but a third of gedit’s > size is due to shipping python. Where can this gedit package be downloaded and inspected by itself? Sounds like a good place to start. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
On 03/18/2017 10:07 AM, Michael Torrie wrote: > He wants to put just the GTK3 dependencies in a tree > somewhere. To do that simply, he could unpack the GTK3 (and glib2) > binary pacman packages if they could be located. Got it. I think they can be downloaded individually here: https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/ or https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Cross platform development
"pelzflorian (Florian Pelz)" writes: > On 03/18/2017 08:41 AM, Tomas Hlavaty wrote: >> nixos already supports cross-compilation using mingw out-of-the box. > I did not know. Sounds interesting. It also creates an $out directory with bin dir and symlinks for all dependencies (exe and dll) which you can zip (or automate also zip) and get a complete zip tarball. > Your mail did not go to the list btw. Thanks for letting me know. Now it's there. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list