works inside MSYS2 but not outside ?
- From: Bruggemann Eddie <mailing list user911 gmail com>
- To: gtk+ <gtk-app-devel-list gnome org>
- Subject: works inside MSYS2 but not outside ?
- Date: Wed, 11 Oct 2017 23:17:08 +0200
Hi to all the Gtk team,
At first I want to excuse me for all the insanity I have written newly
on this mailing-list.
I was in hate and it's surely my fault when my program crash not the
fault of the Gtk maintainers.
---
I go into my problem:
Try it out Like this:
[CODE]
#include <gtk/gtk.h>
static void create_win32_native_file_chooser(GtkWidget *widget, gpointer
user_data) ;
static void create_win32_native_file_chooser(GtkWidget *widget, gpointer
user_data) {
GtkWidget *window = gtk_widget_get_toplevel(widget) ;
GtkFileChooserNative *win32_native_file_chooser =
gtk_file_chooser_native_new("title",
GTK_WINDOW(window),
GTK_FILE_CHOOSER_ACTION_SAVE,
"accept label",
"cancel label") ;
gtk_native_dialog_show(GTK_NATIVE_DIALOG(win32_native_file_chooser)) ;
gtk_native_dialog_destroy(GTK_NATIVE_DIALOG(win32_native_file_chooser)) ;
return ;
}
int main (int argc, char *argv[]) {
gtk_init(&argc, &argv) ;
GtkWidget *window, *button ;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL) ;
button= gtk_button_new_with_label("test") ;
g_signal_connect(button, "clicked",
G_CALLBACK(create_win32_native_file_chooser) , NULL);
gtk_container_add(GTK_CONTAINER(window), button) ;
gtk_main() ;
return 0 ;
}
[/CODE]
Compile it with MSYS2.
---
Then make a directory outside the MSYS2 environment (the $PATH must be
clean without MSYS2).
And execute this script given binary and directory:
[CODE]
#! /bin/bash
###########################################
# #
# A script for mingw distributing copying #
# every needed *.dll to destination given #
# as argument ($2), #
# from binary given as argument ($1) #
# #
###########################################
function usage {
echo "a script to copy all required dll files from a binary to a
destdir."
echo "usage: $0 pathtobin destdir"
exit 1
}
if [[ ! -f $1 ]] || [[ ! -d $2 ]] ; then
usage ;
else
ldd $1 | grep /mingw64/bin/ | cp $(gawk '{print $3}' ) $2
ldd $1 | grep /mingw64/bin/ | echo "$(gawk '{print $3}' )"
# A try for cygwin:
#
#objdump -p $1 | grep "DLL Name" | cp $(printf "%s%s"
"/usr/x86_64-w64-mingw32/sys-root/mingw/bin/" $(gawk '{print $3}')) $2
#objdump -p $1 | grep "DLL Name" | echo $(printf "%s%s"
"/usr/x86_64-w64-mingw32/sys-root/mingw/bin/" $(gawk '{print $3}'))
echo "copy to $2"
cp $1 $2
echo "copy $1 to $2"
exit 0 ;
fi
[/CODE]
Then execute the binary at the location outside the MSYS2 environment.
It crash on my system.
Please forgiven me !
I'm a poor sinner for all the injuries I have said.
If we find what bug I can package my program using inno-setup what would
be great and not hope.
Thanks to forgiven me, and for any help or comments.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]