Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-grdwine
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-grdwine
Commits
c29a1855
Commit
c29a1855
authored
Oct 29, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import 0.5.7
parent
cfbd1701
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
35 deletions
+30
-35
README
wine-grdwine/README
+1
-1
configure.ac
wine-grdwine/configure.ac
+2
-11
grdnt.udev
wine-grdwine/etc/grdnt.udev
+6
-0
Makefile.am
wine-grdwine/src/Makefile.am
+2
-7
grdimpl_linux.c
wine-grdwine/src/grdimpl_linux.c
+15
-15
grdwine.c
wine-grdwine/src/grdwine.c
+4
-1
No files found.
wine-grdwine/README
View file @
c29a1855
...
@@ -8,6 +8,6 @@ For udev:
...
@@ -8,6 +8,6 @@ For udev:
(Vendor ID: 0a89; Product ID: 000c, 000d)
(Vendor ID: 0a89; Product ID: 000c, 000d)
# cp etc/grdnt_hid.udev /etc/udev/rules.d/95-grdnt_hid.rules
# cp etc/grdnt_hid.udev /etc/udev/rules.d/95-grdnt_hid.rules
(Vendor ID: 0a89; Product ID: 0008, 0009)
(Vendor ID: 0a89; Product ID: 0008, 0009
, 00c2, 00c3
)
# cp etc/grdnt.udev /etc/udev/rules.d/95-grdnt.rules
# cp etc/grdnt.udev /etc/udev/rules.d/95-grdnt.rules
wine-grdwine/configure.ac
View file @
c29a1855
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_PREREQ(2.60)
AC_INIT([GrdWine],[0.5.
5
],[hotline@guardant.ru])
AC_INIT([GrdWine],[0.5.
6
],[hotline@guardant.ru])
AC_CONFIG_SRCDIR([src/grdwine.c])
AC_CONFIG_SRCDIR([src/grdwine.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE
...
@@ -12,24 +12,15 @@ AC_ARG_ENABLE([win64],
...
@@ -12,24 +12,15 @@ AC_ARG_ENABLE([win64],
AC_ARG_WITH([winedlls],
AC_ARG_WITH([winedlls],
[AC_HELP_STRING([--with-winedlls=PATH],[PATH to install .dll.so for Wine @<:@LIBDIR/wine@:>@])],
[AC_HELP_STRING([--with-winedlls=PATH],[PATH to install .dll.so for Wine @<:@LIBDIR/wine@:>@])],
[winedlls="${withval}"],[winedlls="\$(libdir)/wine"])
[winedlls="${withval}"],[winedlls="\$(libdir)/wine"])
AC_ARG_WITH([wineso],
[AC_HELP_STRING([--with-wineso=PATH],[PATH to install .dll.so for Wine @<:@LIBDIR/wine@:>@])],
[wineso="${withval}"],[wineso="\$(libdir)/wine"])
AC_ARG_WITH([winepe],
[AC_HELP_STRING([--with-winepe=PATH],[PATH to install .dll for Wine @<:@LIBDIR/wine@:>@])],
[winepe="${withval}"],[wineso="\$(libdir)/wine"])
AC_ARG_WITH([wineincs],
AC_ARG_WITH([wineincs],
[AC_HELP_STRING([--with-wineincs=PATH],[PATH to Wine C header files @<:@INCLUDEDIR@:>@])],
[AC_HELP_STRING([--with-wineincs=PATH],[PATH to Wine C header files @<:@INCLUDEDIR@:>@])],
[wineincs="${withval}"],[wineincs="\$(includedir)"])
[wineincs="${withval}"],[wineincs="\$(includedir)"])
AC_SUBST([wineso])
AC_SUBST([winedlls])
AC_SUBST([winepe])
AC_SUBST([wineincs])
AC_SUBST([wineincs])
AC_CANONICAL_HOST
AC_CANONICAL_HOST
AC_SYS_LARGEFILE
# Checks for programs.
# Checks for programs.
AC_PROG_CC
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_INSTALL
...
...
wine-grdwine/etc/grdnt.udev
View file @
c29a1855
...
@@ -6,4 +6,10 @@ SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a89", SYSFS{idProduct
...
@@ -6,4 +6,10 @@ SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a89", SYSFS{idProduct
# (for device created by udev in /dev/bus/usb)
# (for device created by udev in /dev/bus/usb)
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0009", MODE="0666"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0009", MODE="0666"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0009", MODE="0666"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0009", MODE="0666"
# Guardant Sign WinUsb
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="00c2", MODE="0666"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="00c2", MODE="0666"
# Guardant Code WinUsb
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="00c3", MODE="0666"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="00c3", MODE="0666"
wine-grdwine/src/Makefile.am
View file @
c29a1855
...
@@ -11,11 +11,6 @@ grdwine$(EXEEXT): grdwine.spec grdwine.o grdimpl_linux.o grdwine.dll.so
...
@@ -11,11 +11,6 @@ grdwine$(EXEEXT): grdwine.spec grdwine.o grdimpl_linux.o grdwine.dll.so
grdwine.dll.so
:
grdwine.spec grdwine.o grdimpl_linux.o
grdwine.dll.so
:
grdwine.spec grdwine.o grdimpl_linux.o
$(WINEGCC)
-shared
$^
-o
$@
-lkernel32
$(WINEGCC)
-shared
$^
-o
$@
-lkernel32
grdwine.dll
:
grdwine.spec
install-am
:
grdwine.dll.so
$(WINEGCC)
-o
$@
-Wb
,--fake-module
-shared
$^
-mno-cygwin
$(INSTALL_PROGRAM)
$^
$(winedlls)
/
$^
install-am
:
grdwine.dll.so grdwine.dll
$(MKDIR_P)
$(winepe)
$(wineso)
$(INSTALL_PROGRAM)
grdwine.dll.so
$(wineso)
/grdwine.dll.so
$(INSTALL_PROGRAM)
grdwine.dll
$(winepe)
/grdwine.dll
wine-grdwine/src/grdimpl_linux.c
100644 → 100755
View file @
c29a1855
...
@@ -42,8 +42,10 @@
...
@@ -42,8 +42,10 @@
#define GRD_VENDOR 0x0a89
#define GRD_VENDOR 0x0a89
#define GRD_PRODID_S3S 0x08
/* Guardant Sign/Time USB */
#define GRD_PRODID_S3S 0x08
/* Guardant Sign/Time USB */
#define GRD_PRODID_S3S_HID 0x0C
/* Guardant Sign/Time USB HID */
#define GRD_PRODID_S3S_HID 0x0C
/* Guardant Sign/Time USB HID */
#define GRD_PRODID_S3S_WINUSB 0xC2
/* Guardant Sign/Time USB (WINUSB) */
#define GRD_PRODID_S3C 0x09
/* Guardant Code USB */
#define GRD_PRODID_S3C 0x09
/* Guardant Code USB */
#define GRD_PRODID_S3C_HID 0x0D
/* Guardant Code USB HID */
#define GRD_PRODID_S3C_HID 0x0D
/* Guardant Code USB HID */
#define GRD_PRODID_S3C_WINUSB 0xC3
/* Guardant Code USB (WINSUB) */
#define USBFS_PATH_ENV "USB_DEVFS_PATH"
#define USBFS_PATH_ENV "USB_DEVFS_PATH"
#define GRD_IPC_NAME_ENV "GRD_IPC_NAME"
#define GRD_IPC_NAME_ENV "GRD_IPC_NAME"
#define USBFS_PATH_1 "/dev/bus/usb"
#define USBFS_PATH_1 "/dev/bus/usb"
...
@@ -385,10 +387,7 @@ int grd_ioctl_device(const char* dev_path, unsigned int prod_id, size_t pack_siz
...
@@ -385,10 +387,7 @@ int grd_ioctl_device(const char* dev_path, unsigned int prod_id, size_t pack_siz
*/
*/
int
grd_probe_device
(
const
char
*
dev_path
,
unsigned
int
*
prod_id
)
int
grd_probe_device
(
const
char
*
dev_path
,
unsigned
int
*
prod_id
)
{
{
unsigned
char
buf_tmpl
[
16
]
=
{
unsigned
char
buf_tmpl
[
4
]
=
{
0x89
,
0x0a
,
0x00
,
0x00
};
0x12
,
0x01
,
0x00
,
0x02
,
0xff
,
0x00
,
0x00
,
0x40
,
0x89
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x01
,
0x01
,
0x02
};
unsigned
char
buf
[
16
];
unsigned
char
buf
[
16
];
struct
lock_descr
lock
;
struct
lock_descr
lock
;
unsigned
int
id
;
unsigned
int
id
;
...
@@ -415,18 +414,19 @@ int grd_probe_device(const char* dev_path, unsigned int* prod_id)
...
@@ -415,18 +414,19 @@ int grd_probe_device(const char* dev_path, unsigned int* prod_id)
ret
=
-
1
;
ret
=
-
1
;
else
else
{
{
ret
=
0
;
unsigned
char
p
=
0
;
assert
(
sizeof
(
buf
)
==
sizeof
(
buf_tmpl
)
&&
sizeof
(
buf_tmpl
)
==
16
);
unsigned
char
prod_ids
[
4
]
=
{
GRD_PRODID_S3S
,
GRD_PRODID_S3S_WINUSB
,
GRD_PRODID_S3C
,
GRD_PRODID_S3C_WINUSB
};
buf_tmpl
[
10
]
=
GRD_PRODID_S3S
;
if
(
!
memcmp
(
buf
,
buf_tmpl
,
sizeof
(
buf_tmpl
)))
id
=
GRD_PRODID_S3S
;
else
{
buf_tmpl
[
10
]
=
GRD_PRODID_S3C
;
if
(
!
memcmp
(
buf
,
buf_tmpl
,
sizeof
(
buf_tmpl
)))
id
=
GRD_PRODID_S3C
;
else
ret
=
-
1
;
ret
=
-
1
;
assert
(
sizeof
(
buf_tmpl
)
==
4
);
for
(;
p
<
sizeof
(
prod_ids
);
++
p
)
{
buf_tmpl
[
2
]
=
prod_ids
[
p
];
if
(
!
memcmp
(
buf
+
8
,
buf_tmpl
,
sizeof
(
buf_tmpl
)))
{
id
=
prod_ids
[
p
];
ret
=
0
;
break
;
}
}
}
}
}
}
}
...
...
wine-grdwine/src/grdwine.c
View file @
c29a1855
...
@@ -105,8 +105,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
...
@@ -105,8 +105,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch
(
fdwReason
)
switch
(
fdwReason
)
{
{
case
DLL_WINE_PREATTACH
:
return
FALSE
;
/* prefer native version */
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hinstDLL
);
//
DisableThreadLibraryCalls(hinstDLL);
break
;
break
;
}
}
return
TRUE
;
return
TRUE
;
...
...
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