Build with gtk3
This commit is contained in:
committed by
Stéphane Lesimple
parent
a7e1a5591e
commit
e75d73c74a
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -52,7 +52,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install -y libglib2.0-dev ghostscript man jq libgtk2.0-dev
|
sudo apt-get update && sudo apt-get install -y libglib2.0-dev ghostscript man jq libgtk-3-dev
|
||||||
./configure --with-werror
|
./configure --with-werror
|
||||||
nproc && make -j$(nproc)
|
nproc && make -j$(nproc)
|
||||||
env:
|
env:
|
||||||
|
|||||||
6
.github/workflows/make-dist.sh
vendored
6
.github/workflows/make-dist.sh
vendored
@@ -27,12 +27,6 @@ echo "appimage is <$archive>"
|
|||||||
mkdir -p dist/locale
|
mkdir -p dist/locale
|
||||||
cp -vr locale/*/ dist/locale/
|
cp -vr locale/*/ dist/locale/
|
||||||
if [ "$os" != "linux64" ]; then
|
if [ "$os" != "linux64" ]; then
|
||||||
if [ "$GUI" = 1 ]; then
|
|
||||||
mkdir -p dist/share/themes dist/lib/gtk-2.0
|
|
||||||
cp -vr $MINGW_PREFIX/share/themes/MS-Windows dist/share/themes/
|
|
||||||
cp -vr $MINGW_PREFIX/lib/gtk-2.0/* dist/lib/gtk-2.0/
|
|
||||||
rm -rf dist/lib/gtk-2.0/include
|
|
||||||
fi
|
|
||||||
mkdir -p dist/lib
|
mkdir -p dist/lib
|
||||||
ntldd -R dvdisaster
|
ntldd -R dvdisaster
|
||||||
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
||||||
|
|||||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
if: matrix.ui == 'gui'
|
if: matrix.ui == 'gui'
|
||||||
env:
|
env:
|
||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||||
run: brew install gtk+
|
run: brew install gtk+3
|
||||||
- name: configure
|
- name: configure
|
||||||
run: |
|
run: |
|
||||||
set +x
|
set +x
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
|
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
|
||||||
- name: install GUI prereqs
|
- name: install GUI prereqs
|
||||||
if: matrix.ui == 'gui'
|
if: matrix.ui == 'gui'
|
||||||
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2
|
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk3
|
||||||
- name: git config
|
- name: git config
|
||||||
run: git config --global core.autocrlf input
|
run: git config --global core.autocrlf input
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -159,7 +159,7 @@ jobs:
|
|||||||
mkdir -p /tmp/dist
|
mkdir -p /tmp/dist
|
||||||
docker run --device /dev/fuse --privileged --name uu -d -v $PWD:/code -v /tmp/dist:/dist ubuntu:14.04 sleep 1800
|
docker run --device /dev/fuse --privileged --name uu -d -v $PWD:/code -v /tmp/dist:/dist ubuntu:14.04 sleep 1800
|
||||||
- name: install prerequisites in docker
|
- name: install prerequisites in docker
|
||||||
run: docker exec uu sh -c 'sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man libgtk2.0-dev gtk2-engines-pixbuf gtk2-engines libgail-common pkg-config gnome-themes-standard fuse'
|
run: docker exec uu sh -c 'sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man libgtk3-dev libgail-common pkg-config gnome-themes-standard fuse'
|
||||||
- name: configure in docker
|
- name: configure in docker
|
||||||
run: docker exec uu sh -c 'cd /code && ./configure --prefix=/usr'
|
run: docker exec uu sh -c 'cd /code && ./configure --prefix=/usr'
|
||||||
- name: make in docker
|
- name: make in docker
|
||||||
|
|||||||
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
if: matrix.ui == 'gui'
|
if: matrix.ui == 'gui'
|
||||||
env:
|
env:
|
||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||||
run: brew install gtk+
|
run: brew install gtk+3
|
||||||
- name: configure
|
- name: configure
|
||||||
run: |
|
run: |
|
||||||
set +x
|
set +x
|
||||||
@@ -85,7 +85,7 @@ jobs:
|
|||||||
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
|
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
|
||||||
- name: install GUI prereqs
|
- name: install GUI prereqs
|
||||||
if: matrix.ui == 'gui'
|
if: matrix.ui == 'gui'
|
||||||
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2
|
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk3
|
||||||
- name: git config
|
- name: git config
|
||||||
run: git config --global core.autocrlf input
|
run: git config --global core.autocrlf input
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -146,7 +146,7 @@ jobs:
|
|||||||
if: matrix.ui == 'gui'
|
if: matrix.ui == 'gui'
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
run: sudo apt-get install -y libgtk2.0-dev
|
run: sudo apt-get install -y libgtk-3-dev
|
||||||
- name: configure
|
- name: configure
|
||||||
run: |
|
run: |
|
||||||
echo ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
|
echo ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ GLIB_CFLAGS = $(CFG_GLIB2_CFLAGS)
|
|||||||
GLIB_LIBS = $(CFG_GLIB2_LIBS)
|
GLIB_LIBS = $(CFG_GLIB2_LIBS)
|
||||||
GLIB_BINDIR = $(CFG_GLIB2_BINDIR)
|
GLIB_BINDIR = $(CFG_GLIB2_BINDIR)
|
||||||
|
|
||||||
GTK_CFLAGS = $(CFG_GTK2_CFLAGS) $(CFG_GLIB2_CFLAGS)
|
GTK_CFLAGS = $(CFG_GTK3_CFLAGS) $(CFG_GLIB2_CFLAGS)
|
||||||
GTK_LIBS = $(CFG_GTK2_LIBS) $(CFG_GLIB2_LIBS)
|
GTK_LIBS = $(CFG_GTK3_LIBS) $(CFG_GLIB2_LIBS)
|
||||||
GTK_BINDIR = $(CFG_GTK2_BINDIR) $(CFG_GLIB2_BINDIR)
|
GTK_BINDIR = $(CFG_GTK3_BINDIR) $(CFG_GLIB2_BINDIR)
|
||||||
|
|
||||||
EFENCE_LFLAGS = $(CFG_EFENCE_LFLAGS)
|
EFENCE_LFLAGS = $(CFG_EFENCE_LFLAGS)
|
||||||
EFENCE_LIBS = $(CFG_EFENCE_LIBS)
|
EFENCE_LIBS = $(CFG_EFENCE_LIBS)
|
||||||
|
|||||||
2
configure
vendored
2
configure
vendored
@@ -87,7 +87,7 @@ REQUIRE_GLIB2 2 32 0
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
if test "$cfg_with_gui" == "yes"; then
|
if test "$cfg_with_gui" == "yes"; then
|
||||||
REQUIRE_GTK2 2 6 0 WITH_THREADS
|
REQUIRE_GTK3 3 4 0 WITH_THREADS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! CHECK_INCLUDE locale.h locale || ! CHECK_INCLUDE libintl.h intl ; then
|
if ! CHECK_INCLUDE locale.h locale || ! CHECK_INCLUDE libintl.h intl ; then
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Bash based configure - library of test functions
|
# Bash based configure - library of test functions
|
||||||
# Copyright (C) 2004-2016 Carsten Gn<47>rlich
|
# Copyright (C) 2004-2016 Carsten Gn<47>rlich
|
||||||
# Copyright (C) 2019-2021 The dvdisaster development team.
|
# Copyright (C) 2019-2021 The dvdisaster development team.
|
||||||
#
|
#
|
||||||
# Email: support@dvdisaster.org
|
# Email: support@dvdisaster.org
|
||||||
@@ -1477,13 +1477,13 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Require the GTK2 includes and libraries.
|
# Require the GTK3 includes and libraries.
|
||||||
# Unlike with the other packages, we don't have to fid out about the includes
|
# Unlike with the other packages, we don't have to fid out about the includes
|
||||||
# and libraries by ourselves, but just query pkg-config about them.
|
# and libraries by ourselves, but just query pkg-config about them.
|
||||||
# It seems that people have more trouble with getting GTK+ to work
|
# It seems that people have more trouble with getting GTK+ to work
|
||||||
# than with other toolkits, so we try a bit harder to diagnose them here.
|
# than with other toolkits, so we try a bit harder to diagnose them here.
|
||||||
|
|
||||||
function REQUIRE_GTK2()
|
function REQUIRE_GTK3()
|
||||||
{ local want_major="$1"
|
{ local want_major="$1"
|
||||||
local want_minor="$2"
|
local want_minor="$2"
|
||||||
local want_micro="$3"
|
local want_micro="$3"
|
||||||
@@ -1496,14 +1496,14 @@ function REQUIRE_GTK2()
|
|||||||
|
|
||||||
if test "$want_threads" == "WITH_THREADS"; then threads="--libs gthread-2.0"; fi
|
if test "$want_threads" == "WITH_THREADS"; then threads="--libs gthread-2.0"; fi
|
||||||
|
|
||||||
echo -e "\n/* *** REQUIRE_GTK2 */\n" >>$LOGFILE
|
echo -e "\n/* *** REQUIRE_GTK3 */\n" >>$LOGFILE
|
||||||
|
|
||||||
echo "Gtk+ ${want_major}.${want_minor}.${want_micro} is required..."
|
echo "Gtk+ ${want_major}.${want_minor}.${want_micro} is required..."
|
||||||
|
|
||||||
# See if pkgconfig returns something
|
# See if pkgconfig returns something
|
||||||
|
|
||||||
echo -n " pkg-config... "
|
echo -n " pkg-config... "
|
||||||
if pkg-config --cflags gtk+-2.0 >>config.tmp 2>&1 && pkg-config $threads --libs gtk+-2.0 >>config.tmp 2>&1 ; then
|
if pkg-config --cflags gtk+-3.0 >>config.tmp 2>&1 && pkg-config $threads --libs gtk+-3.0 >>config.tmp 2>&1 ; then
|
||||||
echo "works"
|
echo "works"
|
||||||
rm config.tmp
|
rm config.tmp
|
||||||
else
|
else
|
||||||
@@ -1518,11 +1518,11 @@ Make sure you have the following packages installed:
|
|||||||
- glib2
|
- glib2
|
||||||
- pango
|
- pango
|
||||||
- atk
|
- atk
|
||||||
- gtk2
|
- gtk3
|
||||||
|
|
||||||
Some GNU/Linux distributions (e.g. SuSE) distinguish between
|
Some GNU/Linux distributions (e.g. SuSE) distinguish between
|
||||||
end-user packages of the libraries (e.g. 'gtk2') and
|
end-user packages of the libraries (e.g. 'gtk3') and
|
||||||
versions suitable for building programs (e.g. 'gtk2-devel').
|
versions suitable for building programs (e.g. 'gtk3-devel').
|
||||||
You might have to install the development versions explicitly
|
You might have to install the development versions explicitly
|
||||||
even if you have already GTK+ or Gnome applications running
|
even if you have already GTK+ or Gnome applications running
|
||||||
on your system.
|
on your system.
|
||||||
@@ -1533,17 +1533,17 @@ EOF
|
|||||||
|
|
||||||
# Do a test compile to make sure they did not return some junk
|
# Do a test compile to make sure they did not return some junk
|
||||||
|
|
||||||
CFG_GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
CFG_GTK3_CFLAGS=`pkg-config --cflags gtk+-3.0`
|
||||||
CFG_GTK2_LIBS=`pkg-config $threads --libs gtk+-2.0`
|
CFG_GTK3_LIBS=`pkg-config $threads --libs gtk+-3.0`
|
||||||
|
|
||||||
CFG_GTK2_BINDIR=`type -P pkg-config`
|
CFG_GTK3_BINDIR=`which pkg-config`
|
||||||
CFG_GTK2_BINDIR=`echo $CFG_GTK2_BINDIR | sed -e 's/.exe//' | sed -e 's/\/pkg-config//'`
|
CFG_GTK3_BINDIR=`echo $CFG_GTK3_BINDIR | sed -e 's/.exe//' | sed -e 's/\/pkg-config//'`
|
||||||
|
|
||||||
CFG_CFLAGS="$CFG_CFLAGS $CFG_GTK2_CFLAGS"
|
CFG_CFLAGS="$CFG_CFLAGS $CFG_GTK3_CFLAGS"
|
||||||
CFG_LIBS="$CFG_LIBS $CFG_GTK2_LIBS"
|
CFG_LIBS="$CFG_LIBS $CFG_GTK3_LIBS"
|
||||||
|
|
||||||
cat >conftest.c <<EOF
|
cat >conftest.c <<EOF
|
||||||
#include <gtk/gtkversion.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
CPPABUSE GTK_MAJOR_VERSION.GTK_MINOR_VERSION.GTK_MICRO_VERSION
|
CPPABUSE GTK_MAJOR_VERSION.GTK_MINOR_VERSION.GTK_MICRO_VERSION
|
||||||
EOF
|
EOF
|
||||||
@@ -1568,9 +1568,9 @@ EOF
|
|||||||
|
|
||||||
# Successfully finished
|
# Successfully finished
|
||||||
|
|
||||||
echo "CFG_GTK2_CFLAGS = $CFG_GTK2_CFLAGS" >> Makefile.config
|
echo "CFG_GTK3_CFLAGS = $CFG_GTK3_CFLAGS" >> Makefile.config
|
||||||
echo "CFG_GTK2_LIBS = $CFG_GTK2_LIBS" >> Makefile.config
|
echo "CFG_GTK3_LIBS = $CFG_GTK3_LIBS" >> Makefile.config
|
||||||
echo "CFG_GTK2_BINDIR = $CFG_GTK2_BINDIR" >> Makefile.config
|
echo "CFG_GTK3_BINDIR = $CFG_GTK3_BINDIR" >> Makefile.config
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ static gboolean expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer dat
|
|||||||
{ GtkWidget *box = (GtkWidget*)data;
|
{ GtkWidget *box = (GtkWidget*)data;
|
||||||
|
|
||||||
if(!Closure->colors_initialized)
|
if(!Closure->colors_initialized)
|
||||||
{ GdkColor *bg = &widget->style->bg[0];
|
{ GdkColor *bg = >k_widget_get_style(widget)->bg[0];
|
||||||
GdkColormap *cmap = gdk_colormap_get_system();
|
GdkVisual *cmap = gdk_visual_get_system();
|
||||||
|
|
||||||
memcpy(Closure->background, bg, sizeof(GdkColor));
|
memcpy(Closure->background, bg, sizeof(GdkColor));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user