Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
1a112ef4
Commit
1a112ef4
authored
Jan 14, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Possibility to build co_convert without gtk
parent
22b86d3a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
12 deletions
+41
-12
src/exe/co_convert/src/cnv_image.cpp
src/exe/co_convert/src/cnv_image.cpp
+12
-8
src/exe/co_convert/src/os_linux/hw_x86/link_rule.mk
src/exe/co_convert/src/os_linux/hw_x86/link_rule.mk
+4
-1
src/exe/co_convert/src/os_linux/hw_x86_64/link_rule.mk
src/exe/co_convert/src/os_linux/hw_x86_64/link_rule.mk
+1
-1
src/tools/bld/src/os_linux/hw_x86/variables.mk
src/tools/bld/src/os_linux/hw_x86/variables.mk
+9
-1
src/tools/bld/src/os_linux/hw_x86_64/variables.mk
src/tools/bld/src/os_linux/hw_x86_64/variables.mk
+9
-1
src/tools/pwre/src/os_linux/pwre_function
src/tools/pwre/src/os_linux/pwre_function
+6
-0
No files found.
src/exe/co_convert/src/cnv_image.cpp
View file @
1a112ef4
...
...
@@ -29,9 +29,9 @@
using
namespace
std
;
#define PWRE
_GTK 1
//#define PWRE_CONF
_GTK 1
#if defined PWRE_GTK
#if defined PWRE_
CONF_
GTK
# include <gdk/gdk.h>
# include <gdk-pixbuf/gdk-pixbuf.h>
...
...
@@ -66,7 +66,7 @@ static Display *display = 0;
int
cnv_get_image
(
char
*
fname
,
cnv_tImImage
*
image
,
cnv_tPixmap
*
pixmap
)
{
#if defined PWRE_GTK
#if defined PWRE_
CONF_
GTK
if
(
!
gdk_init_done
)
{
gdk_init
(
0
,
0
);
gdk_init_done
=
1
;
...
...
@@ -93,7 +93,7 @@ int cnv_get_image( char *fname, cnv_tImImage *image, cnv_tPixmap *pixmap)
void
cnv_free_image
(
cnv_tImImage
image
,
cnv_tPixmap
pixmap
)
{
#if defined PWRE_GTK
#if defined PWRE_
CONF_
GTK
gdk_pixbuf_unref
(
(
GdkPixbuf
*
)
image
);
#elif defined PWRE_IMLIB
...
...
@@ -105,7 +105,7 @@ void cnv_free_image( cnv_tImImage image, cnv_tPixmap pixmap)
void
cnv_print_image
(
cnv_tImImage
image
,
char
*
filename
)
{
#if defined PWRE_GTK
#if defined PWRE_
CONF_
GTK
char
*
s
;
char
type
[
20
];
GError
*
error
=
NULL
;
...
...
@@ -128,19 +128,23 @@ void cnv_print_image( cnv_tImImage image, char *filename)
int
cnv_image_width
(
cnv_tImImage
image
)
{
#if defined PWRE_GTK
#if defined PWRE_
CONF_
GTK
return
gdk_pixbuf_get_width
(
(
GdkPixbuf
*
)
image
);
#elif defined PWRE_IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_width
;
#else
return
0
;
#endif
}
int
cnv_image_height
(
cnv_tImImage
image
)
{
#if defined PWRE_GTK
#if defined PWRE_
CONF_
GTK
return
gdk_pixbuf_get_height
(
(
GdkPixbuf
*
)
image
);
#elif defined PWRE_IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_height
;
#else
return
0
;
#endif
}
...
...
@@ -148,7 +152,7 @@ void cnv_image_pixel_iter( cnv_tImImage image,
void
(
*
pixel_cb
)(
void
*
,
ofstream
&
,
unsigned
char
*
),
void
*
userdata
,
ofstream
&
fp
)
{
#if defined PWRE_GTK
#if defined PWRE_
CONF_
GTK
unsigned
char
*
rgb
,
*
rgb_row
;
int
rgb_height
;
int
rgb_width
;
...
...
src/exe/co_convert/src/os_linux/hw_x86/link_rule.mk
View file @
1a112ef4
...
...
@@ -3,7 +3,10 @@ link_rule_mk := 1
link
=
$(ldxx)
$(linkflags)
$(domap)
-o
$(export_exe)
$(export_obj)
\
$(objects)
-L
/usr/X11R6/lib
-L
/opt/gnome/lib
-lpwr_co
\
`
pkg-config
--libs
gtk+-2.0
`
\
$(linkgtk)
\
-lX11
-lrt
-lm
# `pkg-config --libs gtk+-2.0` \
endif
src/exe/co_convert/src/os_linux/hw_x86_64/link_rule.mk
View file @
1a112ef4
...
...
@@ -3,7 +3,7 @@ link_rule_mk := 1
link
=
$(ldxx)
$(linkflags)
$(domap)
-o
$(export_exe)
$(export_obj)
\
$(objects)
-L
/usr/X11R6/lib
-L
/opt/gnome/lib
-lpwr_co
\
`
pkg-config
--libs
gtk+-2.0
`
\
$(linkgtk)
\
-lX11
-lrt
-lm
endif
src/tools/bld/src/os_linux/hw_x86/variables.mk
View file @
1a112ef4
...
...
@@ -101,10 +101,18 @@ else
linkmysql
:=
endif
ifeq
($(pwre_conf_gtk),1)
cgtk
:=
-DPWRE_CONF_GTK
=
1
linkgtk
:=
`
pkg-config
--libs
gtk+-2.0
`
else
cgtk
:=
linkgtk
:=
endif
log_done
=
csetos
:=
-DOS_LINUX
=
1
-DOS
=
linux
-D_LINUX
-DHW_X86
=
1
-DHW
=
x86
cinc
:=
-I
$(inc_dir)
-I
$(einc_dir)
-I
$(hw_source)
-I
$(os_source)
-I
$(co_source)
-I
/usr/X11R6/include
-I
$(jdk)
/include
-I
$(jdk)
/include/linux
\
`
pkg-config
--cflags
gtk+-2.0
`
-DPREFIX
=
\"
/usr/local
\"
-DSYSCONFDIR
=
\"
/etc
\"
-DDATADIR
=
\"
/usr/share
\"
-DLIBDIR
=
\"
/usr/lib
\"
$(cmysql)
`
pkg-config
--cflags
gtk+-2.0
`
-DPREFIX
=
\"
/usr/local
\"
-DSYSCONFDIR
=
\"
/etc
\"
-DDATADIR
=
\"
/usr/share
\"
-DLIBDIR
=
\"
/usr/lib
\"
$(cmysql)
$(cgtk)
rm
:=
rm
cp
:=
cp
cpflags
:=
...
...
src/tools/bld/src/os_linux/hw_x86_64/variables.mk
View file @
1a112ef4
...
...
@@ -101,10 +101,18 @@ else
linkmysql
:=
endif
ifeq
($(pwre_conf_gtk),1)
cgtk
:=
-DPWRE_CONF_GTK
=
1
linkgtk
:=
`
pkg-config
--libs
gtk+-2.0
`
else
cgtk
:=
linkgtk
:=
endif
log_done
=
csetos
:=
-DOS_LINUX
=
1
-DOS
=
linux
-D_LINUX
-DHW_X86_64
=
1
-DHW
=
x86_64
cinc
:=
-I
$(inc_dir)
-I
$(einc_dir)
-I
$(hw_source)
-I
$(os_source)
-I
$(co_source)
-I
/usr/X11R6/include
-I
$(jdk)
/include
-I
$(jdk)
/include/linux
\
`
pkg-config
--cflags
gtk+-2.0
`
-DPREFIX
=
\"
/usr/local
\"
-DSYSCONFDIR
=
\"
/etc
\"
-DDATADIR
=
\"
/usr/share
\"
-DLIBDIR
=
\"
/usr/lib
\"
$(cmysql)
`
pkg-config
--cflags
gtk+-2.0
`
-DPREFIX
=
\"
/usr/local
\"
-DSYSCONFDIR
=
\"
/etc
\"
-DDATADIR
=
\"
/usr/share
\"
-DLIBDIR
=
\"
/usr/lib
\"
$(cmysql)
$(cgtk)
rm
:=
rm
cp
:=
cp
cpflags
:=
...
...
src/tools/pwre/src/os_linux/pwre_function
View file @
1a112ef4
...
...
@@ -151,6 +151,12 @@ set_env()
else
export pwre_conf_mysql=0
fi
# Gtk
if [ -e /usr/lib/libgtk-x11-2.0.so ]; then
export pwre_conf_gtk=1
else
export pwre_conf_gtk=0
fi
}
pwre_get_variables()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment