diff --git a/samples/gtk/README.md b/samples/gtk/README.md index 0a52429fe27..4894257160e 100644 --- a/samples/gtk/README.md +++ b/samples/gtk/README.md @@ -4,9 +4,11 @@ applications with the GTK toolkit. To build use `./build.sh` script without arguments (or specify `TARGET` variable if cross-compiling). -To run on Mac install XQuartz X server (https://www.xquartz.org/), and then +Do not forget to install GTK3. +On Mac use `port install gtk3`, on Debian flavours of Linux - `apt-get install libgtk-3-dev`. +To run on Mac also install XQuartz X server (https://www.xquartz.org/), and then - ./Gtk3Demo + ./Gtk3Demo.kexe Dialog box with the button will be shown, and application will print message and terminate on button click. diff --git a/samples/gtk/build.sh b/samples/gtk/build.sh index 99f155dd346..7c2d29d25fe 100755 --- a/samples/gtk/build.sh +++ b/samples/gtk/build.sh @@ -6,7 +6,7 @@ DIR=. IPREFIX_macbook=-I/opt/local/include IPREFIX_linux=-I/usr/include LINKER_ARGS_macbook="-L/opt/local/lib -lglib-2.0 -lgdk-3.0 -lgtk-3 -lgio-2.0 -lgobject-2.0" -LINKER_ARGS_linux="-L/usr/lib/x86_64-linux-gnu -lglib-2.0 -lgdk-3.0 -lgtk-3 -lgio-2.0 -lgobject-2.0" +LINKER_ARGS_linux="-L/usr/lib/x86_64-linux-gnu -lglib-2.0 -lgdk-3 -lgtk-3 -lgio-2.0 -lgobject-2.0" if [ x$TARGET == x ]; then case "$OSTYPE" in @@ -26,7 +26,7 @@ COMPILER_ARGS=${!var} # add -opt for an optimized build. if [ ! -f $DIR/gtk3.bc ]; then echo "Generating GTK stubs (once), may take few mins depending on the hardware..." cinterop -J-Xmx8g -copt $IPREFIX/atk-1.0 -copt $IPREFIX/gdk-pixbuf-2.0 -copt $IPREFIX/cairo -copt $IPREFIX/pango-1.0 \ - -copt -I/opt/local/lib/glib-2.0/include -copt $IPREFIX/gtk-3.0 -copt $IPREFIX/glib-2.0 -def $DIR/gtk3.def \ + -copt -I/opt/local/lib/glib-2.0/include -copt -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -copt $IPREFIX/gtk-3.0 -copt $IPREFIX/glib-2.0 -def $DIR/gtk3.def \ -target $TARGET -o $DIR/gtk3.bc || exit 1 fi konanc -target $TARGET $DIR/src -library $DIR/gtk3.bc -linkerArgs "$LINKER_ARGS" -o $DIR/Gtk3Demo.kexe || exit 1