lpac is written with C99 and compatible with SGP.22 version 2.2.2.
lpac uses CMake as its build system. Common build steps for all OSs look as follows:
# clone this repo in the top-level folder
git clone https://github.com/estkme-group/lpac.git
cd lpac
# configuration (this step can also include options -DOPTION=VALUE)
cmake -B build
# compilation
cmake --build buildIf you want to package lpac in a relocatable directory, please build with -DSTANDALONE_MODE=ON,
and then run command below to install files in directory.
DESTDIR=output cmake --install buildThe resulting binary can then be found under build/output/executables folder.
Same as normal Debian/Ubuntu, however, in order to build the GBinder backends, you will need libgbinder-dev, glib2.0-dev, and you will have to pass -DLPAC_WITH_APDU_GBINDER=ON when invoking cmake.
Install Homebrew.
Execute the same commands as you would do in Debian.
Windows needs libcurl.dll to run.
Download libcurl from https://curl.se/download.html and place it as libcurl.dll aside lpac.exe.
Install prerequisites and run CMake commands.
Require build-essential cmake git g++ libpcsclite-dev libcurl4-openssl-dev gcc-mingw-w64 g++-mingw-w64 installed.
Require mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc installed.
Require gcc-core gcc-g++ make cmake unzip wget installed.
To run it outside Cygwin shell, you need copy cygwin1.dll to the program folder to distribute.
cygwin1.dll is located in C:\cygwin64\bin\cygwin1.dll (Default Cygwin installation location)
It is possible to build on WoA devices with MSYS2 ARM64 Support
You may need to install mingw-w64-clang-aarch64-cmake, mingw-w64-clang-aarch64-clang and modify cmake/linux-mingw64.cmake(replace toolchain).
Download prebuilt curl dll is also needed. Refer to the previous compilation steps.
Please see debug environment variables