Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to make it compilable in recent Cygwin environment #175

Closed
wants to merge 8 commits into from

Conversation

h0ly0ne
Copy link

@h0ly0ne h0ly0ne commented Apr 22, 2024

Fixed path errors to get the header chain working correctly.
Additionally added required seperation for Cygwin environment to wintypes header

Include file in same directory
Path to included header files was wrong
Correct include path
Corrected include path
Corrected include path
Adopted to include special win32 header files for CYGWIN
@LudovicRousseau
Copy link
Owner

Why do you want to use pcsc-lite on cygwin instead of the PC/CS library provided by Windows?
What is you use case?

@h0ly0ne
Copy link
Author

h0ly0ne commented Apr 23, 2024

I am just experimenting with the possibility to replace the windows based PCSC drivers/system that is failing on a daily basis (and has ACL/permission issues on windows) - and the winscard.dll seems to behave the same way (when used with cygwin) as it depends on the components from windows.

Cygwin specific adoptions
Added specific libtool flag for cygwin support
@LudovicRousseau
Copy link
Owner

I am working on using meson to build pcsc-lite.
The current code is in https://github.com/LudovicRousseau/PCSC-debug/tree/meson

To rebuild on msys2 I need only one small patch:

diff --git a/meson.build b/meson.build
index 29caee12..de999951 100644
--- a/meson.build
+++ b/meson.build
@@ -126,6 +126,8 @@ elif target_machine.system() == 'netbsd'
   conf_data.set_quoted('PCSC_ARCH', 'NetBSD')
   confgen_data.set('ipcdir', '/var/run/pcscd')
   conf_data.set_quoted('PCSCLITE_HP_DROPDIR', '/usr/pkg/lib/pcsc-lite/drivers')
+elif target_machine.system() == 'cygwin'
+  conf_data.set_quoted('PCSC_ARCH', 'Windows')
 endif
 features +=  conf_data.get_unquoted('PCSC_ARCH')
 pcscd_dep += [polkit_dep, systemd_dep]

And I call meson with:

meson setup builddir -Dlibudev=false -Dpolkit=false -Dlibsystemd=false

Of course the binary does not work:

$ /sbin/pcscd.exe -fd
00000000 [42949672976] ../src/debuglog.c:392:DebugLogSetLevel() debug level=debug
00003041 [42949672976] ../src/pcscdaemon.c:629:main() cannot create /run/pcscd: No such file or directory

@LudovicRousseau
Copy link
Owner

meson is now included in pcsc-lite 2.2.1
https://blog.apdu.fr/posts/2024/05/pcsc-lite-now-uses-meson-build-tool/

@LudovicRousseau
Copy link
Owner

pcsc-lite builds fine on cygwin with the patch I proposed.

I do not see any benefit to have pcsc-lite on Windows. So I do not plan to add support for this platform. But feel free to use it.

Do you really use pcsc-lite on Windows?
What is you use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants