Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
929e2a54
Commit
929e2a54
authored
Oct 29, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Disable gphoto2.ds if the needed Unix libraries are missing.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
84a968ab
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
67 deletions
+16
-67
configure
configure
+5
-11
configure.ac
configure.ac
+5
-7
ds_image.c
dlls/gphoto2.ds/ds_image.c
+0
-18
gphoto2_i.h
dlls/gphoto2.ds/gphoto2_i.h
+1
-13
gphoto2_main.c
dlls/gphoto2.ds/gphoto2_main.c
+5
-11
ui.c
dlls/gphoto2.ds/ui.c
+0
-4
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
929e2a54
...
...
@@ -13576,15 +13576,9 @@ fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_lib_gphoto2_gp_camera_new
"
>
&5
$as_echo
"
$ac_cv_lib_gphoto2_gp_camera_new
"
>
&6
;
}
if
test
"x
$ac_cv_lib_gphoto2_gp_camera_new
"
=
xyes
;
then
:
$as_echo
"#define HAVE_GPHOTO2 1"
>>
confdefs.h
else
GPHOTO2_LIBS
=
""
;
GPHOTO2_CFLAGS
=
""
:
fi
else
GPHOTO2_LIBS
=
""
;
GPHOTO2_CFLAGS
=
""
fi
...
...
@@ -13668,7 +13662,7 @@ if test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"; then :
*
)
as_fn_error
$?
"libgphoto2
${
notice_platform
}
development files not found, digital cameras won't be supported.
This is an error since --with-gphoto was requested."
"
$LINENO
"
5
;;
esac
enable_gphoto2_ds
=
${
enable_gphoto2_ds
:-
no
}
fi
if
test
"
$ac_cv_lib_gphoto2_port_gp_port_info_list_new
"
!=
"yes"
;
then
:
case
"x
$with_gphoto
"
in
...
...
@@ -15218,12 +15212,12 @@ CPPFLAGS=$ac_save_CPPFLAGS
fi
if
test
"x
$ac_cv_lib_soname_jpeg
"
=
"x"
;
then
:
case
"x
$with_jpeg
"
in
x
)
as_fn_append wine_warnings
"|libjpeg
${
notice_platform
}
development files not found,
JPEG
won't be supported."
;;
x
)
as_fn_append wine_warnings
"|libjpeg
${
notice_platform
}
development files not found,
gphoto2
won't be supported."
;;
xno
)
;;
*
)
as_fn_error
$?
"libjpeg
${
notice_platform
}
development files not found,
JPEG
won't be supported.
*
)
as_fn_error
$?
"libjpeg
${
notice_platform
}
development files not found,
gphoto2
won't be supported.
This is an error since --with-jpeg was requested."
"
$LINENO
"
5
;;
esac
enable_gphoto2_ds
=
${
enable_gphoto2_ds
:-
no
}
fi
if
test
"
$ac_cv_header_AL_al_h
"
=
"yes"
...
...
configure.ac
View file @
929e2a54
...
...
@@ -1379,11 +1379,7 @@ then
WINE_PACKAGE_FLAGS(GPHOTO2,[libgphoto2],[-lgphoto2],
[`${GPHOTO2_CONFIG:-gphoto2-config} --cflags 2>/dev/null`],[`${GPHOTO2_CONFIG:-gphoto2-config} --libs 2>/dev/null`],
[AC_CHECK_HEADER(gphoto2-camera.h,
[AC_CHECK_LIB(gphoto2,gp_camera_new,
[AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have the libgphoto2 development environment])],
[GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""],
[$GPHOTO2_LIBS])],
[GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""])])
[AC_CHECK_LIB(gphoto2,gp_camera_new,[:],,[$GPHOTO2_LIBS])])])
WINE_PACKAGE_FLAGS(GPHOTO2_PORT,[libgphoto2_port],[-lgphoto2_port],
[`${GPHOTO2_PORT_CONFIG:-gphoto2-port-config} --cflags 2>/dev/null`],
[`${GPHOTO2_PORT_CONFIG:-gphoto2-port-config} --libs 2>/dev/null`],
...
...
@@ -1395,7 +1391,8 @@ then
[GPHOTO2_PORT_LIBS=""; GPHOTO2_PORT_CFLAGS=""])])
fi
WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"],
[libgphoto2 ${notice_platform}development files not found, digital cameras won't be supported.])
[libgphoto2 ${notice_platform}development files not found, digital cameras won't be supported.],
[enable_gphoto2_ds])
WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_port_gp_port_info_list_new" != "yes"],
[libgphoto2_port ${notice_platform}development files not found, digital cameras won't be auto-detected.])
...
...
@@ -1702,7 +1699,8 @@ then
fi])
fi
WINE_WARNING_WITH(jpeg,[test "x$ac_cv_lib_soname_jpeg" = "x"],
[libjpeg ${notice_platform}development files not found, JPEG won't be supported.])
[libjpeg ${notice_platform}development files not found, gphoto2 won't be supported.],
[enable_gphoto2_ds])
dnl **** Check for OpenAL 1.1 ****
if test "$ac_cv_header_AL_al_h" = "yes"
...
...
dlls/gphoto2.ds/ds_image.c
View file @
929e2a54
...
...
@@ -31,7 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
twain
);
#ifdef HAVE_GPHOTO2
static
void
*
libjpeg_handle
;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR
(
jpeg_std_error
);
...
...
@@ -85,7 +84,6 @@ static boolean _jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired) {
return
FALSE
;
}
static
void
_jpeg_term_source
(
j_decompress_ptr
cinfo
)
{
}
#endif
/* DG_IMAGE/DAT_CIECOLOR/MSG_GET */
TW_UINT16
GPHOTO2_CIEColorGet
(
pTW_IDENTITY
pOrigin
,
...
...
@@ -132,7 +130,6 @@ TW_UINT16 GPHOTO2_ImageFileXferGet (pTW_IDENTITY pOrigin,
return
TWRC_FAILURE
;
}
#ifdef HAVE_GPHOTO2
static
TW_UINT16
_get_image_and_startup_jpeg
(
void
)
{
const
char
*
folder
=
NULL
,
*
filename
=
NULL
;
struct
gphoto2_file
*
file
;
...
...
@@ -204,13 +201,11 @@ static TW_UINT16 _get_image_and_startup_jpeg(void) {
}
return
TWRC_SUCCESS
;
}
#endif
/* DG_IMAGE/DAT_IMAGEINFO/MSG_GET */
TW_UINT16
GPHOTO2_ImageInfoGet
(
pTW_IDENTITY
pOrigin
,
TW_MEMREF
pData
)
{
#ifdef HAVE_GPHOTO2
pTW_IMAGEINFO
pImageInfo
=
(
pTW_IMAGEINFO
)
pData
;
TRACE
(
"DG_IMAGE/DAT_IMAGEINFO/MSG_GET
\n
"
);
...
...
@@ -246,9 +241,6 @@ TW_UINT16 GPHOTO2_ImageInfoGet (pTW_IDENTITY pOrigin,
pImageInfo
->
ImageLength
=
activeDS
.
jd
.
output_height
;
pImageInfo
->
BitsPerPixel
=
24
;
return
TWRC_SUCCESS
;
#else
return
TWRC_FAILURE
;
#endif
}
/* DG_IMAGE/DAT_IMAGELAYOUT/MSG_GET */
...
...
@@ -291,7 +283,6 @@ TW_UINT16 GPHOTO2_ImageLayoutSet (pTW_IDENTITY pOrigin,
TW_UINT16
GPHOTO2_ImageMemXferGet
(
pTW_IDENTITY
pOrigin
,
TW_MEMREF
pData
)
{
#ifdef HAVE_GPHOTO2
TW_UINT16
twRC
=
TWRC_SUCCESS
;
pTW_IMAGEMEMXFER
pImageMemXfer
=
(
pTW_IMAGEMEMXFER
)
pData
;
LPBYTE
buffer
;
...
...
@@ -367,16 +358,12 @@ TW_UINT16 GPHOTO2_ImageMemXferGet (pTW_IDENTITY pOrigin,
if
(
pImageMemXfer
->
Memory
.
Flags
&
TWMF_HANDLE
)
LocalUnlock
(
pImageMemXfer
->
Memory
.
TheMem
);
return
twRC
;
#else
return
TWRC_FAILURE
;
#endif
}
/* DG_IMAGE/DAT_IMAGENATIVEXFER/MSG_GET */
TW_UINT16
GPHOTO2_ImageNativeXferGet
(
pTW_IDENTITY
pOrigin
,
TW_MEMREF
pData
)
{
#ifdef HAVE_GPHOTO2
pTW_UINT32
pHandle
=
(
pTW_UINT32
)
pData
;
HBITMAP
hDIB
;
BITMAPINFO
bmpInfo
;
...
...
@@ -456,9 +443,6 @@ TW_UINT16 GPHOTO2_ImageNativeXferGet (pTW_IDENTITY pOrigin,
activeDS
.
twCC
=
TWCC_SUCCESS
;
activeDS
.
currentState
=
7
;
return
TWRC_XFERDONE
;
#else
return
TWRC_FAILURE
;
#endif
}
/* DG_IMAGE/DAT_JPEGCOMPRESSION/MSG_GET */
...
...
@@ -552,7 +536,6 @@ TW_UINT16 GPHOTO2_RGBResponseSet (pTW_IDENTITY pOrigin,
return
TWRC_FAILURE
;
}
#ifdef HAVE_GPHOTO2
TW_UINT16
_get_gphoto2_file_as_DIB
(
const
char
*
folder
,
const
char
*
filename
,
CameraFileType
type
,
...
...
@@ -660,4 +643,3 @@ _get_gphoto2_file_as_DIB(
gp_file_unref
(
file
);
return
TWRC_SUCCESS
;
}
#endif
dlls/gphoto2.ds/gphoto2_i.h
View file @
929e2a54
...
...
@@ -24,17 +24,10 @@
# error You must include config.h first
#endif
#if defined(HAVE_GPHOTO2) && !defined(SONAME_LIBJPEG)
# warning "gphoto2 support in twain needs jpeg development headers"
# undef HAVE_GPHOTO2
#endif
#ifdef HAVE_GPHOTO2
/* Hack for gphoto2, which changes behaviour when WIN32 is set. */
#undef WIN32
#include <gphoto2/gphoto2-camera.h>
#define WIN32
#endif
#include <stdio.h>
...
...
@@ -79,10 +72,8 @@ struct tagActiveDS
TW_UINT16
twCC
;
/* condition code */
HWND
progressWnd
;
/* window handle of the scanning window */
#ifdef HAVE_GPHOTO2
Camera
*
camera
;
GPContext
*
context
;
#endif
/* Capabilities */
TW_UINT32
capXferMech
;
/* ICAP_XFERMECH */
...
...
@@ -92,9 +83,7 @@ struct tagActiveDS
struct
list
files
;
/* Download and decode JPEG STATE */
#ifdef HAVE_GPHOTO2
CameraFile
*
file
;
#endif
#ifdef SONAME_LIBJPEG
struct
jpeg_source_mgr
xjsm
;
struct
jpeg_decompress_struct
jd
;
...
...
@@ -158,12 +147,11 @@ TW_UINT16 GPHOTO2_RGBResponseSet
BOOL
DoCameraUI
(
void
)
DECLSPEC_HIDDEN
;
HWND
TransferringDialogBox
(
HWND
dialog
,
LONG
progress
)
DECLSPEC_HIDDEN
;
#ifdef HAVE_GPHOTO2
/* Helper function for GUI */
TW_UINT16
_get_gphoto2_file_as_DIB
(
const
char
*
folder
,
const
char
*
filename
,
CameraFileType
type
,
HWND
hwnd
,
HBITMAP
*
hDIB
)
DECLSPEC_HIDDEN
;
#endif
#endif
dlls/gphoto2.ds/gphoto2_main.c
View file @
929e2a54
...
...
@@ -37,18 +37,15 @@ struct tagActiveDS activeDS;
DSMENTRYPROC
GPHOTO2_dsmentry
;
#ifdef HAVE_GPHOTO2
static
char
*
GPHOTO2_StrDup
(
const
char
*
str
)
{
char
*
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
strcpy
(
dst
,
str
);
return
dst
;
}
#endif
static
void
load_filesystem
(
const
char
*
folder
)
{
#ifdef HAVE_GPHOTO2
int
i
,
count
,
ret
;
CameraList
*
list
;
...
...
@@ -110,7 +107,6 @@ load_filesystem(const char *folder) {
load_filesystem
(
newfolder
);
/* recurse ... happily */
}
gp_list_free
(
list
);
#endif
}
/* DG_CONTROL/DAT_CAPABILITY/MSG_GET */
...
...
@@ -577,16 +573,14 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case
DLL_PROCESS_ATTACH
:
GPHOTO2_instance
=
hinstDLL
;
DisableThreadLibraryCalls
(
hinstDLL
);
#ifdef HAVE_GPHOTO2
activeDS
.
context
=
gp_context_new
();
#endif
break
;
}
return
TRUE
;
}
#if
defined(HAVE_GPHOTO2) && defined(HAVE_GPHOTO2_PORT)
#if
def HAVE_GPHOTO2_PORT
static
TW_UINT16
GPHOTO2_GetIdentity
(
pTW_IDENTITY
,
pTW_IDENTITY
);
static
TW_UINT16
GPHOTO2_OpenDS
(
pTW_IDENTITY
,
pTW_IDENTITY
);
#endif
...
...
@@ -605,7 +599,7 @@ static TW_UINT16 GPHOTO2_SourceControlHandler (
switch
(
MSG
)
{
case
MSG_CLOSEDS
:
#if
defined(HAVE_GPHOTO2) && defined(HAVE_GPHOTO2_PORT)
#if
def HAVE_GPHOTO2_PORT
if
(
activeDS
.
camera
)
{
gp_camera_free
(
activeDS
.
camera
);
activeDS
.
camera
=
NULL
;
...
...
@@ -613,14 +607,14 @@ static TW_UINT16 GPHOTO2_SourceControlHandler (
#endif
break
;
case
MSG_GET
:
#if
defined(HAVE_GPHOTO2) && defined(HAVE_GPHOTO2_PORT)
#if
def HAVE_GPHOTO2_PORT
twRC
=
GPHOTO2_GetIdentity
(
pOrigin
,(
pTW_IDENTITY
)
pData
);
#else
twRC
=
TWRC_FAILURE
;
#endif
break
;
case
MSG_OPENDS
:
#if
defined(HAVE_GPHOTO2) && defined(HAVE_GPHOTO2_PORT)
#if
def HAVE_GPHOTO2_PORT
twRC
=
GPHOTO2_OpenDS
(
pOrigin
,(
pTW_IDENTITY
)
pData
);
#else
twRC
=
TWRC_FAILURE
;
...
...
@@ -1039,7 +1033,7 @@ DS_Entry ( pTW_IDENTITY pOrigin,
return
twRC
;
}
#if
defined(HAVE_GPHOTO2) && defined(HAVE_GPHOTO2_PORT)
#if
def HAVE_GPHOTO2_PORT
static
GPPortInfoList
*
port_list
;
static
int
curcamera
;
static
CameraList
*
detected_cameras
;
...
...
dlls/gphoto2.ds/ui.c
View file @
929e2a54
...
...
@@ -122,12 +122,8 @@ static void PopulateImageList(HIMAGELIST *iList, HWND list)
HBITMAP
bitmap
;
BITMAP
bmpInfo
;
#ifdef HAVE_GPHOTO2
_get_gphoto2_file_as_DIB
(
file
->
folder
,
file
->
filename
,
GP_FILE_TYPE_PREVIEW
,
0
,
&
bitmap
);
#else
bitmap
=
0
;
#endif
GetObjectA
(
bitmap
,
sizeof
(
BITMAP
),
&
bmpInfo
);
if
(
*
iList
==
0
)
...
...
include/config.h.in
View file @
929e2a54
...
...
@@ -116,9 +116,6 @@
/* Define to 1 if you have the `gnutls_cipher_init' function. */
#undef HAVE_GNUTLS_CIPHER_INIT
/* Define if we have the libgphoto2 development environment */
#undef HAVE_GPHOTO2
/* Define if we have the libgphoto2_port development environment */
#undef HAVE_GPHOTO2_PORT
...
...
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